qy-renren-qt/dist/2209300913/static/js/31.js

1 line
6.8 KiB
JavaScript
Raw Normal View History

2022-09-30 09:18:17 +08:00
webpackJsonp([31,52],{"/caQ":function(a,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={data:function(){return{visible:!1,dataForm:{id:0,paramKey:"",paramValue:"",remark:""},dataRule:{paramKey:[{required:!0,message:"参数名不能为空",trigger:"blur"}],paramValue:[{required:!0,message:"参数值不能为空",trigger:"blur"}]}}},methods:{init:function(a){var t=this;this.dataForm.id=a||0,this.visible=!0,this.$nextTick(function(){t.$refs.dataForm.resetFields(),t.dataForm.id&&t.$http({url:t.$http.adornUrl("/sys/config/info/"+t.dataForm.id),method:"get",params:t.$http.adornParams()}).then(function(a){var e=a.data;e&&0===e.code&&(t.dataForm.paramKey=e.config.paramKey,t.dataForm.paramValue=e.config.paramValue,t.dataForm.remark=e.config.remark)})})},dataFormSubmit:function(){var a=this;this.$refs.dataForm.validate(function(t){t&&a.$http({url:a.$http.adornUrl("/sys/config/"+(a.dataForm.id?"update":"save")),method:"post",data:a.$http.adornData({id:a.dataForm.id||void 0,paramKey:a.dataForm.paramKey,paramValue:a.dataForm.paramValue,remark:a.dataForm.remark})}).then(function(t){var e=t.data;e&&0===e.code?a.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){a.visible=!1,a.$emit("refreshDataList")}}):a.$message.error(e.msg)})})}}},n={render:function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("el-dialog",{attrs:{title:a.dataForm.id?"修改":"新增","close-on-click-modal":!1,visible:a.visible},on:{"update:visible":function(t){a.visible=t}}},[e("el-form",{ref:"dataForm",attrs:{model:a.dataForm,rules:a.dataRule,"label-width":"80px"},nativeOn:{keyup:function(t){if(!("button"in t)&&a._k(t.keyCode,"enter",13,t.key,"Enter"))return null;a.dataFormSubmit()}}},[e("el-form-item",{attrs:{label:"参数名",prop:"paramKey"}},[e("el-input",{attrs:{placeholder:"参数名"},model:{value:a.dataForm.paramKey,callback:function(t){a.$set(a.dataForm,"paramKey",t)},expression:"dataForm.paramKey"}})],1),a._v(" "),e("el-form-item",{attrs:{label:"参数值",prop:"paramValue"}},[e("el-input",{attrs:{placeholder:"参数值"},model:{value:a.dataForm.paramValue,callback:function(t){a.$set(a.dataForm,"paramValue",t)},expression:"dataForm.paramValue"}})],1),a._v(" "),e("el-form-item",{attrs:{label:"备注",prop:"remark"}},[e("el-input",{attrs:{placeholder:"备注"},model:{value:a.dataForm.remark,callback:function(t){a.$set(a.dataForm,"remark",t)},expression:"dataForm.remark"}})],1)],1),a._v(" "),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(t){a.visible=!1}}},[a._v("取消")]),a._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:function(t){a.dataFormSubmit()}}},[a._v("确定")])],1)],1)},staticRenderFns:[]},i=e("VU/8")(r,n,!1,null,null,null);t.default=i.exports},MKmw:function(a,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={data:function(){return{dataForm:{paramKey:""},dataList:[],pageIndex:1,pageSize:10,totalPage:0,dataListLoading:!1,dataListSelections:[],addOrUpdateVisible:!1}},components:{AddOrUpdate:e("/caQ").default},activated:function(){this.getDataList()},methods:{getDataList:function(){var a=this;this.dataListLoading=!0,this.$http({url:this.$http.adornUrl("/sys/config/list"),method:"get",params:this.$http.adornParams({page:this.pageIndex,limit:this.pageSize,paramKey:this.dataForm.paramKey})}).then(function(t){var e=t.data;e&&0===e.code?(a.dataList=e.page.list,a.totalPage=e.page.totalCount):(a.dataList=[],a.totalPage=0),a.dataListLoading=!1})},sizeChangeHandle:function(a){this.pageSize=a,this.pageIndex=1,this.getDataList()},currentChangeHandle:function(a){this.pageIndex=a,this.getDataList()},selectionChangeHandle:function(a){this.dataListSelections=a},addOrUpdateHandle:function(a){var t=this;this.addOrUpdateVisible=!0,this.$nextTick(function(){t.$refs.addOrUpdate.init(a)})},deleteHandle:function(a){var t=this,e=a?[a]:this.dataListSelections.map(function(a){return a.id});this.$confirm("确定对[id="+e.join(",")+"]进行["+(a?"删除":"批量删除")+"]操作?","提示",{confirmButtonText:"