chunk-7176e466.42209525.js 15 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7176e466"],{"0944":function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("section",[e._m(0),l("div",{staticClass:"content"},[l("div",{staticClass:"filter"},[l("el-form",{attrs:{size:"small","label-width":"70px",inline:!0,"label-position":"left"}},[l("el-form-item",{attrs:{label:""}},[l("el-input",{attrs:{clearable:"",placeholder:"请输入标题"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),l("el-form-item",[l("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("搜索")])],1),l("el-form-item",{staticStyle:{float:"right"}},[l("el-button",{attrs:{type:"primary"},on:{click:e.openDiag}},[e._v("发送消息")])],1)],1)],1),l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:e.list,height:"50vh",border:"","default-expand-all":"","row-key":"id"}},[l("el-table-column",{attrs:{prop:"name",label:"标题"}}),l("el-table-column",{attrs:{prop:"name",label:"附件"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("a",{attrs:{href:t.row.fileurl,target:"_blank"}},[l("span",[e._v(e._s(t.row.filename))])])]}}])}),l("el-table-column",{attrs:{prop:"cname",label:"是否问卷"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("a",{attrs:{target:"_blank"},on:{click:function(a){return e.showSurvey(t.row)}}},[l("span",[e._v("查看问卷")])]),t.row.template_qrcode?l("a",{attrs:{href:t.row.template_qrcode,target:"_blank"}},[l("span",[e._v(" | 生成二维码")])]):e._e()]}}])}),l("el-table-column",{attrs:{prop:"cname",label:"问卷统计"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.receiver_ids?l("span",[e._v("共统计:\n "),l("a",{attrs:{target:"_blank"},on:{click:function(a){return e.analyseData("total",t.row.id)}}},[l("span",[e._v(e._s(t.row.receiver_ids.length))])]),e._v("人"),l("br")]):e._e(),e._v("\n 已填报:"),l("a",{attrs:{href:t.row.fileurl,target:"_blank"},on:{click:function(a){return e.analyseData("finish",t.row.id)}}},[l("span",[e._v(e._s(t.row.finish_ids.length))])]),e._v("人"),l("br"),t.row.receiver_ids?l("span",[e._v("\n 未填报:"),l("a",{attrs:{href:t.row.fileurl,target:"_blank"},on:{click:function(a){return e.analyseData("unfinish",t.row.id)}}},[l("span",[e._v(e._s(t.row.unfinish_ids.length))])]),e._v("人"),l("br")]):e._e()]}}])}),l("el-table-column",{attrs:{prop:"cname",label:"发送者"}}),l("el-table-column",{attrs:{prop:"receiver_names",label:"接收者"}}),l("el-table-column",{attrs:{prop:"ctime",label:"发送时间"}}),l("el-table-column",{attrs:{prop:"zip",width:"150",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-button",{staticClass:"edit",attrs:{type:"text"},on:{click:function(a){return e.edit(t.row)}}},[e._v("编辑")]),l("el-button",{staticClass:"del",attrs:{type:"text"},on:{click:function(a){return e.del(t.row.id)}}},[e._v("删除")])]}}])})],1),l("Page",{ref:"pageButton",attrs:{current:e.form.page,page_size:e.form.page_size,total:e.total},on:{pageChange:e.gopage}})],1),l("el-dialog",{attrs:{title:e.dialogTitle,"close-on-click-modal":!1,visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[l("el-form",{ref:"form1",staticClass:"preview",attrs:{size:"small",inline:!1,"label-width":"80px",model:e.form1,rules:e.rules}},[l("el-form-item",{attrs:{label:"标题",prop:"name"}},[l("el-input",{attrs:{placeholder:"请输入标题"},model:{value:e.form1.name,callback:function(t){e.$set(e.form1,"name",t)},expression:"form1.name"}})],1),l("el-form-item",{attrs:{label:"接收人"}},[l("el-cascader",{attrs:{options:e.options,props:e.props,clearable:""},on:{change:e.handleChange},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.node,i=t.data;return[l("span",[e._v(e._s(i.label))]),a.isLeaf?e._e():l("span",[e._v(" ("+e._s(i.children.length)+") ")])]}}]),model:{value:e.form1.receiver_id,callback:function(t){e.$set(e.form1,"receiver_id",t)},expression:"form1.receiver_id"}})],1),l("el-form-item",{attrs:{label:"问卷模板"}},[l("el-select",{attrs:{placeholder:"请选择问卷模板",clearable:""},model:{value:e.form1.template_id,callback:function(t){e.$set(e.form1,"template_id",t)},expression:"form1.template_id"}},e._l(e.templateList,(function(e,t){return l("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),l("el-form-item",{attrs:{label:"附件"}},[l("input",{attrs:{id:"fileurl",type:"file"},on:{change:function(t){return e.upload("fileurl")}}}),l("a",{attrs:{href:e.form1.fileurl,target:"_blank"}},[l("span",[e._v(e._s(e.form1.filename))])])])],1),l("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[l("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)],1),l("el-dialog",{attrs:{title:e.dialogTitle,"close-on-click-modal":!1,visible:e.dialogVisible1},on:{"update:visible":function(t){e.dialogVisible1=t}}},[l("div",{staticClass:"item-main"},[l("img",{staticClass:"survey_logo",attrs:{src:a("8278"),alt:""}}),l("h5",{staticClass:"tpl_title",attrs:{align:"center"}},[e._v(e._s(e.title))]),l("el-form",{ref:"form",staticClass:"tpl_form over_y",attrs:{model:e.form2}},[e._l(e.widgetList,(function(t,a){return l("el-form-item",{key:a,attrs:{label:t.label}},["input"==t.type?l("el-input",{attrs:{placeholder:t.placeholder},model:{value:e.form2[t.label],callback:function(a){e.$set(e.form2,t.label,a)},expression:"form2[item.label]"}}):e._e(),"textarea"==t.type?l("el-input",{attrs:{type:"textarea",placeholder:t.placeholder},model:{value:e.form2[t.label],callback:function(a){e.$set(e.form2,t.label,a)},expression:"form2[item.label]"}}):e._e(),"radio"==t.type?l("el-radio-group",{model:{value:e.form2[t.label],callback:function(a){e.$set(e.form2,t.label,a)},expression:"form2[item.label]"}},e._l(t.items,(function(t,a){return l("el-radio",{key:a,attrs:{label:t.label}},[e._v(e._s(t.label))])})),1):"checkbox"==t.type?l("el-checkbox-group",{model:{value:e.form2[t.label],callback:function(a){e.$set(e.form2,t.label,a)},expression:"form2[item.label]"}},e._l(t.items,(function(e,t){return l("el-checkbox",{key:t,attrs:{label:e.label}})})),1):e._e(),"image"==t.type?l("el-upload",{attrs:{action:"/api/admin/uploadfile","list-type":"picture-card",data:{type:t.label},"on-success":e.handleSuccess}},[l("i",{staticClass:"el-icon-plus"})]):e._e(),"file"==t.type?l("el-upload",{ref:"upload",refInFor:!0,staticClass:"upload-demo",attrs:{action:"/api/admin/uploadfile",data:{type:t.label},"on-success":e.handleSuccess}},[l("el-button",{staticStyle:{"margin-left":"10px"},attrs:{size:"small",type:"primary",plain:""}},[e._v("添加文件")])],1):e._e()],1)})),this.widgetList.length?l("el-form-item",[l("el-button",{staticStyle:{width:"100%"},attrs:{size:"medium",type:"primary"},on:{click:e.saveResult}},[e._v("提交")])],1):e._e()],2)],1)]),l("el-dialog",{attrs:{title:e.dialogTitle2,"close-on-click-modal":!1,visible:e.dialogVisible2},on:{"update:visible":function(t){e.dialogVisible2=t}}},[l("div",{staticClass:"content"},[l("div",{staticClass:"filter"},[l("el-form",{attrs:{size:"small","label-width":"70px",inline:!0,"label-position":"left"}},[l("el-form-item",{attrs:{label:""}},[l("el-input",{attrs:{clearable:"",placeholder:"请输入标题"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),l("el-form-item",[l("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("搜索")])],1),l("el-form-item",{staticStyle:{float:"right"}},[l("el-button",{attrs:{type:"primary"}},[e._v("导出Excel")])],1)],1)],1),l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:e.analyseDataList,height:"50vh",border:"","default-expand-all":"","row-key":"id"}},[l("el-table-column",{attrs:{prop:"realname",label:"姓名"}}),l("el-table-column",{attrs:{prop:"journal_name",label:"所属期刊"}}),l("el-table-column",{attrs:{prop:"cname",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.post_status?l("span",[e._v("已填报")]):l("span",[e._v("未填报")])]}}])}),l("el-table-column",{attrs:{prop:"post_time",label:"填报时间"}}),l("el-table-column",{attrs:{prop:"zip",width:"80",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-button",{staticClass:"edit",attrs:{type:"text"},on:{click:function(a){return e.showPostResult(t.row)}}},[e._v("查看")])]}}])})],1),l("Page",{ref:"pageButton",attrs:{current:e.form.page,page_size:e.form.page_size,total:e.total},on:{pageChange:e.gopage}})],1)]),l("el-dialog",{staticClass:"result_dialog",attrs:{title:e.dialogTitle3,"close-on-click-modal":!1,visible:e.dialogVisible3},on:{"update:visible":function(t){e.dialogVisible3=t}}},[l("div",{staticClass:"content"},[e._l(this.postResult,(function(t,a){return l("div",{key:a,staticClass:"result-item"},[l("span",{staticClass:"label"},[e._v(e._s(a)+":")]),l("span",{staticClass:"value"},[e._v(e._s(t))])])})),0==Object.keys(e.postResult).length?l("div",[e._v("暂无数据")]):e._e()],2)])],1)},i=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("p",[a("span",[e._v("信息管理>")]),e._v("消息管理")])}],s=(a("1bc78"),a("a450"),a("9973")),o={components:{Page:s["a"]},data:function(){return{postResult:{},analyseDataList:[],title:"",widgetList:[],form:{name:"",page:1,page_size:20},form1:{},form2:{},total:1,list:[{name:"2333"}],loading:!1,input:"",dialogVisible:!1,dialogVisible1:!1,dialogVisible2:!1,dialogVisible3:!1,dialogTitle:"",dialogTitle2:"",dialogTitle3:"",defaultProps:{},data:[],templateList:[],userList:[],checkList:[],rules:{name:[{required:!0,message:"请输入标题",trigger:"blur"}]},props:{multiple:!0},options:[{value:1,label:"东南",children:[{value:2,label:"上海",children:[{value:3,label:"普陀"},{value:4,label:"黄埔"},{value:5,label:"徐汇"}]},{value:7,label:"江苏",children:[{value:8,label:"南京"},{value:9,label:"苏州"},{value:10,label:"无锡"}]},{value:12,label:"浙江",children:[{value:13,label:"杭州"},{value:14,label:"宁波"},{value:15,label:"嘉兴"}]}]},{value:17,label:"西北",children:[{value:18,label:"陕西",children:[{value:19,label:"西安"},{value:20,label:"延安"}]},{value:21,label:"新疆维吾尔族自治区",children:[{value:22,label:"乌鲁木齐"},{value:23,label:"克拉玛依"}]}]}]}},computed:function(){},methods:{showPostResult:function(e){this.postResult=e.post_result,this.dialogTitle3="填报结果",this.dialogVisible3=!0},analyseData:function(e,t){var a=this;this.dialogTitle2="统计结果",this.dialogVisible2=!0,this.$api.getMessageSurveyAnalyse({type:e,message_id:t}).then((function(e){a.analyseDataList=e.data.data.list}))},handleSuccess:function(e,t){this.form2[e.data.type]=e.data.url},change:function(e,t){this.form2[t]=e},changeMul:function(e,t){this.form2[t]=e},showSurvey:function(e){var t=this,a=this;this.title=e.name,this.message_id=e.id,this.$api.getTemplate({id:e.template_id}).then((function(e){0==e.data.code&&(t.widgetList=e.data.data.widget,t.widgetList.forEach((function(e){"checkbox"==e.type&&a.$set(a.form2,e.label,[])})),console.log(t.form2),t.dialogVisible1=!0)}))},upload:function(e){var t=this,a=document.getElementById(e).files,l=new FormData;l.append("file",a[0]),this.$api.uploadFile(l).then((function(a){0==a.data.code?(t.$set(t.form1,e,a.data.data.url),t.$set(t.form1,"filename",a.data.data.name),t.$message({message:"上传成功!",type:"success"})):t.$message.error(a.data.message)}))},handleChange:function(e){console.log(e)},search:function(){this.form;this.getData()},openDiag:function(){this.form1={},this.dialogVisible=!0,this.dialogTitle="发送消息"},gopage:function(e){e&&(this.form.page_size=e),this.form.page=this.$refs.pageButton.page,this.getData()},getData:function(){var e=this,t=this.form;this.loading=!0,this.$api.getAllTemplateList().then((function(t){e.templateList=t.data.data})),this.$api.getAllSysUserList().then((function(t){e.userList=t.data.data})),this.$api.getMessageList(t).then((function(t){e.list=t.data.data.list,e.total=t.data.data.total,e.loading=!1})),this.$api.getMessageReceiverList().then((function(t){e.options=t.data.data}))},del:function(e){var t=this;this.$confirm("确定删除吗","提示",{type:"warning"}).then((function(){t.$api.delMessageInfo({id:e}).then((function(e){t.$message({message:"删除成功",type:"success"}),t.getData()}))}))},edit:function(e){this.form1=e;var t=this.form1.receiver_id;console.log(t,33333333333333),"string"==typeof t&&(t=JSON.parse(t)),this.form1.receiver_id=t,this.dialogVisible=!0},saveResult:function(){var e=this,t=JSON.stringify(this.form2);this.$api.saveSurveyResult({message_id:this.message_id,result:t}).then((function(t){0==t.data.code?e.$message({type:"success",message:"保存成功!"}):e.$message.error("保存失败!"),e.dialogVisible1=!1}))},save:function(){var e=this;this.$refs["form1"].validate((function(t){if(t){var a=e.form1,l=e.form1.id;a.receiver_id=JSON.stringify(a.receiver_id),l?e.$api.editMessage(a).then((function(t){0==t.data.code?e.$message({type:"success",message:"保存成功!"}):e.$message.error("保存失败!"),e.getData(),e.dialogVisible=!1})):e.$api.addMessage(a).then((function(t){0==t.data.code?e.$message({type:"success",message:"保存成功!"}):e.$message.error("保存失败!"),e.getData(),e.dialogVisible=!1}))}}))}},created:function(){this.getData()}},n=o,r=(a("fd23"),a("5d22")),c=Object(r["a"])(n,l,i,!1,null,null,null);t["default"]=c.exports},"129d":function(e,t,a){"use strict";a("a210")},"1b01":function(e,t,a){},"1bc78":function(e,t,a){for(var l=a("25ba"),i=a("93ca"),s=a("84e8"),o=a("0b34"),n=a("065d"),r=a("953d"),c=a("839a"),u=c("iterator"),d=c("toStringTag"),p=r.Array,f={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=i(f),g=0;g<m.length;g++){var b,h=m[g],v=f[h],_=o[h],y=_&&_.prototype;if(y&&(y[u]||n(y,u,p),y[d]||n(y,d,h),r[h]=p,v))for(b in l)y[b]||s(y,b,l[b],!0)}},8278:function(e,t,a){e.exports=a.p+"img/survey_logo.387bf80d.png"},9973:function(e,t,a){"use strict";var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("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=[],s={data:function(){return{page:1}},props:{total:"",page_size:"",current:""},methods:{getData:function(e){this.page=e,this.$emit("pageChange")},handleSizeChange:function(e){this.$emit("pageChange",e)}},created:function(){}},o=s,n=(a("129d"),a("5d22")),r=Object(n["a"])(o,l,i,!1,null,null,null);t["a"]=r.exports},a210:function(e,t,a){},a450:function(e,t,a){var l=a("bb8b").f,i=Function.prototype,s=/^\s*function ([^ (]*)/,o="name";o in i||a("26df")&&l(i,o,{configurable:!0,get:function(){try{return(""+this).match(s)[1]}catch(e){return""}}})},fd23:function(e,t,a){"use strict";a("1b01")}}]);
  2. //# sourceMappingURL=chunk-7176e466.42209525.js.map