You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
14 KiB
1 line
14 KiB
{"version":3,"sources":["webpack:///./src/views/basic/page/buildingManagement.vue","webpack:///src/views/basic/page/buildingManagement.vue","webpack:///./src/views/basic/page/buildingManagement.vue?b503","webpack:///./src/views/basic/page/buildingManagement.vue?b2dc"],"names":["render","_vm","this","_c","_self","staticClass","_m","attrs","on","$event","addBuild","_v","ref","config","tableCheck","slot","revise","table_row","del","drawerTitle","drawer_vrisible","drawerClose","staticStyle","reviseForm","ruleSubmit","onSubmit","staticRenderFns","data","bool","drawerControl","thead","label","type","width","prop","url","pageNum","size","search_item","placeholder","ruleForm","code","name","no","rules","required","message","trigger","form_item","methods","buildingInsert","then","res","console","catch","error","id","buildingUpdate","getData","disabled","arr","confirmButtonText","cancelButtonText","confirmButtonClass","cancelButtonClass","action","component"],"mappings":"uHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAACJ,EAAIK,GAAG,GAAGH,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,MAAM,CAACE,YAAY,eAAe,CAACF,EAAG,YAAY,CAACE,YAAY,cAAcE,MAAM,CAAC,KAAO,gBAAgBC,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOR,EAAIS,cAAc,CAACT,EAAIU,GAAG,WAAW,GAAGR,EAAG,WAAW,CAACS,IAAI,QAAQL,MAAM,CAAC,OAASN,EAAIY,QAAQL,GAAG,CAAC,WAAaP,EAAIa,aAAa,CAACX,EAAG,WAAW,CAACY,KAAK,UAAU,CAACZ,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAACF,EAAG,SAAS,CAACK,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOR,EAAIe,OAAOf,EAAIgB,cAAc,CAAChB,EAAIU,GAAG,QAAQR,EAAG,SAAS,CAACK,GAAG,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AEA,CACAF,WACAD,aACAQ,kBACAL,aAKAjB,aACAM,YACAiB,UACAC,UACAC,UACAC,SAEAC,OACAH,MACA,CACAI,YACAC,kBACAC,iBAGAJ,IACA,CAAAE,YAAAC,kBAAAC,iBAEAL,MACA,CACAG,YACAC,kBACAC,kBAIAC,WASA,CACAhB,WACAD,aACAQ,kBACAN,aACAC,WAEA,CACAF,aACAD,aACAQ,kBACAN,aACAC,iBAMAe,SAIAzB,cACA,aAGAC,WAKA,GADA,kCACA,UACA,uBAEA,OACAkB,yCACAD,oCAEAQ,kBACAC,KAAAC,IACAC,eACA,WACA,eACAP,kBACAd,iBAEA,eACA,sBAEAsB,MAAAC,IACAF,qBAEA,CAEA,OACAG,wBACAb,yCACAD,oCAEAe,kBACAN,KAAAC,IACAC,eACA,WACA,eACAP,kBACAd,iBAEA,eACA,sBAGAsB,MAAAC,IACAF,mBAKAvC,cACA,kBAEA4C,UAEA,6BAGArC,cAIAgC,wCAEA,6BACA,sCACA,+BAEA,oBACA,kCAEA,yBAEA3C,WACA,sBACA,wBACA,yBAGAM,UAEA,GADAqC,gBACA,SAOA,YADA,kCALA,cAEA,YADA,gCAOA,OACArB,aACAD,aACAQ,kBACAoB,YACA1B,aACAC,aAEA,wCACA,sBACA,wBACA,wBACA,wCACA,wCACA,qCAGAhB,OACA,aACA,SACA,wCACA0C,6BAEA,oCACAC,uBACAC,sBACAC,mCACAC,mCACAb,KAAA,KACA,kCACAG,MAAAW,YAEA,qCC9Q0X,I,YCOtXC,EAAY,eACd,EACAlE,EACA0B,GACA,EACA,KACA,WACA,MAIa,aAAAwC,E","file":"js/chunk-2d21eb2c.1e230304.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"main-content\"},[_vm._m(0),_c('div',{staticClass:\"content\"},[_c('div',{staticClass:\"content-btn\"},[_c('el-button',{staticClass:\"init-button\",attrs:{\"icon\":\"el-icon-plus\"},on:{\"click\":function($event){return _vm.addBuild()}}},[_vm._v(\"新增楼栋\")])],1),_c('VueTable',{ref:\"table\",attrs:{\"config\":_vm.config},on:{\"tableCheck\":_vm.tableCheck}},[_c('template',{slot:\"footer\"},[_c('div',{staticClass:\"table-footer\"},[_c('button',{on:{\"click\":function($event){return _vm.revise(_vm.table_row)}}},[_vm._v(\"修改\")]),_c('button',{on:{\"click\":function($event){return _vm.del(_vm.table_row)}}},[_vm._v(\"删除\")])])])],2)],1),_c('Drawer',{attrs:{\"drawerTitle\":_vm.drawerTitle,\"drawerVrisible\":_vm.drawer_vrisible},on:{\"drawerClose\":_vm.drawerClose}},[_c('div',{staticStyle:{\"padding\":\"30px\"}},[_c('FromCard',[_c('template',{slot:\"title\"},[_vm._v(\"基本信息\")]),[_c('VueForm',{ref:\"childFrom\",attrs:{\"formObj\":_vm.reviseForm},on:{\"ruleSubmit\":_vm.ruleSubmit}})]],2)],1),_c('div',{attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('button',{staticClass:\"btn-orange\",on:{\"click\":function($event){return _vm.onSubmit()}}},[_c('span',[_c('i',{staticClass:\"el-icon-circle-check\"}),_vm._v(\"提交\")])]),_c('button',{staticClass:\"btn-gray\",on:{\"click\":_vm.drawerClose}},[_c('span',[_vm._v(\"取消\")])])])])],1)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"main-titel\"},[_c('span',[_vm._v(\"楼栋信息\")])])\n}]\n\nexport { render, staticRenderFns }","<template>\n <div class=\"main-content\">\n <div class=\"main-titel\">\n <span>楼栋信息</span>\n </div>\n <div class=\"content\">\n <div class=\"content-btn\">\n <el-button class=\"init-button\"\n @click=\"addBuild()\"\n icon=\"el-icon-plus\">新增楼栋</el-button>\n </div>\n <VueTable ref=\"table\"\n :config='config'\n @tableCheck=\"tableCheck\">\n <template slot=\"footer\">\n <div class=\"table-footer\">\n <button @click=\"revise(table_row)\">修改</button>\n <button @click=\"del(table_row)\">删除</button>\n </div>\n </template>\n </VueTable>\n </div>\n <Drawer :drawerTitle=\"drawerTitle\"\n @drawerClose=\"drawerClose\"\n :drawerVrisible='drawer_vrisible'>\n <div style=\"padding:30px\">\n <FromCard>\n <template slot=\"title\">基本信息</template>\n <template>\n <VueForm ref=\"childFrom\"\n @ruleSubmit='ruleSubmit'\n :formObj='reviseForm'></VueForm>\n </template>\n </FromCard>\n </div>\n <div slot=\"footer\">\n <button class=\"btn-orange\"\n @click=\"onSubmit()\"><span> <i class=\"el-icon-circle-check\"></i>提交</span></button>\n <button class=\"btn-gray\"\n @click=\"drawerClose\"><span>取消</span></button>\n </div>\n </Drawer>\n </div>\n</template>\n<script>\nimport { buildingInsert, buildingUpdate } from '@/api/basic'\nexport default {\n data () {\n return {\n // 抽屉标题\n drawerTitle: '',\n // 是否通过校验\n bool: false,\n // 抽屉显示隐藏\n drawer_vrisible: false,\n // 控制弹窗为添加或修改 默认为true 添加\n drawerControl: true,\n config: {\n thead: [\n { label: '序号', type: 'index', width: '80' },\n { label: '楼栋号', prop: 'no', width: 'auto' },\n { label: '楼栋名称', prop: 'name', width: 'auto' },\n { label: '楼栋ID', prop: 'code', width: 'auto' },\n { label: '导入编号', prop: 'id', width: 'auto' },\n ],\n url: 'buildList',\n data: {\n pageNum: 1,\n size: 10,\n },\n search_item: [\n {\n type: 'Input',\n label: '楼栋名称',\n placeholder: '请输入内容',\n prop: 'name'\n },\n {\n type: 'Int',\n label: '楼栋编号',\n placeholder: '请输入',\n prop: 'no'\n }\n ],\n },\n // 选中表格数据\n table_row: [],\n reviseForm: {\n ruleForm: {\n code: null,\n name: null,\n no: null\n },\n rules: {\n code: [\n {\n required: true,\n message: '请填写楼栋名称',\n trigger: 'blur'\n }\n ],\n no: [\n { required: true, message: '请填写楼栋编号', trigger: 'blur' }\n ],\n name: [\n {\n required: true,\n message: '请填写楼栋名称',\n trigger: 'blur'\n }\n ]\n },\n form_item: [\n // {\n // type: 'Input',\n // label: '楼栋ID',\n // placeholder: '请输入',\n // disabled: true,\n // width: '100%',\n // prop: 'code'\n // },\n {\n type: 'Int',\n label: '楼栋编号',\n placeholder: '请输入',\n width: '100%',\n prop: 'no'\n },\n {\n type: 'Input',\n label: '楼栋名称',\n placeholder: '请输入',\n width: '100%',\n prop: 'name'\n }\n ]\n },\n }\n },\n methods: {\n /**\n * 监听提交验证是否通过\n * */\n ruleSubmit (val) {\n this.bool = val;\n },\n // 增加或修改\n onSubmit () {\n /**\n * 检查form表单校验 调用子组件方法验证\n * */\n this.$refs.childFrom.submitForm();\n if (this.bool) {\n if (this.drawerControl) {\n // 添加\n let requestData = {\n no: parseInt(this.reviseForm.ruleForm.no),\n name: this.reviseForm.ruleForm.name,\n }\n buildingInsert(requestData)\n .then((res) => {\n console.log(res)\n if (res.status) {\n this.$message({\n message: res.message,\n type: 'success'\n })\n this.getData()\n this.drawerClose()\n }\n }).catch((error) => {\n console.log(error)\n })\n } else {\n // 修改\n let requestData = {\n id: this.table_row[0].id,\n no: parseInt(this.reviseForm.ruleForm.no),\n name: this.reviseForm.ruleForm.name,\n }\n buildingUpdate(requestData)\n .then((res) => {\n console.log(res)\n if (res.status) {\n this.$message({\n message: res.message,\n type: 'success'\n })\n this.getData()\n this.drawerClose()\n }\n })\n .catch((error) => {\n console.log(error)\n })\n }\n }\n },\n tableCheck (arr) {\n this.table_row = arr\n },\n getData () {\n // 调用子组件的方法\n this.$refs.table.loadData()\n },\n // 弹窗关闭\n drawerClose () {\n /****\n * 关闭弹窗 调用子组件重置事件清空状态 在修改传入的值是重置不了 手动重置\n */\n console.log(this.$refs.childFrom.reset)\n\n this.$refs.childFrom.reset();\n for (let key in this.reviseForm.ruleForm) {\n this.reviseForm.ruleForm[key] = ''\n }\n if (!this.drawerControl) {\n this.reviseForm.form_item.shift();\n }\n this.drawer_vrisible = false\n },\n addBuild () {\n this.drawerControl = true;\n this.drawer_vrisible = true\n this.drawerTitle = '添加楼栋'\n },\n // 修改\n revise (data) {\n console.log(data)\n if (data.length) {\n if (data.length > 1) {\n this.$message.error('只能单条数据修改')\n return\n }\n } else {\n this.$message.error('请选中需要修改的数据')\n return\n }\n let obj = {\n type: 'Input',\n label: '楼栋ID',\n placeholder: '请输入',\n disabled: true,\n width: '100%',\n prop: 'code'\n }\n this.reviseForm.form_item.splice(0, 0, obj)\n this.drawerControl = false;\n this.drawerTitle = '修改楼栋'\n this.drawer_vrisible = true\n this.reviseForm.ruleForm.code = data[0].code\n this.reviseForm.ruleForm.name = data[0].name\n this.reviseForm.ruleForm.no = data[0].no\n },\n // 删除\n del (data) {\n if (data.length) {\n let arr = []\n for (let i = 0; i < this.table_row.length; i++) {\n arr.push(this.table_row[i].id)\n }\n this.$confirm('是否确认删除?删除不可恢复', '删除', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n confirmButtonClass: 'confirmButton',\n cancelButtonClass: 'cancelButton'\n }).then(() => {\n this.$refs.table.tableDelete(arr)\n }).catch(action => { });\n } else {\n this.$message.error('请选中需要删除的数据');\n }\n },\n }\n}\n</script>\n<style scoped lang='scss'>\n</style>\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./buildingManagement.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./buildingManagement.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./buildingManagement.vue?vue&type=template&id=78134178&scoped=true&\"\nimport script from \"./buildingManagement.vue?vue&type=script&lang=js&\"\nexport * from \"./buildingManagement.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"78134178\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} |