management/front/dkha-web-sz-main/node_modules/.cache/babel-loader/b9ca4180bb0839d9746d58190cd...

1 line
32 KiB
JSON

{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!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\\visitor\\visitor-add-or-update.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\visitor\\visitor-add-or-update.vue","mtime":1614735254000},{"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\\babel-loader\\lib\\index.js","mtime":499162500000},{"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":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.regexp.search\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _defineProperty from \"C:\\\\Users\\\\27446\\\\Desktop\\\\up\\\\front\\\\dkha-web-sz-main\\\\node_modules\\\\@babel\\\\runtime-corejs2/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\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//\nimport { getDictDataList } from '@/utils';\nimport { isMobile, idCardValidate } from '@/utils/validate';\nimport { treeDataTranslate } from '@/utils';\nimport debounce from 'lodash/debounce';\nimport Cookies from 'js-cookie';\nimport { mapGetters } from 'vuex';\nexport default {\n computed: _objectSpread({}, mapGetters(['uwbId'])),\n watch: {\n 'dataForm.vrIdno': {\n immediate: true,\n handler: function handler(val) {\n var gender = '0';\n\n if (val && val.length == 18) {\n gender = val[16] % 2 == 0 ? '0' : '1';\n }\n\n this.dataForm.vrSex = gender;\n }\n },\n uwbId: function uwbId(val) {\n // 覆盖到当前id绑定\n if (val) {\n this.dataForm.vrUwbid = val;\n this.$store.commit(\"visitor/UPDATE_VISITOR\", '');\n }\n }\n },\n data: function data() {\n var _this = this;\n\n var asyncValidate = function asyncValidate(rule, value, callback) {\n _this.$http({\n url: \"/system/globalValidation/checkUwb\",\n method: \"get\",\n params: {\n id: null,\n uwb: value\n }\n }).then(function (_ref) {\n var res = _ref.data;\n\n if (res) {\n callback();\n } else {\n callback(new Error('UWB标签重复'));\n }\n }).catch(function (err) {\n callback(new Error(err.msg));\n });\n };\n\n return {\n dialogVisible: false,\n loading: false,\n type: 'post',\n FloorList: [],\n // 楼栋、楼层级联\n staffList: [],\n // 教职工列表 \n dataForm: {\n vrPhoneimg: '',\n vrName: '',\n vrIdno: '',\n vrSex: '0',\n vrUwbid: '',\n scWaid: '',\n vrTemperature: undefined,\n vrAddress: '',\n dfFloorid: [],\n vrReasons: '',\n vrInterviewed: \"\",\n // 被访人员ID\n vrInterviewedPhone: \"\",\n // 被访问人员电话\n vrPhone: \"\" // 访客电话\n\n },\n genderList: getDictDataList('gender').filter(function (item) {\n return item.dictValue < 2;\n }),\n rules: {\n vrName: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n vrInterviewed: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n vrSex: [{\n required: true,\n message: '请选择',\n trigger: ['blur', 'change']\n }],\n vrIdno: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n scWaid: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n vrUwbid: [{\n required: true,\n validator: function validator(rule, value, callback) {\n if (!/^[0-9]+$/.test(value)) {\n return callback(new Error(\"UWB标签只能是数字\"));\n }\n\n callback();\n },\n trigger: ['change']\n }, {\n required: true,\n validator: asyncValidate,\n trigger: ['change']\n }],\n vrPhone: [{\n required: true,\n validator: isMobile,\n trigger: ['blur', 'change']\n }],\n vrAddress: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n vrReasons: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n vrTemperature: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n dfFloorid: [{\n required: true,\n validator: function validator(rule, value, callback) {\n if (value.length === 0) {\n return callback(new Error(\"请选择\"));\n } else if (value.length === 1) {\n return callback(new Error(\"请选择楼层\"));\n } else {\n return callback();\n }\n },\n trigger: 'change'\n }]\n },\n uploadHeaders: {},\n uploadUrl: window.SITE_CONFIG['apiURL'] + '/system/upload'\n };\n },\n created: function created() {\n this.uploadHeaders = {\n Authorization: 'Bearer ' + Cookies.get('access_token') || ''\n };\n },\n methods: {\n init: function init(data) {\n var _this2 = this;\n\n this.dialogVisible = true;\n this.getTfSetupaddrList(); // 获取楼栋、楼层\n\n this.getStaffList(); // 获取职工信息\n // 编辑\n\n if (data) {\n this.type = \"put\";\n this.dataForm = _objectSpread({}, data, {\n vrSex: String(data.vrSex)\n });\n } // 新增\n else {\n this.type = \"post\";\n this.dataForm = {\n vrPhoneimg: '',\n vrPhone: \"\",\n vrName: '',\n vrIdno: '',\n vrSex: '0',\n vrUwbid: '',\n scWaid: '',\n vrTemperature: undefined,\n vrAddress: '',\n vrReasons: '',\n dfFloorid: [],\n vrInterviewed: \"\",\n // 被访人员ID\n vrInterviewedPhone: \"\",\n // 被访问人员电话\n scPhonenum: \"\" // 访客电话\n\n };\n this.$nextTick(function () {\n _this2.$refs['dataForm'].clearValidate();\n });\n }\n },\n // 获取楼栋和楼层的cascader\n getTfSetupaddrList: function getTfSetupaddrList() {\n var _this3 = this;\n\n // -1是获取所有楼栋\n this.$http.get(\"/system/scdormitoryfloor/tree/-1\").then(function (_ref2) {\n var res = _ref2.data;\n\n if (res.code !== 0) {\n return _this3.$message.error(res.msg);\n }\n\n _this3.FloorList = treeDataTranslate(res.data, 'df_floorid', 'df_parentid');\n }).catch(function () {});\n },\n // 获取职工信息\n getStaffList: function getStaffList() {\n var _this4 = this;\n\n this.$http.get(\"/system/scworkersarchives/getAll\").then(function (_ref3) {\n var res = _ref3.data;\n\n if (res.code !== 0) {\n return _this4.$message.error(res.msg);\n }\n\n _this4.staffList = res.data;\n }).catch(function () {});\n },\n // 根据职工联动手机号码\n getPhoneHandle: function getPhoneHandle(e) {\n var _this5 = this;\n\n if (e) {\n this.staffList.forEach(function (item) {\n if (e === item.scWaid) {\n _this5.dataForm.vrInterviewedPhone = item.scPhonenum;\n }\n });\n } else {\n this.dataForm.vrInterviewedPhone = \"\";\n }\n },\n submitInfo: debounce(function () {\n var _this6 = this;\n\n this.$refs['dataForm'].validate(function (valid) {\n if (!valid) {\n return false;\n }\n\n _this6.loading = true;\n _this6.dataForm.vrTemperature = _this6.dataForm.vrTemperature.toFixed(2);\n\n _this6.$http({\n url: \"/system/scvisitorrecord\",\n method: _this6.type,\n data: _this6.dataForm\n }).then(function (_ref4) {\n var data = _ref4.data;\n\n if (data.code != 0) {\n return _this6.$message.error(data.msg);\n }\n\n _this6.dialogVisible = false;\n\n if (_this6.type == 'post') {\n _this6.$parent.$parent.resetQuery();\n } else {\n _this6.$parent.$parent.search();\n }\n\n _this6.$message.success(data.msg);\n }).finally(function () {\n _this6.loading = false;\n });\n });\n }, 1000),\n handleUploadSuccess: function handleUploadSuccess(res) {\n if (res.code != 0) {\n return this.$message.error(res.msg);\n }\n\n this.dataForm.vrPhoneimg = res.data.path;\n },\n beforeUpload: function beforeUpload(file) {\n var isJPG = file.type == 'image/jpeg' || file.type == 'image/png';\n var isLess2M = file.size / 1024 / 1024 < 2;\n\n if (!isJPG) {\n this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');\n }\n\n if (!isLess2M) {\n this.$message.error('上传头像图片大小不能超过 2MB!');\n }\n\n return isJPG && isLess2M;\n }\n }\n};",{"version":3,"sources":["visitor-add-or-update.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,SACA,eADA,QAEA,SAFA;AAGA,SACA,QADA,EAEA,cAFA,QAGA,kBAHA;AAIA,SACA,iBADA,QAEA,SAFA;AAGA,OAAA,QAAA,MAAA,iBAAA;AACA,OAAA,OAAA,MAAA,WAAA;AACA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OAAA,CAAA,UAAA;AACA,WAFA,MAEA;AACA,YAAA,MAAA,CAAA,OAAA,CAAA,OAAA,CAAA,MAAA;AACA;;AACA,UAAA,MAAA,CAAA,QAAA,CAAA,OAAA,CAAA,IAAA,CAAA,GAAA;AACA,SAjBA,EAiBA,OAjBA,CAiBA,YAAA;AACA,UAAA,MAAA,CAAA,OAAA,GAAA,KAAA;AACA,SAnBA;AAoBA,OA1BA;AA4BA,KA7BA,EA6BA,IA7BA,CAzEA;AAuGA,IAAA,mBAvGA,+BAuGA,GAvGA,EAuGA;AACA,UAAA,GAAA,CAAA,IAAA,IAAA,CAAA,EAAA;AACA,eAAA,KAAA,QAAA,CAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA;AACA;;AACA,WAAA,QAAA,CAAA,UAAA,GAAA,GAAA,CAAA,IAAA,CAAA,IAAA;AACA,KA5GA;AA6GA,IAAA,YA7GA,wBA6GA,IA7GA,EA6GA;AACA,UAAA,KAAA,GAAA,IAAA,CAAA,IAAA,IAAA,YAAA,IAAA,IAAA,CAAA,IAAA,IAAA,WAAA;AACA,UAAA,QAAA,GAAA,IAAA,CAAA,IAAA,GAAA,IAAA,GAAA,IAAA,GAAA,CAAA;;AACA,UAAA,CAAA,KAAA,EAAA;AACA,aAAA,QAAA,CAAA,KAAA,CAAA,yBAAA;AACA;;AACA,UAAA,CAAA,QAAA,EAAA;AACA,aAAA,QAAA,CAAA,KAAA,CAAA,mBAAA;AACA;;AACA,aAAA,KAAA,IAAA,QAAA;AACA;AAvHA;AAvJA,CAAA","sourcesContent":["<template>\n\t<el-dialog :title=\"type=='post'?'新建':'编辑'\" :visible.sync=\"dialogVisible\" :close-on-click-modal=\"false\">\n\t\t<div>\n\t\t\t<el-form ref=\"dataForm\" :model=\"dataForm\" :rules=\"rules\" label-width=\"100px\">\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col>\n\t\t\t\t\t\t<el-form-item class=\"block-item\" label=\"照片\" prop=\"vrPhoneimg\">\n\t\t\t\t\t\t\t<el-upload class=\"avatar-uploader\" :action=\"uploadUrl\" :headers=\"uploadHeaders\" :show-file-list=\"false\"\n\t\t\t\t\t\t\t :on-success=\"handleUploadSuccess\" :before-upload=\"beforeUpload\" :data=\"{folderName:'visitor'}\">\n\t\t\t\t\t\t\t\t<img v-if=\"dataForm.vrPhoneimg\" :src=\"$ImgServerUrl+dataForm.vrPhoneimg\" class=\"avatar\" />\n\t\t\t\t\t\t\t\t<i v-else class=\"el-icon-plus avatar-uploader-icon\"></i>\n\t\t\t\t\t\t\t</el-upload>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col :span=\"12\">\n\t\t\t\t\t\t<el-form-item label=\"姓名\" prop=\"vrName\">\n\t\t\t\t\t\t\t<el-input v-model=\"dataForm.vrName\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t\t<el-col :span=\"11\" :offset=\"1\">\n\t\t\t\t\t\t<el-form-item label=\"身份证号\" prop=\"vrIdno\">\n\t\t\t\t\t\t\t<el-input v-model=\"dataForm.vrIdno\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col :span=\"12\">\n\t\t\t\t\t\t<el-form-item label=\"UWB标签\" prop=\"vrUwbid\">\n\t\t\t\t\t\t\t<el-input v-model=\"dataForm.vrUwbid\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t\t<el-col :span=\"11\" :offset=\"1\">\n\t\t\t\t\t\t<el-form-item label=\"性别\" prop=\"vrSex\">\n\t\t\t\t\t\t\t<el-radio-group v-model=\"dataForm.vrSex\" placeholder=\"请输入\">\n\t\t\t\t\t\t\t\t<el-radio disabled v-for=\"item in genderList\" :key=\"item.dictLable\" :label=\"item.dictValue\">{{item.dictLabel}}</el-radio>\n\t\t\t\t\t\t\t</el-radio-group>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col :span=\"12\">\n\t\t\t\t\t\t<el-form-item label=\"被访人员\" prop=\"vrInterviewed\">\n\t\t\t\t\t\t\t<el-select v-model=\"dataForm.vrInterviewed\" clearable placeholder=\"请选择\" filterable @change=\"getPhoneHandle\">\n\t\t\t\t\t\t\t\t<el-option v-for=\"item in staffList\" :label=\"item.scWaname\" :value=\"item.scWaid\" :key=\"item.scWaid\"></el-option>\n\t\t\t\t\t\t\t</el-select>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t\t<el-col :span=\"11\" :offset=\"1\">\n\t\t\t\t\t\t<el-form-item label=\"访客体温\" prop=\"vrTemperature\">\n\t\t\t\t\t\t\t<el-input-number :controls=\"false\" v-model=\"dataForm.vrTemperature\" placeholder=\"请输入\" clearable></el-input-number>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col :span=\"12\">\n\t\t\t\t\t\t<el-form-item label=\"被访人电话\" prop=\"vrInterviewedPhone\">\n\t\t\t\t\t\t\t<el-input v-model=\"dataForm.vrInterviewedPhone\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t\t<el-col :span=\"11\" :offset=\"1\">\n\t\t\t\t\t\t<el-form-item label=\"访客电话\" prop=\"vrPhone\">\n\t\t\t\t\t\t\t<el-input v-model=\"dataForm.vrPhone\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col :span=\"12\">\n\t\t\t\t\t\t<el-form-item label=\"访问地址\" prop=\"vrAddress\">\n\t\t\t\t\t\t\t<el-input v-model=\"dataForm.vrAddress\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t\t<el-col :span=\"11\" :offset=\"1\">\n\t\t\t\t\t\t<el-form-item label=\"访问楼层\" prop=\"dfFloorid\">\n\t\t\t\t\t\t\t<el-cascader v-model=\"dataForm.dfFloorid\" :props=\"{ value: 'df_floorid', label: 'df_floorname',emitPath:false}\"\n\t\t\t\t\t\t\t clearable placeholder=\"请选择\" :options=\"FloorList\" style=\"width: 100%;\"></el-cascader>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col>\n\t\t\t\t\t\t<el-form-item label=\"访问事由\" prop=\"vrReasons\">\n\t\t\t\t\t\t\t<el-input type=\"textarea\" :rows=\"3\" resize=\"none\" v-model=\"dataForm.vrReasons\" placeholder=\"请输入\" clearable></el-input>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t</el-form>\n\t\t</div>\n\t\t<div slot=\"footer\">\n\t\t\t<el-button @click=\"dialogVisible = false\">取 消</el-button>\n\t\t\t<el-button type=\"primary\" v-loading=\"loading\" @click=\"submitInfo\">确 定</el-button>\n\t\t</div>\n\t</el-dialog>\n</template>\n<script>\n\timport {\n\t\tgetDictDataList\n\t} from '@/utils'\n\timport {\n\t\tisMobile,\n\t\tidCardValidate\n\t} from '@/utils/validate'\n\timport {\n\t\ttreeDataTranslate\n\t} from '@/utils'\n\timport debounce from 'lodash/debounce'\n\timport Cookies from 'js-cookie'\n\timport {\n\t\tmapGetters\n\t} from 'vuex'\n\texport default {\n\t\tcomputed: {\n\t\t\t...mapGetters(['uwbId']),\n\t\t},\n\t\twatch: {\n\t\t\t'dataForm.vrIdno': {\n\t\t\t\timmediate: true,\n\t\t\t\thandler(val) {\n\t\t\t\t\tlet gender = '0';\n\t\t\t\t\tif (val && val.length == 18) {\n\t\t\t\t\t\tgender = val[16] % 2 == 0 ? '0' : '1';\n\t\t\t\t\t}\n\t\t\t\t\tthis.dataForm.vrSex = gender\n\t\t\t\t}\n\t\t\t},\n\t\t\tuwbId(val) {\n\t\t\t\t// 覆盖到当前id绑定\n\t\t\t\tif (val) {\n\t\t\t\t\tthis.dataForm.vrUwbid = val;\n\t\t\t\t\tthis.$store.commit(\"visitor/UPDATE_VISITOR\", '')\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdata() {\n\t\t\tconst asyncValidate = (rule, value, callback) => {\n\t\t\t\tthis.$http({\n\t\t\t\t\turl: \"/system/globalValidation/checkUwb\",\n\t\t\t\t\tmethod: \"get\",\n\t\t\t\t\tparams: {\n\t\t\t\t\t\tid: null,\n\t\t\t\t\t\tuwb: value\n\t\t\t\t\t}\n\t\t\t\t}).then(({\n\t\t\t\t\tdata: res\n\t\t\t\t}) => {\n\t\t\t\t\tif (res) {\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcallback(new Error('UWB标签重复'))\n\t\t\t\t\t}\n\t\t\t\t}).catch(err => {\n\t\t\t\t\tcallback(new Error(err.msg))\n\t\t\t\t})\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tdialogVisible: false,\n\t\t\t\tloading: false,\n\t\t\t\ttype: 'post',\n\t\t\t\tFloorList: [], // 楼栋、楼层级联\n\t\t\t\tstaffList: [], // 教职工列表 \n\t\t\t\tdataForm: {\n\t\t\t\t\tvrPhoneimg: '',\n\t\t\t\t\tvrName: '',\n\t\t\t\t\tvrIdno: '',\n\t\t\t\t\tvrSex: '0',\n\t\t\t\t\tvrUwbid: '',\n\t\t\t\t\tscWaid: '',\n\t\t\t\t\tvrTemperature: undefined,\n\t\t\t\t\tvrAddress: '',\n\t\t\t\t\tdfFloorid: [],\n\t\t\t\t\tvrReasons: '',\n\t\t\t\t\tvrInterviewed: \"\", // 被访人员ID\n\t\t\t\t\tvrInterviewedPhone: \"\", // 被访问人员电话\n\t\t\t\t\tvrPhone: \"\", // 访客电话\n\t\t\t\t},\n\t\t\t\tgenderList: getDictDataList('gender').filter(item => item.dictValue < 2),\n\t\t\t\trules: {\n\t\t\t\t\tvrName: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\tvrInterviewed: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\tvrSex: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\tvrIdno: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\tscWaid: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}, ],\n\t\t\t\t\tvrUwbid: [{\n\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\tvalidator: (rule, value, callback) => {\n\t\t\t\t\t\t\t\tif (!/^[0-9]+$/.test(value)) {\n\t\t\t\t\t\t\t\t\treturn callback(new Error(\"UWB标签只能是数字\"));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcallback()\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttrigger: ['change']\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\tvalidator: asyncValidate,\n\t\t\t\t\t\t\ttrigger: ['change']\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tvrPhone: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tvalidator: isMobile,\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\tvrAddress: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\tvrReasons: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\tvrTemperature: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\tdfFloorid: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tvalidator: (rule, value, callback) => {\n\t\t\t\t\t\t\tif (value.length === 0) {\n\t\t\t\t\t\t\t\treturn callback(new Error(\"请选择\"));\n\t\t\t\t\t\t\t} else if (value.length === 1) {\n\t\t\t\t\t\t\t\treturn callback(new Error(\"请选择楼层\"));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn callback();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttrigger: 'change'\n\t\t\t\t\t}],\n\t\t\t\t},\n\t\t\t\tuploadHeaders: {},\n\t\t\t\tuploadUrl: window.SITE_CONFIG['apiURL'] + '/system/upload',\n\t\t\t}\n\t\t},\n\t\tcreated() {\n\t\t\tthis.uploadHeaders = {\n\t\t\t\tAuthorization: 'Bearer ' + Cookies.get('access_token') || ''\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tinit(data) {\n\t\t\t\tthis.dialogVisible = true;\n\t\t\t\tthis.getTfSetupaddrList() // 获取楼栋、楼层\n\t\t\t\tthis.getStaffList() // 获取职工信息\n\t\t\t\t// 编辑\n\t\t\t\tif (data) {\n\t\t\t\t\tthis.type = \"put\";\n\t\t\t\t\tthis.dataForm = {\n\t\t\t\t\t\t...data,\n\t\t\t\t\t\tvrSex: String(data.vrSex),\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// 新增\n\t\t\t\telse {\n\t\t\t\t\tthis.type = \"post\";\n\t\t\t\t\tthis.dataForm = {\n\t\t\t\t\t\tvrPhoneimg: '',\n\t\t\t\t\t\tvrPhone: \"\",\n\t\t\t\t\t\tvrName: '',\n\t\t\t\t\t\tvrIdno: '',\n\t\t\t\t\t\tvrSex: '0',\n\t\t\t\t\t\tvrUwbid: '',\n\t\t\t\t\t\tscWaid: '',\n\t\t\t\t\t\tvrTemperature: undefined,\n\t\t\t\t\t\tvrAddress: '',\n\t\t\t\t\t\tvrReasons: '',\n\t\t\t\t\t\tdfFloorid: [],\n\t\t\t\t\t\tvrInterviewed: \"\", // 被访人员ID\n\t\t\t\t\t\tvrInterviewedPhone: \"\", // 被访问人员电话\n\t\t\t\t\t\tscPhonenum: \"\", // 访客电话\n\n\t\t\t\t\t};\n\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\tthis.$refs['dataForm'].clearValidate();\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t},\n\t\t\t// 获取楼栋和楼层的cascader\n\t\t\tgetTfSetupaddrList() {\n\t\t\t\t// -1是获取所有楼栋\n\t\t\t\tthis.$http.get(`/system/scdormitoryfloor/tree/-1`).then(({\n\t\t\t\t\tdata: res\n\t\t\t\t}) => {\n\t\t\t\t\tif (res.code !== 0) {\n\t\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t\t}\n\t\t\t\t\tthis.FloorList = treeDataTranslate(res.data, 'df_floorid', 'df_parentid')\n\t\t\t\t}).catch(() => {})\n\t\t\t},\n\t\t\t// 获取职工信息\n\t\t\tgetStaffList() {\n\t\t\t\tthis.$http.get(`/system/scworkersarchives/getAll`).then(({\n\t\t\t\t\tdata: res\n\t\t\t\t}) => {\n\t\t\t\t\tif (res.code !== 0) {\n\t\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t\t}\n\t\t\t\t\tthis.staffList = res.data\n\t\t\t\t}).catch(() => {})\n\t\t\t},\n\t\t\t// 根据职工联动手机号码\n\t\t\tgetPhoneHandle(e) {\n\t\t\t\tif (e) {\n\t\t\t\t\tthis.staffList.forEach(item => {\n\t\t\t\t\t\tif (e === item.scWaid) {\n\t\t\t\t\t\t\tthis.dataForm.vrInterviewedPhone = item.scPhonenum\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tthis.dataForm.vrInterviewedPhone = \"\"\n\t\t\t\t}\n\t\t\t},\n\t\t\tsubmitInfo: debounce(function() {\n\t\t\t\tthis.$refs['dataForm'].validate((valid) => {\n\t\t\t\t\tif (!valid) {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t\tthis.loading = true;\n\t\t\t\t\tthis.dataForm.vrTemperature = this.dataForm.vrTemperature.toFixed(2)\n\t\t\t\t\tthis.$http({\n\t\t\t\t\t\turl: \"/system/scvisitorrecord\",\n\t\t\t\t\t\tmethod: this.type,\n\t\t\t\t\t\tdata: this.dataForm\n\t\t\t\t\t}).then(({\n\t\t\t\t\t\tdata\n\t\t\t\t\t}) => {\n\t\t\t\t\t\tif (data.code != 0) {\n\t\t\t\t\t\t\treturn this.$message.error(data.msg)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.dialogVisible = false;\n\t\t\t\t\t\tif (this.type == 'post') {\n\t\t\t\t\t\t\tthis.$parent.$parent.resetQuery();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.$parent.$parent.search();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.$message.success(data.msg)\n\t\t\t\t\t}).finally(() => {\n\t\t\t\t\t\tthis.loading = false\n\t\t\t\t\t})\n\t\t\t\t})\n\n\t\t\t}, 1000),\n\t\t\thandleUploadSuccess(res) {\n\t\t\t\tif (res.code != 0) {\n\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t}\n\t\t\t\tthis.dataForm.vrPhoneimg = res.data.path\n\t\t\t},\n\t\t\tbeforeUpload(file) {\n\t\t\t\tconst isJPG = file.type == 'image/jpeg' || file.type == 'image/png';\n\t\t\t\tconst isLess2M = file.size / 1024 / 1024 < 2;\n\t\t\t\tif (!isJPG) {\n\t\t\t\t\tthis.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');\n\t\t\t\t}\n\t\t\t\tif (!isLess2M) {\n\t\t\t\t\tthis.$message.error('上传头像图片大小不能超过 2MB!');\n\t\t\t\t}\n\t\t\t\treturn isJPG && isLess2M;\n\t\t\t}\n\t\t}\n\t}\n</script>\n<style lang=\"scss\" scoped>\n\t.el-dialog {\n\t\t.el-form {\n\t\t\t.el-form-item {\n\n\t\t\t\t.el-date-editor--date,\n\t\t\t\t.el-input-number,\n\t\t\t\t.el-select {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t/deep/ .el-upload {\n\t\t\t\t\tborder: 1px dashed #d9d9d9;\n\t\t\t\t\tborder-radius: 6px;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\tmargin-left: 20px;\n\n\t\t\t\t\t.avatar-uploader-icon {\n\t\t\t\t\t\tfont-size: 28px;\n\t\t\t\t\t\tcolor: #fff;\n\t\t\t\t\t\theight: 150px;\n\t\t\t\t\t\twidth: 106px;\n\t\t\t\t\t\tline-height: 150px;\n\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t}\n\n\t\t\t\t\t.avatar {\n\t\t\t\t\t\theight: 150px;\n\t\t\t\t\t\twidth: 106px;\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n</style>\n"],"sourceRoot":"src/views/modules/visitor"}]}