1 line
9.6 KiB
JavaScript
1 line
9.6 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-59c4ea8c"],{"9f91":function(e,t,l){"use strict";l.r(t);var r=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",{staticClass:"divBox"},[l("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[l("el-button",{staticClass:"mb20",attrs:{size:"small",type:"primary"},on:{click:e.onAdd}},[e._v("添加app版本")])],1),e._v(" "),l("el-card",{staticClass:"box-card"},[l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData.data,size:"small"}},[l("el-table-column",{attrs:{label:"ID",prop:"id","min-width":"100"}}),e._v(" "),l("el-table-column",{attrs:{label:"标题","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("span",[e._v(e._s(t.row.title.length>10?t.row.title.slice(0,9):t.row.title))])]}}])}),e._v(" "),l("el-table-column",{attrs:{label:"版本号",prop:"version","min-width":"100"}}),e._v(" "),l("el-table-column",{attrs:{label:"下载地址",prop:"dow_url","min-width":"200"}}),e._v(" "),l("el-table-column",{attrs:{label:"分类","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("span",[e._v(e._s(1==t.row.type?"Android":"IOS"))])]}}])}),e._v(" "),l("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"100"}}),e._v(" "),l("el-table-column",{attrs:{label:"操作","min-width":"100",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-button",{attrs:{type:"text",size:"small"},on:{click:function(l){return e.onSet(t.row)}}},[e._v("编辑")]),e._v(" "),l("el-button",{attrs:{type:"text",size:"small"},on:{click:function(l){return e.onDetail(t.row.id)}}},[e._v("详情")]),e._v(" "),l("el-button",{attrs:{type:"text",size:"small"},on:{click:function(l){return e.onDelete(t.row.id)}}},[e._v("删除")])]}}])})],1),e._v(" "),l("div",{staticClass:"block"},[l("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":e.tableFrom.limit,"current-page":e.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.handleSizeChange,"current-change":e.pageChange}})],1)],1),e._v(" "),e.dialogVisible?l("el-dialog",{attrs:{"before-close":e.handleClose,title:e.isExamine?"新增":"编辑",visible:e.dialogVisible,width:"700px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[l("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[l("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"120px"}},[l("el-form-item",{attrs:{label:"版本标题:",prop:"title"}},[l("el-input",{attrs:{placeholder:"请输入标题"},model:{value:e.ruleForm.title,callback:function(t){e.$set(e.ruleForm,"title",t)},expression:"ruleForm.title"}})],1),e._v(" "),l("el-form-item",{attrs:{label:"版本内容:",prop:"content"}},[l("el-input",{attrs:{placeholder:"请输入内容"},model:{value:e.ruleForm.content,callback:function(t){e.$set(e.ruleForm,"content",t)},expression:"ruleForm.content"}})],1),e._v(" "),l("el-form-item",{attrs:{label:"系统类型:",prop:"type"}},[l("el-radio-group",{model:{value:e.ruleForm.type,callback:function(t){e.$set(e.ruleForm,"type",t)},expression:"ruleForm.type"}},[l("el-radio",{attrs:{label:2}},[e._v("IOS")]),e._v(" "),l("el-radio",{attrs:{label:1}},[e._v("Android")])],1)],1),e._v(" "),l("el-form-item",{attrs:{label:"更新类型:",prop:"is_wgt"}},[l("el-radio-group",{model:{value:e.ruleForm.is_wgt,callback:function(t){e.$set(e.ruleForm,"is_wgt",t)},expression:"ruleForm.is_wgt"}},[l("el-radio",{attrs:{label:0}},[e._v("app安装包更新")]),e._v(" "),l("el-radio",{attrs:{label:1}},[e._v("wgt热更新")])],1)],1),e._v(" "),l("el-form-item",{attrs:{label:"版本号",prop:"version"}},[l("el-input",{attrs:{placeholder:"版本号"},model:{value:e.ruleForm.version,callback:function(t){e.$set(e.ruleForm,"version",t)},expression:"ruleForm.version"}})],1),e._v(" "),l("el-form-item",{attrs:{label:"下载地址",prop:"dow_url"}},[l("el-input",{attrs:{placeholder:"下载地址"},model:{value:e.ruleForm.dow_url,callback:function(t){e.$set(e.ruleForm,"dow_url",t)},expression:"ruleForm.dow_url"}})],1),e._v(" "),l("el-form-item",{attrs:{label:"强制更新:",prop:"force"}},[l("el-radio-group",{model:{value:e.ruleForm.force,callback:function(t){e.$set(e.ruleForm,"force",t)},expression:"ruleForm.force"}},[l("el-radio",{attrs:{label:0}},[e._v("否")]),e._v(" "),l("el-radio",{attrs:{label:1}},[e._v("是")])],1)],1),e._v(" "),l("el-form-item",{attrs:{label:"静默更新:",prop:"quiet"}},[l("el-radio-group",{model:{value:e.ruleForm.quiet,callback:function(t){e.$set(e.ruleForm,"quiet",t)},expression:"ruleForm.quiet"}},[l("el-radio",{attrs:{label:0}},[e._v("否")]),e._v(" "),l("el-radio",{attrs:{label:1}},[e._v("是")])],1)],1),e._v(" "),l("el-form-item",[l("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onSubmit(e.formData)}}},[e._v("提交")])],1)],1)],1)]):e._e(),e._v(" "),e.dialogVisible1?l("el-dialog",{attrs:{"before-close":e.handleClose1,title:"详情",visible:e.dialogVisible1,width:"700px"},on:{"update:visible":function(t){e.dialogVisible1=t}}},[l("el-form",{ref:"ruleForm1",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm1,"label-width":"120px"}},[l("el-form-item",{attrs:{label:"标题:"}},[e._v("\n "+e._s(e.ruleForm1.title)+"\n\n ")]),e._v(" "),l("el-form-item",{attrs:{label:"上传内容:"}},[e._v("\n "+e._s(e.ruleForm1.content)+"\n ")]),e._v(" "),l("el-form-item",{attrs:{label:"类型:"}},[l("el-radio-group",{model:{value:e.ruleForm1.type,callback:function(t){e.$set(e.ruleForm1,"type",t)},expression:"ruleForm1.type"}},[l("el-radio",{attrs:{label:2}},[e._v("IOS")]),e._v(" "),l("el-radio",{attrs:{label:1}},[e._v("Android")])],1)],1),e._v(" "),l("el-form-item",{attrs:{label:"手机平台"}},[e._v("\n "+e._s(e.ruleForm1.phone_brand)+"\n ")]),e._v(" "),l("el-form-item",{attrs:{label:"下载地址"}},[e._v("\n "+e._s(e.ruleForm1.dow_url)+"\n ")]),e._v(" "),l("el-form-item",[l("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogVisible1=!1}}},[e._v("确定")])],1)],1)],1):e._e()],1)},a=[],i=l("ade3"),o=l("b562"),s=(l("3dbf"),l("bbcc")),n=l("5f87"),u={name:"communityTopic",data:function(){return{moren:l("cdfe"),colors:["#99A9BF","#F7BA2A","#FF9900"],listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20},fileList:[],headers:{},dialogVisible1:!1,dialogVisible:!1,loading:!1,formData:{},rules:{type:[{required:!0,message:"请选择审核状态",trigger:"change"}],title:[{required:!0,message:"请填写标题",trigger:"blur"}],content:[{required:!0,message:"请填写版本内容",trigger:"blur"}],phone_brand:[{required:!0,message:"请填写手机平台",trigger:"blur"}],version:[{required:!0,message:"请填写版本号",trigger:"blur"}],dow_url:[{required:!0,message:"请填写下载地址",trigger:"blur"}],is_wgt:[{required:!0,message:"请选择更新类型",trigger:"blur"}],force:[{required:!0,message:"请选择是否强制更新",trigger:"blur"}],quiet:[{required:!0,message:"请选择是否静默更新",trigger:"blur"}]},myHeaders:{"X-Token":Object(n["a"])()},ruleForm:Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({title:"",type:1},"title",""),"phone_brand",""),"version",""),"dow_url",""),"is_wgt",0),"force",0),"quiet",0),ruleForm1:{},id:0}},computed:{fileUrl:function(){return s["a"].https+"/upload/app"}},mounted:function(){this.getList()},methods:{handleSuccess:function(e){200===e.status?(this.$message.success("上传成功"),console.log(e),this.ruleForm.dow_url=e.data.src):this.$message.error(e.message)},change:function(e){this.$forceUpdate()},getList:function(e){var t=this;this.listLoading=!0,this.tableFrom.page=e||this.tableFrom.page,Object(o["e"])(this.tableFrom).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},pageChange:function(e){this.tableFrom.page=e,this.getList("")},handleSizeChange:function(e){this.tableFrom.limit=e,this.getList("")},onAdd:function(){this.isExamine=!0,this.ruleForm={},this.dialogVisible=!0},onSet:function(e){this.isExamine=!1,this.dialogVisible=!0,this.ruleForm=e,this.id=e.id},onSubmit:function(e){var t=this;this.isExamine?Object(o["a"])(this.ruleForm).then((function(e){t.$message.success(e.message),t.dialogVisible=!1,t.formData=e.data,t.getList(),t.$forceUpdate()})).catch((function(e){var l=e.message;t.dialogVisible=!1,t.$message.error(l)})):Object(o["d"])(this.id,this.ruleForm).then((function(e){t.$message.success(e.message),t.dialogVisible=!1,t.getList(),t.ruleForm.refusal="",t.formData=e.data})).catch((function(e){var l=e.message;t.dialogVisible=!1,t.$message.error(l)}))},handleClose:function(){this.dialogVisible=!1,this.ruleForm=Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({title:"",type:1},"title",""),"phone_brand",""),"version",""),"dow_url","")},handleClose1:function(){this.dialogVisible1=!1,this.ruleForm1={}},onDelete:function(e){var t=this;Object(o["b"])(e).then((function(e){t.$message.success(e.message),t.getList()})).catch((function(e){var l=e.message;t.$message.error(l)}))},onDetail:function(e){var t=this;this.dialogVisible1=!0,Object(o["c"])(e).then((function(e){t.ruleForm1=e.data})).catch((function(e){var l=e.message;t.$message.error(l)}))}}},c=u,m=(l("b3cc"),l("2877")),d=Object(m["a"])(c,r,a,!1,null,"55b426c8",null);t["default"]=d.exports},b3cc:function(e,t,l){"use strict";l("f1f9")},cdfe:function(e,t,l){e.exports=l.p+"system/img/f.5aa43cd3.png"},f1f9:function(e,t,l){}}]); |