This commit is contained in:
alvis 2021-01-28 10:22:59 +08:00
parent e97a614832
commit f2d0192277
4 changed files with 5 additions and 3 deletions

View File

@ -89,12 +89,14 @@ export default {
})
},
resetForm () {
let lastId = this.form.id
this.$refs['form'].resetFields()
this.form = {
title: '',
content: '',
receiveUserIds: []
}
this.form.id = lastId
},
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
}

View File

@ -13,4 +13,4 @@
hm.src = 'https://hm.baidu.com/hm.js?cd8218cd51f800ed2b73e5751cb3f4f9'
var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
})()</script><link href="static/css/chunk-066bbd34.c306629d.css" rel="prefetch"><link href="static/css/chunk-111f3671.d650a2aa.css" rel="prefetch"><link href="static/css/chunk-157f9069.c306629d.css" rel="prefetch"><link href="static/css/chunk-2e16d177.89936c18.css" rel="prefetch"><link href="static/css/chunk-360c43ba.c306629d.css" rel="prefetch"><link href="static/css/chunk-3f483335.7fbe318e.css" rel="prefetch"><link href="static/css/chunk-42236473.c306629d.css" rel="prefetch"><link href="static/css/chunk-5bc3d75d.c306629d.css" rel="prefetch"><link href="static/css/chunk-65f8ca6f.c306629d.css" rel="prefetch"><link href="static/css/chunk-7c62808c.c306629d.css" rel="prefetch"><link href="static/css/chunk-873a42e2.1951fa25.css" rel="prefetch"><link href="static/css/chunk-a85d3c1e.c8588555.css" rel="prefetch"><link href="static/css/chunk-a9d03770.c306629d.css" rel="prefetch"><link href="static/css/chunk-bab2e2c4.c306629d.css" rel="prefetch"><link href="static/js/chunk-066bbd34.3194df9d.js" rel="prefetch"><link href="static/js/chunk-111f3671.92b6a5d2.js" rel="prefetch"><link href="static/js/chunk-157f9069.85f4f4a4.js" rel="prefetch"><link href="static/js/chunk-16f9edc1.20342ef3.js" rel="prefetch"><link href="static/js/chunk-2d0c138b.d639e644.js" rel="prefetch"><link href="static/js/chunk-2d221bd2.79734f7b.js" rel="prefetch"><link href="static/js/chunk-2d2300ef.06454c78.js" rel="prefetch"><link href="static/js/chunk-2d230fe7.3bd3f709.js" rel="prefetch"><link href="static/js/chunk-2e16d177.a52bb75e.js" rel="prefetch"><link href="static/js/chunk-360c43ba.43f3f2df.js" rel="prefetch"><link href="static/js/chunk-3f483335.9805b6d5.js" rel="prefetch"><link href="static/js/chunk-42236473.b06437f4.js" rel="prefetch"><link href="static/js/chunk-5bc3d75d.16fd0651.js" rel="prefetch"><link href="static/js/chunk-65f8ca6f.cc68113a.js" rel="prefetch"><link href="static/js/chunk-733c35b2.7c9953cf.js" rel="prefetch"><link href="static/js/chunk-75f11c77.e5a5c7ca.js" rel="prefetch"><link href="static/js/chunk-78234ca2.a1ececd4.js" rel="prefetch"><link href="static/js/chunk-793f0082.b6b96c49.js" rel="prefetch"><link href="static/js/chunk-7c62808c.558ddec6.js" rel="prefetch"><link href="static/js/chunk-873a42e2.c668a1e2.js" rel="prefetch"><link href="static/js/chunk-a85d3c1e.c9dd4754.js" rel="prefetch"><link href="static/js/chunk-a9d03770.e66ccc01.js" rel="prefetch"><link href="static/js/chunk-bab2e2c4.5bb927b4.js" rel="prefetch"><link href="static/js/chunk-d0753fda.6c67deb1.js" rel="prefetch"><link href="static/css/chunk-vendors.ee57d822.css" rel="preload" as="style"><link href="static/css/index.187e8cba.css" rel="preload" as="style"><link href="static/js/chunk-vendors.d6404b06.js" rel="preload" as="script"><link href="static/js/index.dadc01fc.js" rel="preload" as="script"><link href="static/css/chunk-vendors.ee57d822.css" rel="stylesheet"><link href="static/css/index.187e8cba.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue-demo doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="static/js/chunk-vendors.d6404b06.js"></script><script src="static/js/index.dadc01fc.js"></script></body></html>
})()</script><link href="static/css/chunk-066bbd34.c306629d.css" rel="prefetch"><link href="static/css/chunk-111f3671.d650a2aa.css" rel="prefetch"><link href="static/css/chunk-157f9069.c306629d.css" rel="prefetch"><link href="static/css/chunk-2e16d177.89936c18.css" rel="prefetch"><link href="static/css/chunk-360c43ba.c306629d.css" rel="prefetch"><link href="static/css/chunk-3f483335.7fbe318e.css" rel="prefetch"><link href="static/css/chunk-42236473.c306629d.css" rel="prefetch"><link href="static/css/chunk-5bc3d75d.c306629d.css" rel="prefetch"><link href="static/css/chunk-65f8ca6f.c306629d.css" rel="prefetch"><link href="static/css/chunk-7c62808c.c306629d.css" rel="prefetch"><link href="static/css/chunk-873a42e2.1951fa25.css" rel="prefetch"><link href="static/css/chunk-a85d3c1e.c8588555.css" rel="prefetch"><link href="static/css/chunk-a9d03770.c306629d.css" rel="prefetch"><link href="static/css/chunk-bab2e2c4.c306629d.css" rel="prefetch"><link href="static/js/chunk-066bbd34.3194df9d.js" rel="prefetch"><link href="static/js/chunk-111f3671.92b6a5d2.js" rel="prefetch"><link href="static/js/chunk-157f9069.85f4f4a4.js" rel="prefetch"><link href="static/js/chunk-16f9edc1.50c690ca.js" rel="prefetch"><link href="static/js/chunk-2d0c138b.d639e644.js" rel="prefetch"><link href="static/js/chunk-2d221bd2.79734f7b.js" rel="prefetch"><link href="static/js/chunk-2d2300ef.06454c78.js" rel="prefetch"><link href="static/js/chunk-2d230fe7.3bd3f709.js" rel="prefetch"><link href="static/js/chunk-2e16d177.a52bb75e.js" rel="prefetch"><link href="static/js/chunk-360c43ba.43f3f2df.js" rel="prefetch"><link href="static/js/chunk-3f483335.9805b6d5.js" rel="prefetch"><link href="static/js/chunk-42236473.b06437f4.js" rel="prefetch"><link href="static/js/chunk-5bc3d75d.16fd0651.js" rel="prefetch"><link href="static/js/chunk-65f8ca6f.cc68113a.js" rel="prefetch"><link href="static/js/chunk-733c35b2.7c9953cf.js" rel="prefetch"><link href="static/js/chunk-75f11c77.e5a5c7ca.js" rel="prefetch"><link href="static/js/chunk-78234ca2.a1ececd4.js" rel="prefetch"><link href="static/js/chunk-793f0082.b6b96c49.js" rel="prefetch"><link href="static/js/chunk-7c62808c.558ddec6.js" rel="prefetch"><link href="static/js/chunk-873a42e2.c668a1e2.js" rel="prefetch"><link href="static/js/chunk-a85d3c1e.c9dd4754.js" rel="prefetch"><link href="static/js/chunk-a9d03770.e66ccc01.js" rel="prefetch"><link href="static/js/chunk-bab2e2c4.5bb927b4.js" rel="prefetch"><link href="static/js/chunk-d0753fda.6c67deb1.js" rel="prefetch"><link href="static/css/chunk-vendors.ee57d822.css" rel="preload" as="style"><link href="static/css/index.187e8cba.css" rel="preload" as="style"><link href="static/js/chunk-vendors.d6404b06.js" rel="preload" as="script"><link href="static/js/index.3b2571ca.js" rel="preload" as="script"><link href="static/css/chunk-vendors.ee57d822.css" rel="stylesheet"><link href="static/css/index.187e8cba.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue-demo doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="static/js/chunk-vendors.d6404b06.js"></script><script src="static/js/index.3b2571ca.js"></script></body></html>

View File

@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-16f9edc1"],{"93fd":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.formLoading,expression:"formLoading"}],ref:"form",attrs:{model:e.form,"label-width":"100px",rules:e.rules}},[r("el-form-item",{attrs:{label:"标题:",prop:"title",required:""}},[r("el-input",{model:{value:e.form.title,callback:function(t){e.$set(e.form,"title",t)},expression:"form.title"}})],1),r("el-form-item",{attrs:{label:"内容:",prop:"content",required:""}},[r("el-input",{attrs:{type:"textarea",rows:"13"},model:{value:e.form.content,callback:function(t){e.$set(e.form,"content",t)},expression:"form.content"}})],1),r("el-form-item",{attrs:{label:"接收人:",required:""}},[r("el-select",{attrs:{multiple:"",filterable:"",remote:"","reserve-keyword":"",placeholder:"请输入用户名","remote-method":e.getUserByUserName,loading:e.selectLoading},model:{value:e.form.receiveUserIds,callback:function(t){e.$set(e.form,"receiveUserIds",t)},expression:"form.receiveUserIds"}},e._l(e.options,(function(e){return r("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("发送")]),r("el-button",{on:{click:e.resetForm}},[e._v("重置")])],1)],1)],1)},n=[],s=r("5530"),i=r("2f62"),a=r("c24f"),l=r("c443"),c={data:function(){return{form:{title:"",content:"",receiveUserIds:[]},formLoading:!1,selectLoading:!1,options:[],rules:{title:[{required:!0,message:"请输入消息标题",trigger:"blur"}],realName:[{required:!0,message:"请输入消息内容",trigger:"blur"}]}}},created:function(){},methods:Object(s["a"])({getUserByUserName:function(e){var t=this;""!==e?(t.selectLoading=!0,a["a"].selectByUserName(e).then((function(e){t.selectLoading=!1,t.options=e.response}))):t.options=[]},submitForm:function(){var e=this,t=this;this.$refs.form.validate((function(r){if(!r)return!1;e.formLoading=!0,l["a"].send(e.form).then((function(e){1===e.code?(t.$message.success(e.message),t.delCurrentView(t).then((function(){t.$router.push("/message/list")}))):(t.$message.error(e.message),t.formLoading=!1)})).catch((function(e){t.formLoading=!1}))}))},resetForm:function(){this.$refs["form"].resetFields(),this.form={title:"",content:"",receiveUserIds:[]}}},Object(i["b"])("tagsView",{delCurrentView:"delCurrentView"}))},m=c,u=r("2877"),f=Object(u["a"])(m,o,n,!1,null,null,null);t["default"]=f.exports},c443:function(e,t,r){"use strict";var o=r("b775");t["a"]={pageList:function(e){return Object(o["a"])("/api/admin/message/page",e)},send:function(e){return Object(o["a"])("/api/admin/message/send",e)}}}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-16f9edc1"],{"93fd":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.formLoading,expression:"formLoading"}],ref:"form",attrs:{model:e.form,"label-width":"100px",rules:e.rules}},[r("el-form-item",{attrs:{label:"标题:",prop:"title",required:""}},[r("el-input",{model:{value:e.form.title,callback:function(t){e.$set(e.form,"title",t)},expression:"form.title"}})],1),r("el-form-item",{attrs:{label:"内容:",prop:"content",required:""}},[r("el-input",{attrs:{type:"textarea",rows:"13"},model:{value:e.form.content,callback:function(t){e.$set(e.form,"content",t)},expression:"form.content"}})],1),r("el-form-item",{attrs:{label:"接收人:",required:""}},[r("el-select",{attrs:{multiple:"",filterable:"",remote:"","reserve-keyword":"",placeholder:"请输入用户名","remote-method":e.getUserByUserName,loading:e.selectLoading},model:{value:e.form.receiveUserIds,callback:function(t){e.$set(e.form,"receiveUserIds",t)},expression:"form.receiveUserIds"}},e._l(e.options,(function(e){return r("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("发送")]),r("el-button",{on:{click:e.resetForm}},[e._v("重置")])],1)],1)],1)},s=[],n=r("5530"),i=r("2f62"),a=r("c24f"),l=r("c443"),c={data:function(){return{form:{title:"",content:"",receiveUserIds:[]},formLoading:!1,selectLoading:!1,options:[],rules:{title:[{required:!0,message:"请输入消息标题",trigger:"blur"}],realName:[{required:!0,message:"请输入消息内容",trigger:"blur"}]}}},created:function(){},methods:Object(n["a"])({getUserByUserName:function(e){var t=this;""!==e?(t.selectLoading=!0,a["a"].selectByUserName(e).then((function(e){t.selectLoading=!1,t.options=e.response}))):t.options=[]},submitForm:function(){var e=this,t=this;this.$refs.form.validate((function(r){if(!r)return!1;e.formLoading=!0,l["a"].send(e.form).then((function(e){1===e.code?(t.$message.success(e.message),t.delCurrentView(t).then((function(){t.$router.push("/message/list")}))):(t.$message.error(e.message),t.formLoading=!1)})).catch((function(e){t.formLoading=!1}))}))},resetForm:function(){var e=this.form.id;this.$refs["form"].resetFields(),this.form={title:"",content:"",receiveUserIds:[]},this.form.id=e}},Object(i["b"])("tagsView",{delCurrentView:"delCurrentView"}))},m=c,u=r("2877"),f=Object(u["a"])(m,o,s,!1,null,null,null);t["default"]=f.exports},c443:function(e,t,r){"use strict";var o=r("b775");t["a"]={pageList:function(e){return Object(o["a"])("/api/admin/message/page",e)},send:function(e){return Object(o["a"])("/api/admin/message/send",e)}}}}]);