chunk-2d0ab151.e7b24226.js 3.7 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0ab151"],{1480:function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{"margin-top":"10px","text-align":"left"}},[a("el-form",{ref:"dialogForm",attrs:{model:e.dialogForm,rules:e.rules}},[a("el-form-item",{attrs:{label:"服务名称:",prop:"productName","label-width":e.formLabelWidth}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入名称",disabled:""},model:{value:e.productName,callback:function(t){e.productName=t},expression:"productName"}})],1),a("el-form-item",{attrs:{label:"用户昵称:",prop:"userName","label-width":e.formLabelWidth}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入用户昵称"},model:{value:e.dialogForm.userName,callback:function(t){e.$set(e.dialogForm,"userName",t)},expression:"dialogForm.userName"}})],1),a("el-form-item",{attrs:{label:"头像:",prop:"avatar","label-width":e.formLabelWidth}},[a("upload-image",{attrs:{boxSize:{width:"60px",height:"60px"},multiple:!1},model:{value:e.dialogForm.avatar,callback:function(t){e.$set(e.dialogForm,"avatar",t)},expression:"dialogForm.avatar"}})],1),a("el-form-item",{attrs:{label:"评论图片:","label-width":e.formLabelWidth}},[a("upload-image",{attrs:{multiple:!0,limit:6,modelName:"comment",boxSize:{width:"60px",height:"60px"}},model:{value:e.imageList,callback:function(t){e.imageList=t},expression:"imageList"}})],1),a("el-form-item",{attrs:{label:"满意度:",prop:"score","label-width":e.formLabelWidth}},[a("el-rate",{staticStyle:{"margin-top":"9px"},model:{value:e.dialogForm.score,callback:function(t){e.$set(e.dialogForm,"score",t)},expression:"dialogForm.score"}})],1),a("el-form-item",{attrs:{label:"评论内容:",prop:"content","label-width":e.formLabelWidth}},[a("el-input",{attrs:{type:"textarea",rows:4,maxlength:"100","show-word-limit":"",placeholder:"100字以内"},model:{value:e.dialogForm.content,callback:function(t){e.$set(e.dialogForm,"content",t)},expression:"dialogForm.content"}})],1)],1),a("div",{staticClass:"dialog-footer dialog-bottom",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.hideDialog}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleCreateSubmit()}}},[e._v("确 定")])],1)],1)},i=[],l=(a("b0c0"),a("a9e3"),a("d3b7"),a("25f0"),{name:"CommentFakeForm",props:{currentRow:{type:Object,default:null},keyNum:{type:Number,default:0}},data:function(){return{dialogEditVisible:!0,dialogCreateVisible:!1,formLabelWidth:"100px",productName:"",imageList:[],dialogForm:{userName:"",productId:"",avatar:"",content:"",images:"",score:5},rules:{userName:[{required:!0,message:"请输入用户昵称",trigger:"blur"}],avatar:[{required:!0,message:"请上传用户头像",trigger:"blur"}],content:[{required:!0,message:"请输入评论内容",trigger:"blur"}]}}},mounted:function(){},watch:{currentRow:{handler:function(e,t){this.dialogForm.productId=e.id,this.productName=e.name},immediate:!0},keyNum:{deep:!0,handler:function(e){e>0&&(this.resetForm("dialogForm"),this.dialogForm.avatar="",this.imageList=[])}}},methods:{handleCreateSubmit:function(){this.handleSubmit("/api/admin/comment/commentFake/insert")},handleSubmit:function(e){var t=this;this.validateForm()&&(this.dialogForm.images=this.imageList.toString(),this.request({url:e,method:"post",data:this.dialogForm}).then((function(e){t.msgResponse(e),setTimeout((function(){t.hideDialog()}),500)})).then((function(){t.$emit("getList")})).catch((function(){})))},validateForm:function(){var e=!1;return this.$refs.dialogForm.validate((function(t){e=t})),e},hideDialog:function(){this.$msgbox.close()}}}),r=l,m=a("2877"),n=Object(m["a"])(r,o,i,!1,null,null,null);t["default"]=n.exports}}]);