1 line
3.7 KiB
JavaScript
1 line
3.7 KiB
JavaScript
|
"use strict";(self["webpackChunkwx_manage"]=self["webpackChunkwx_manage"]||[]).push([[6396],{56396:function(t,e,r){r.r(e),r.d(e,{default:function(){return m}});var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-dialog",{attrs:{title:t.dataForm.id?"修改":"新增","close-on-click-modal":!1,visible:t.visible},on:{"update:visible":function(e){t.visible=e}}},[r("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"80px"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.dataFormSubmit()}}},[r("p",{staticStyle:{"text-align":"center",margin:"50px 0 20px"}},[t._v("使用 scoped-slot 自定义数据项")]),r("div",{staticStyle:{"text-align":"center"}},[r("el-transfer",{staticStyle:{"text-align":"left",display:"inline-block"},attrs:{filterable:"","left-default-checked":[2,3],"right-default-checked":[1],titles:["Source","Target"],"button-texts":["到左边","到右边"],format:{noChecked:"${total}",hasChecked:"${checked}/${total}"},data:t.data},on:{change:t.handleChange},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.option;return r("span",{},[t._v(t._s(a.key)+" - "+t._s(a.label))])}}]),model:{value:t.value4,callback:function(e){t.value4=e},expression:"value4"}},[r("el-button",{staticClass:"transfer-footer",attrs:{slot:"left-footer",size:"small"},slot:"left-footer"},[t._v("操作")]),r("el-button",{staticClass:"transfer-footer",attrs:{slot:"right-footer",size:"small"},slot:"right-footer"},[t._v("操作")])],1)],1)]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(e){t.visible=!1}}},[t._v("取消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.dataFormSubmit()}}},[t._v("确定")])],1)],1)},o=[],s=r(89176),i=r(62015),l={data(){var t=(t,e,r)=>{(0,s._7)(e)?r():r(new Error("请输入8位身份码(数字)"))},e=(t,e,r)=>{(0,s.tq)(e)?r():r(new Error("手机号格式不正确"))};return{visible:!1,roleList:[],dataForm:{id:0,dormitory:"",dormitoryNum:"",dormitoryType:0,dormitoryStatus:0},identityes:["管理员","研究生","本校老师","外校老师"],groupIdes:[],dataRule:{userName:[{required:!0,message:"学生名不能为空",trigger:"blur"}],userId:[{required:!0,message:"身份码不能为空",trigger:"blur"},{validator:t,trigger:"blur"}],studentId:[{required:!0,message:"学生学号不能为空",trigger:"blur"}],phone:[{required:!0,message:"手机号不能为空",trigger:"blur"},{validator:e,trigger:"blur"}]}}},methods:{init(t){i.Z.getGroupList2(this).then((t=>{this.groupIdes=t.data.list})),this.dataForm.id=t||0,this.$http({url:this.$http.adornUrl("/sys/role/select"),method:"get",params:this.$http.adornParams()}).then((({data:t})=>{this.roleList=t&&200===t.code?t.list:[]})).then((()=>{this.visible=!0,this.$nextTick((()=>{this.$refs["dataForm"].resetFields()}))})).then((()=>{this.dataForm.id&&(console.log("this.dataForm.id",this.dataForm.id),this.$http({url:this.$http.adornUrl(`/excel/info/${this.dataForm.id}`),method:"get",params:this.$http.adornParams()}).then((({data:t})=>{console.log(t),t&&200===t.code&&(this.dataForm.dormitoryType=parseInt(t.user.dormitoryType),this.dataForm.dormitory=t.user.dormitory,this.dataForm.dormitoryNum=t.user.dormitoryNum,this.dataForm.dormitoryStatus=parseInt(t.user.dormitoryStatus))})))}))},dataFormSubmit(){}}},d=l,n=r(1001),u=(0,n.Z)(d,a,o,!1,null,null,null),m=u.exports},62015:function(t,e,r){r(57658);e["Z"]={getGroupList(t){t.$http({url:t.$http.adornUrl("/group/list"),method:"get",params:t.$http.adornParams()}).then((e=>{e.data.list.forEach((e=>{t.groupIdes.push({text:e.name,id:e.id,value:e.id})}))}))},getGroupList2(t){return t.$http({url:t.$http.adornUrl("/group/list"),method:"get",params:t.$http.adornParams()})}}}}]);
|