1 line
9.6 KiB
JSON
1 line
9.6 KiB
JSON
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\sys\\area-add-or-update.vue?vue&type=style&index=0&id=709efeab&lang=scss&scoped=true&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\sys\\area-add-or-update.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\css-loader\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\sass-loader\\lib\\loader.js","mtime":1533139052000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.el-dialog {\n .el-form {\n .el-form-item {\n .el-date-editor--date,\n .el-cascader,\n .el-select {\n width: 100%;\n }\n }\n }\n}\n",{"version":3,"sources":["area-add-or-update.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"area-add-or-update.vue","sourceRoot":"src/views/modules/sys","sourcesContent":["<template>\n <el-dialog\n :title=\"type=='post'?'新建':'修改'\"\n :visible.sync=\"dialogVisible\"\n :close-on-click-modal=\"false\"\n >\n <div>\n <el-form ref=\"dataForm\" :model=\"dataForm\" :rules=\"rules\" label-width=\"100px\">\n <el-row>\n <el-col :span=\"12\">\n <el-form-item label=\"区域名称\" prop=\"rcName\">\n <el-input v-model.trim=\"dataForm.rcName\" placeholder=\"请输入\"></el-input>\n </el-form-item>\n </el-col>\n <el-col :span=\"11\" :offset=\"1\">\n <el-form-item label=\"区域编号\" prop=\"rcNo\">\n <el-input v-model=\"dataForm.rcNo\" placeholder=\"请输入\"></el-input>\n </el-form-item>\n </el-col>\n </el-row>\n <el-row>\n <el-col :span=\"12\">\n <el-form-item label=\"区域位置\" prop=\"rcAddress\">\n <el-input v-model=\"dataForm.rcAddress\" placeholder=\"请输入\"></el-input>\n </el-form-item>\n </el-col>\n <el-col :span=\"11\" :offset=\"1\">\n <el-form-item label=\"楼层/楼栋\" prop=\"rcFloor\">\n <el-cascader v-model=\"dataForm.rcFloor\" clearable placeholder=\"请选择\" :options=\"buildList\" :props=\"{value:'df_floorid',label:'df_floorname'}\"></el-cascader>\n </el-form-item>\n </el-col>\n </el-row>\n <el-row>\n <el-col :span=\"12\">\n <el-form-item label=\"区域围栏\" prop=\"rcFenceId\">\n <el-select v-model=\"dataForm.rcFenceId\" placeholder=\"请选择\" clearable>\n <el-option\n v-for=\"item in fenceList\"\n :key=\"item.id\"\n :label=\"item.fenceName\"\n :value=\"item.id\"\n ></el-option>\n </el-select>\n </el-form-item>\n </el-col>\n <el-col :span=\"11\" :offset=\"1\">\n <el-form-item label=\"类别\" prop=\"rcType\">\n <el-select v-model=\"dataForm.rcType\" placeholder=\"请选择\" clearable>\n <el-option\n v-for=\"item in areaList\"\n :key=\"item.dictLabel\"\n :label=\"item.dictLabel\"\n :value=\"item.dictValue\"\n ></el-option>\n </el-select>\n </el-form-item>\n </el-col>\n </el-row>\n </el-form>\n </div>\n <div slot=\"footer\">\n <el-button @click=\"dialogVisible = false\">取 消</el-button>\n <el-button type=\"primary\" v-loading=\"loading\" @click=\"submitInfo\">确 定</el-button>\n </div>\n </el-dialog>\n</template>\n<script>\nimport { getDictDataList,treeDataTranslate} from '@/utils'\nimport debounce from 'lodash/debounce'\nexport default {\n data(){\n return {\n dialogVisible:false,\n loading:false,\n type:'post',\n dataForm:{\n rcName:'',\n rcNo:'',\n rcAddress:'',\n rcFloor:'',\n rcFenceId:'',\n rcFenceName:'',\n rcType:'',\n },\n rules:{\n rcName:[{required: true, message:'请输入', trigger: ['blur','change']},],\n rcNo:[{required: true, message:'请输入', trigger: ['blur','change']},],\n rcAddress:[{required: true, message:'请输入', trigger: ['blur','change']},],\n rcFloor:[{required: true, message:'请选择', trigger: ['blur','change']},],\n rcFenceId:[{required: true, message:'请选择', trigger: ['blur','change']},],\n rcType:[{required: true, message:'请选择', trigger: ['blur','change']},],\n },\n genderList:[],\n buildList:[],\n fenceList:[],\n areaList:getDictDataList('areaType')\n }\n },\n created(){\n this.getBuildTree()\n this.getAreaFence()\n },\n methods:{\n init(id){\n this.dialogVisible=true;\n // 编辑\n if(id){\n this.type=\"put\";\n if(id){\n this.$http({\n url:`/system/scregionconfig/${id}`,\n method:\"get\"\n }).then(({data:res})=>{\n if(res.code!=0){\n return this.$message.error(res.msg)\n }\n this.dataForm={\n ...res.data,\n rcType:String(res.data.rcType)\n };\n }).catch(err=>{\n this.$message.error(err)\n })\n }\n }\n // 新增\n else{\n this.type=\"post\";\n this.dataForm={\n rcName:'',\n rcNo:'',\n rcAddress:'',\n rcFloor:'',\n rcFenceId:'',\n rcFenceName:'',\n rcType:'',\n };\n this.$nextTick(()=>{\n this.$refs['dataForm'].clearValidate()\n })\n }\n },\n submitInfo:debounce(function(){\n this.$refs['dataForm'].validate((valid)=>{\n if(!valid){\n return false\n }\n this.loading=true;\n // 提交需要区域围栏名称 回显\n let currentFence=this.fenceList.filter(item=>item.id==this.dataForm.rcFenceId)[0];\n this.dataForm.rcFenceName=currentFence.floor+currentFence.fenceName;\n this.$http({\n url:\"/system/scregionconfig\",\n method:this.type,\n data:this.dataForm\n }).then(({data})=>{\n if(data.code!=0){\n return this.$message.error(data.msg)\n }\n this.dialogVisible=false;\n if(this.type=='post'){\n this.$parent.$parent.resetForm('ruleForm');\n }\n else{\n this.$parent.$parent.search();\n }\n this.$message.success(data.msg)\n }).finally(()=>{\n this.loading=false\n })\n })\n \n },1000),\n getBuildTree () {\n this.$http.get('/system/scdormitoryfloor/tree/-1').then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n this.buildList = treeDataTranslate(res.data,'df_floorid','df_parentid')\n }).catch(() => {})\n },\n getAreaFence(){\n this.$http({\n url:\"/system/scregionconfig/getUwbRegionList\",\n method:\"get\"\n }).then(({data:res})=>{\n console.log(res)\n this.fenceList=res.data;\n }).catch(()=>{})\n }\n }\n}\n</script>\n<style lang=\"scss\" scoped>\n.el-dialog {\n .el-form {\n .el-form-item {\n .el-date-editor--date,\n .el-cascader,\n .el-select {\n width: 100%;\n }\n }\n }\n}\n</style>"]}]} |