qy-renren-qt/dist/2209301437/static/js/23.js

1 line
7.0 KiB
JavaScript
Raw Normal View History

2022-09-30 14:43:03 +08:00
webpackJsonp([23,43],{"3Jec":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={data:function(){return{visible:!1,dataForm:{id:0,dictTypeId:"",typeCode:"",dataCode:"",dataName:"",remark:""},dataRule:{dataCode:[{required:!0,message:"字典编码不能为空",trigger:"blur"}],dataName:[{required:!0,message:"字典名称不能为空",trigger:"blur"}]}}},methods:{init:function(t,e,a){var r=this;this.dataForm.id=t||"",this.dataForm.dictTypeId=e,this.dataForm.typeCode=a,this.visible=!0,this.$nextTick(function(){r.$refs.dataForm.resetFields(),r.dataForm.id&&r.$http({url:r.$http.adornUrl("/work/mtsysdictdata/info/"+r.dataForm.id),method:"get",params:r.$http.adornParams()}).then(function(t){var e=t.data;e&&0===e.code&&(r.dataForm=e.mtSysDictData)})})},dataFormSubmit:function(){var t=this;this.$refs.dataForm.validate(function(e){e&&t.$http({url:t.$http.adornUrl("/work/mtsysdictdata/"+(t.dataForm.id?"update":"save")),method:"post",data:t.$http.adornData({id:t.dataForm.id||void 0,dictTypeId:t.dataForm.dictTypeId,typeCode:t.dataForm.typeCode,dataCode:t.dataForm.dataCode,dataName:t.dataForm.dataName,remark:t.dataForm.remark})}).then(function(e){var a=e.data;a&&0===a.code?t.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}}):t.$message.error(a.msg)})})}}},d={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{title:t.dataForm.id?"修改":"新增","close-on-click-modal":!1,visible:t.visible},on:{"update:visible":function(e){t.visible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"80px"},nativeOn:{keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.dataFormSubmit()}}},[a("el-form-item",{attrs:{label:"字典编码",prop:"dataCode"}},[a("el-input",{attrs:{placeholder:"字典编码",clearable:""},model:{value:t.dataForm.dataCode,callback:function(e){t.$set(t.dataForm,"dataCode",e)},expression:"dataForm.dataCode"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"字典名称",prop:"dataName"}},[a("el-input",{attrs:{placeholder:"字典名称",clearable:""},model:{value:t.dataForm.dataName,callback:function(e){t.$set(t.dataForm,"dataName",e)},expression:"dataForm.dataName"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"remark"}},[a("el-input",{attrs:{placeholder:"备注",clearable:""},model:{value:t.dataForm.remark,callback:function(e){t.$set(t.dataForm,"remark",e)},expression:"dataForm.remark"}})],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.visible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dataFormSubmit()}}},[t._v("确定")])],1)],1)},staticRenderFns:[]},i=a("VU/8")(r,d,!1,null,null,null);e.default=i.exports},BfEN:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={data:function(){return{dataForm:{key:"",dictTypeId:"",typeCode:""},dataList:[],pageIndex:1,pageSize:10,totalPage:0,dataListLoading:!1,addOrUpdateVisible:!1}},components:{AddOrUpdate:a("3Jec").default},created:function(){this.dataForm.dictTypeId=this.$route.query.dictTypeId,this.dataForm.typeCode=this.$route.query.typeCode,this.getDataList()},methods:{getDataList:function(){var t=this;this.dataListLoading=!0,this.$http({url:this.$http.adornUrl("/work/mtsysdictdata/list"),method:"get",params:this.$http.adornParams({page:this.pageIndex,limit:this.pageSize,dictTypeId:this.dataForm.dictTypeId,key:this.dataForm.key})}).then(function(e){var a=e.data;a&&0===a.code?(t.dataList=a.page.list,t.totalPage=a.page.totalCount):(t.dataList=[],t.totalPage=0),t.dataListLoading=!1})},sizeChangeHandle:function(t){this.pageSize=t,this.pageIndex=1,this.getDataList()},currentChangeHandle:function(t){this.pageIndex=t,this.getDataList()},addOrUpdateHandle:function(t){var e=this;this.addOrUpdateVisible=!0,this.$nextTick(function(){e.$refs.addOrUpdate.init(t,e.dataForm.dictTypeId,e.dataForm.type