1 |
- webpackJsonp([11],{"4Cda":function(i,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var e=t("rySA"),n=t("vGYV"),o=t("SQ4B"),l=t("qI5z"),r={name:"MyQualification",components:{QualificationCard:e.a},data:function(){return{deleteQualification:!1,addQualification:!1,form:{name:"",number:"",licensingAuthority:"",time:"",isPublic:""},user:{},qualificationVOList:[],modalTitle:"新增资质",pickerOptions:{disabledDate:function(i){return i.getTime()>Date.now()},shortcuts:[{text:"今天",onClick:function(i){i.$emit("pick",new Date)}},{text:"昨天",onClick:function(i){var a=new Date;a.setTime(a.getTime()-864e5),i.$emit("pick",a)}},{text:"一周前",onClick:function(i){var a=new Date;a.setTime(a.getTime()-6048e5),i.$emit("pick",a)}}]},value2:"",rules:{name:[{required:!0,message:"证书名称不可为空",trigger:"blur"},{min:2,max:50,message:"报告名称长度在 2 到 50 个字符",trigger:"blur"}],number:[{required:!0,message:"证书编号不可为空",trigger:"blur"}],licensingAuthority:[{required:!0,message:"发证机构不可为空",trigger:"blur"}],time:[{required:!0,message:"发证时间不可为空",trigger:"blur"}],isPublic:[{required:!0,message:"公开类型不可为空",trigger:"blur"}]}}},methods:{loadData:function(){var i=this;o.a.get("/api/personal/displayqualification/"+this.user.id).then(function(a){i.qualificationVOList=a.qualificationVOList})},setUserInfo:function(){this.user=Object(n.M)("user")&&Object(n.M)("user").userVO},handleAddQualification:function(){var i=this;this.$refs.form.validate(function(a){if(a)if(i.form.id){var t={name:i.form.name,number:i.form.number,licensingAuthority:i.form.licensingAuthority,time:i.form.time,isPublic:i.form.isPublic};o.a.put("/api/personal/updatequalification/"+i.form.id+"/"+i.user.id,t).then(function(a){i.form=t,i.addQualification=!1,Object(l.a)("success","修改成功"),i.loadData()}).catch(function(i){Object(l.a)("error",i.data)})}else o.a.post("/api/personal/addqualification/"+i.user.id,i.form).then(function(a){i.addQualification=!1,Object(l.a)("success","添加成功"),i.loadData()}).catch(function(i){Object(l.a)("error",i.data)})})},requireDeleteQualification:function(i){this.deleteQualification=!0},handleDeleteQualification:function(i){var a=this;o.a.delete("/api/personal/deletequalification/"+this.form.id+"/"+this.user.id,{}).then(function(i){a.deleteQualification=!1,a.addQualification=!1,Object(l.a)("success","删除成功"),a.loadData()}).catch(function(i){Object(l.a)("error",i.data)})},handleEditQualification:function(i){var a=this;i.id?(o.a.get("/api/personal/displayone/"+i.id).then(function(i){a.form=i.qualificationVO}),this.modalTitle="编辑资质",this.addQualification=!0):(this.form={name:"",number:"",licensingAuthority:"",time:"",isPublic:""},this.modalTitle="新增资质",this.addQualification=!0)}},mounted:function(){this.setUserInfo(),this.loadData()}},c=function(){var i=this,a=i.$createElement,t=i._self._c||a;return t("div",[t("div",{staticClass:"right-qualification"},[t("div",{staticClass:"right-qualification-title"},[t("span",{staticStyle:{"font-size":"18px","font-weight":"bold"}},[i._v("我的资质")]),i._v(" "),t("el-button",{staticClass:"pull-right",attrs:{type:"primary",size:"mini"},on:{click:i.handleEditQualification}},[i._v("添加")])],1),i._v(" "),t("div",{staticStyle:{"margin-bottom":"15px"}},[t("QualificationCard",{attrs:{qualificationVOList:i.qualificationVOList},on:{handleEditQualification:i.handleEditQualification}})],1)]),i._v(" "),t("el-dialog",{attrs:{title:i.modalTitle,visible:i.addQualification,width:"30%"},on:{"update:visible":function(a){i.addQualification=a}}},[t("el-form",{ref:"form",attrs:{rules:i.rules,model:i.form,"label-width":"80px"}},[t("el-form-item",{attrs:{label:"证书名称",prop:"name"}},[t("el-input",{model:{value:i.form.name,callback:function(a){i.$set(i.form,"name",a)},expression:"form.name"}})],1),i._v(" "),t("el-form-item",{attrs:{label:"证书编号",prop:"number"}},[t("el-input",{model:{value:i.form.number,callback:function(a){i.$set(i.form,"number",a)},expression:"form.number"}})],1),i._v(" "),t("el-form-item",{attrs:{label:"发证机构",prop:"licensingAuthority"}},[t("el-input",{model:{value:i.form.licensingAuthority,callback:function(a){i.$set(i.form,"licensingAuthority",a)},expression:"form.licensingAuthority"}})],1),i._v(" "),t("el-form-item",{attrs:{label:"发证时间",prop:"time"}},[t("div",{staticClass:"block"},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{align:"right",type:"date",placeholder:"选择日期","picker-options":i.pickerOptions},model:{value:i.form.time,callback:function(a){i.$set(i.form,"time",a)},expression:"form.time"}})],1)]),i._v(" "),t("el-form-item",{attrs:{label:"是否公开",prop:"isPublic"}},[t("el-radio-group",{model:{value:i.form.isPublic,callback:function(a){i.$set(i.form,"isPublic",a)},expression:"form.isPublic"}},[t("el-radio",{attrs:{label:1}},[i._v("公开")]),i._v(" "),t("el-radio",{attrs:{label:0}},[i._v("不公开")])],1)],1)],1),i._v(" "),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(a){i.addQualification=!1}}},[i._v("取 消")]),i._v(" "),i.form.id?t("el-button",{attrs:{type:"danger"},on:{click:i.requireDeleteQualification}},[i._v("删 除")]):i._e(),i._v(" "),t("el-button",{attrs:{type:"primary"},on:{click:i.handleAddQualification}},[i._v("确 定")])],1)],1),i._v(" "),t("el-dialog",{attrs:{title:"删除资质提示",visible:i.deleteQualification,width:"30%"},on:{"update:visible":function(a){i.deleteQualification=a}}},[t("span",[i._v("确定删除资质 "),t("span",{staticStyle:{"font-weight":"bold","font-size":"18px"}},[i._v(i._s(i.form.name))]),i._v(" 吗?")]),i._v(" "),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(a){i.deleteQualification=!1}}},[i._v("取 消")]),i._v(" "),t("el-button",{attrs:{type:"primary"},on:{click:i.handleDeleteQualification}},[i._v("确 定")])],1)])],1)};c._withStripped=!0;var d={render:c,staticRenderFns:[]},s=d;var u=!1;var f=t("VU/8")(r,s,!1,function(i){u||t("sjSj")},"data-v-c3d201d0",null);f.options.__file="src/pages/UserCenter/MyQualification.vue";a.default=f.exports},"5OTm":function(i,a,t){var e=t("lDuJ");"string"==typeof e&&(e=[[i.i,e,""]]),e.locals&&(i.exports=e.locals);t("rjj0")("1f8e7b50",e,!1,{})},"b+va":function(i,a,t){(a=t("yGwj")(!0)).push([i.i,"\n.el-input-group__append[data-v-c3d201d0]{border-radius:0 !important\n}\n.right-qualification[data-v-c3d201d0]{padding:20px;background:#fff;-webkit-box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13);box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13)\n}\n.right-qualification .right-qualification-title[data-v-c3d201d0]{padding:10px;border-bottom:1px solid #ccc;margin-bottom:20px\n}\n","",{version:3,sources:["MyQualification.vue"],names:[],mappings:";AACA,yCAAyC;AACzC;AACA,sCAAsC,YAAY,CAAC,eAAe,CAAC,mDAAmD,CAAC;AACvH;AACA,iEAAiE,YAAY,CAAC,4BAA4B,CAAC;AAC3G",file:"MyQualification.vue",sourcesContent:["\n.el-input-group__append[data-v-c3d201d0]{border-radius:0 !important\n}\n.right-qualification[data-v-c3d201d0]{padding:20px;background:#fff;-webkit-box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13);box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13)\n}\n.right-qualification .right-qualification-title[data-v-c3d201d0]{padding:10px;border-bottom:1px solid #ccc;margin-bottom:20px\n}\n"]}]),i.exports=a},lDuJ:function(i,a,t){(a=t("yGwj")(!0)).push([i.i,"\n.el-input-group__append[data-v-4e4723d4]{border-radius:0 !important\n}\n.qualification-card[data-v-4e4723d4]{height:160px;background:#fff;-webkit-box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13);box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13);margin-bottom:10px\n}\n.qualification-card .qualification-card-title .qualification-card-name[data-v-4e4723d4]{font-size:16px;font-weight:bold;line-height:28px;width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap\n}\n.qualification-card .qualification-card-detail-wrapper[data-v-4e4723d4]{padding:10px\n}\n.qualification-card .qualification-card-detail-wrapper .qualification-card-detail[data-v-4e4723d4]{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:5px\n}\n.qualification-card .qualification-card-detail-wrapper .qualification-card-detail .qualification-card-detail-title[data-v-4e4723d4]{font-size:13px;white-space:nowrap\n}\n.qualification-card .qualification-card-detail-wrapper .qualification-card-detail .qualification-card-detail-info[data-v-4e4723d4]{color:#999;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap\n}\n","",{version:3,sources:["QualificationCard.vue"],names:[],mappings:";AACA,yCAAyC;AACzC;AACA,qCAAqC,YAAY,CAAC,eAAe,CAAC,mDAAmD,CAAC,2CAA2C,CAAC;AAClK;AACA,wFAAwF,cAAc,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,SAAS,CAAC,eAAe,CAAC,sBAAsB,CAAC;AAC1L;AACA,wEAAwE;AACxE;AACA,mGAAmG,mBAAmB,CAAC,mBAAmB,CAAC,YAAY,CAAC;AACxJ;AACA,oIAAoI,cAAc,CAAC;AACnJ;AACA,mIAAmI,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,sBAAsB,CAAC;AACpM",file:"QualificationCard.vue",sourcesContent:["\n.el-input-group__append[data-v-4e4723d4]{border-radius:0 !important\n}\n.qualification-card[data-v-4e4723d4]{height:160px;background:#fff;-webkit-box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13);box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13);margin-bottom:10px\n}\n.qualification-card .qualification-card-title .qualification-card-name[data-v-4e4723d4]{font-size:16px;font-weight:bold;line-height:28px;width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap\n}\n.qualification-card .qualification-card-detail-wrapper[data-v-4e4723d4]{padding:10px\n}\n.qualification-card .qualification-card-detail-wrapper .qualification-card-detail[data-v-4e4723d4]{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:5px\n}\n.qualification-card .qualification-card-detail-wrapper .qualification-card-detail .qualification-card-detail-title[data-v-4e4723d4]{font-size:13px;white-space:nowrap\n}\n.qualification-card .qualification-card-detail-wrapper .qualification-card-detail .qualification-card-detail-info[data-v-4e4723d4]{color:#999;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap\n}\n"]}]),i.exports=a},rySA:function(i,a,t){"use strict";var e={name:"QualifucationCard",props:["qualificationVOList"],methods:{showQualificationDetail:function(i){console.log("item"),this.$emit("handleEditQualification",i)}}},n=function(){var i=this,a=i.$createElement,t=i._self._c||a;return t("div",[t("el-row",{attrs:{gutter:15}},i._l(i.qualificationVOList,function(a){return t("el-col",{key:a.id,attrs:{span:8}},[t("div",{staticClass:"qualification-card",on:{click:function(t){return i.showQualificationDetail(a)}}},[t("div",{staticClass:"qualification-card-title",staticStyle:{padding:"10px",height:"24px",overflow:"hidden"}},[t("span",{staticClass:"qualification-card-name pull-left"},[i._v(i._s(a.name))]),i._v(" "),t("el-button",{staticClass:"pull-right",attrs:{type:"primary",plain:"",size:"mini"}},[i._v("编辑")])],1),i._v(" "),t("div",{staticClass:"qualification-card-detail-wrapper"},[t("div",{staticClass:"qualification-card-detail"},[t("div",{staticClass:"qualification-card-detail-title"},[i._v("证书编号:")]),i._v(" "),t("div",{staticClass:"qualification-card-detail-info"},[i._v(i._s(a.number))])]),i._v(" "),t("div",{staticClass:"qualification-card-detail"},[t("div",{staticClass:"qualification-card-detail-title"},[i._v("发证机关:")]),i._v(" "),t("div",{staticClass:"qualification-card-detail-info"},[i._v(i._s(a.licensingAuthority))])]),i._v(" "),t("div",{staticClass:"qualification-card-detail"},[t("div",{staticClass:"qualification-card-detail-title"},[i._v("发证时间:")]),i._v(" "),t("div",{staticClass:"qualification-card-detail-info"},[i._v(i._s(a.time))])])])])])}),1)],1)};n._withStripped=!0;var o={render:n,staticRenderFns:[]},l=o;var r=!1;var c=t("VU/8")(e,l,!1,function(i){r||t("5OTm")},"data-v-4e4723d4",null);c.options.__file="src/pages/UserCenter/QualificationCard.vue";a.a=c.exports},sjSj:function(i,a,t){var e=t("b+va");"string"==typeof e&&(e=[[i.i,e,""]]),e.locals&&(i.exports=e.locals);t("rjj0")("695c3d9e",e,!1,{})}});
|