1 line
23 KiB
JSON
1 line
23 KiB
JSON
{"remainingRequest":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js!E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!E:\\hz-zhhq-web\\src\\views\\resource\\office\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\resource\\office\\index.vue","mtime":1737610069446},{"path":"E:\\hz-zhhq-web\\babel.config.js","mtime":1737610069371},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1740463332762},{"path":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js","mtime":1740463332584},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1740463332762},{"path":"E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js","mtime":1740463340941}],"contextDependencies":[],"result":["\"use strict\";\n\nvar _interopRequireDefault = require(\"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nrequire(\"core-js/modules/es6.function.name\");\nvar _defineProperty2 = _interopRequireDefault(require(\"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/defineProperty.js\"));\nvar _paging = _interopRequireDefault(require(\"@/views/Public/paging.vue\"));\nvar _getdata = require(\"@/api/getdata\");\nvar _popup = _interopRequireDefault(require(\"@/views/estate/examine/dialog/popup.vue\"));\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//\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//\nvar _default = exports.default = {\n components: {\n Paging: _paging.default,\n Popup: _popup.default\n },\n data: function data() {\n var priceVa = function priceVa(rule, value, callback) {\n // var reg =/^[0-9\\\\.]*$/\n var reg = /^[0-9]*[1-9][0-9]*$/;\n if (reg.test(value)) {\n callback();\n } else {\n callback(new Error(\"请输入整数!\"));\n }\n };\n var belongCompanyV = function belongCompanyV(rule, value, callback) {\n var reg = /[`~!@#$%^&*()_\\-+=<>?:\"{}|,./;'\\\\[\\]·~!@#¥%……&*()——\\-+={}|《》?:“”【】、;‘’,。、]/g;\n if (!reg.test(value)) {\n callback();\n } else {\n callback(new Error(\"请输入正确的格式 !\"));\n }\n };\n\n // officeStoriedV\n var officeStoriedV = function officeStoriedV(rule, value, callback) {\n var reg = /[`~!@#$%^&*()_\\-+=<>?:\"{}|,./;'\\\\[\\]·~!@#¥%……&*()——\\-+={}|《》?:“”【】、;‘’,。、]/g;\n if (!reg.test(value)) {\n callback();\n } else {\n callback(new Error(\"请输入正确的格式 !\"));\n }\n };\n // officeRoomNoV\n var officeRoomNoV = function officeRoomNoV(rule, value, callback) {\n var reg = /[`~!@#$%^&*()_\\-+=<>?:\"{}|,./;'\\\\[\\]·~!@#¥%……&*()——\\-+={}|《》?:“”【】、;‘’,。、]/g;\n if (!reg.test(value)) {\n callback();\n } else {\n callback(new Error(\"请输入正确的格式 !\"));\n }\n };\n\n // usingStationCountV\n var usingStationCountV = function usingStationCountV(rule, value, callback) {\n var reg = /[`~!@#$%^&*()_\\-+=<>?:\"{}|,./;'\\\\[\\]·~!@#¥%……&*()——\\-+={}|《》?:“”【】、;‘’,。、]/g;\n if (!reg.test(value)) {\n callback();\n } else {\n callback(new Error(\"请输入正确的格式 !\"));\n }\n };\n\n // stationCountV\n var stationCountV = function stationCountV(rule, value, callback) {\n var reg = /[`~!@#$%^&*()_\\-+=<>?:\"{}|,./;'\\\\[\\]·~!@#¥%……&*()——\\-+={}|《》?:“”【】、;‘’,。、]/g;\n if (!reg.test(value)) {\n callback();\n } else {\n callback(new Error(\"请输入正确的格式 !\"));\n }\n };\n return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({\n loading: false,\n //初始化loading\n loadingMsg: \"\",\n row: {},\n validation: false,\n completeTitle: \"删除\",\n nav: \"是否删除?\",\n fileList: [],\n valueObj: {},\n louOption: [\n // { name: \"1层\", id: \"1\" },\n // { name: \"2层\", id: \"2\" },\n // { name: \"3层\", id: \"3\" },\n // { name: \"4层\", id: \"4\" },\n // { name: \"5层\", id: \"5\" },\n // { name: \"6层\", id: \"6\" },\n // { name: \"7层\", id: \"7\" },\n // { name: \"8层\", id: \"8\" },\n // { name: \"9层\", id: \"9\" },\n // { name: \"10层\", id: \"10\" },\n // { name: \"11层\", id: \"11\" },\n // { name: \"12层\", id: \"12\" }\n ],\n options: [] /**拜访部门 */,\n\n // floor:[],/**楼层 */\n formInline: {\n unit: \"\",\n building: \"\",\n floor: \"\",\n part: \"\",\n roomId: \"\"\n },\n ruleForm: {\n belongCompany: \"\",\n officeStoried: \"\",\n officeFloorValue: \"\",\n officeRoomNo: \"\",\n useDeptName: \"\",\n roomTypeCode: \"\",\n stationCount: \"\",\n usingStationCount: \"\"\n },\n rules: {\n belongCompany: [{\n required: true,\n message: \"请输入所属单位\",\n trigger: \"blur\"\n }, {\n validator: belongCompanyV,\n trigger: \"blur\"\n }],\n officeStoried: [{\n required: true,\n message: \"请输入办公楼\",\n trigger: \"blur\"\n }, {\n validator: officeStoriedV,\n trigger: \"blur\"\n }],\n officeFloorValue: [{\n required: true,\n message: \"请选择楼层\",\n trigger: \"blur\"\n }],\n officeRoomNo: [{\n required: true,\n message: \"请输入房间编号\",\n trigger: \"blur\"\n }, {\n validator: officeRoomNoV,\n trigger: \"blur\"\n }],\n roomTypeCode: [{\n required: true,\n message: \"请输入房间类型\",\n trigger: \"blur\"\n }],\n useDeptName: [{\n required: true,\n message: \"请选择部门\",\n trigger: \"blur\"\n }],\n stationCount: [{\n required: true,\n message: \"请选择工位数量\",\n trigger: \"blur\"\n }, {\n validator: stationCountV,\n trigger: \"blur\"\n }],\n usingStationCount: [{\n required: true,\n message: \"请输入使用工位数量\",\n trigger: \"blur\"\n }, {\n validator: usingStationCountV,\n trigger: \"blur\"\n }]\n },\n office: \"添加\" /**1为添加 2为修改 */,\n dialogTableVisible: false,\n downloadLoading: false,\n unit: \"\",\n input: \"\",\n building: \"\"\n }, \"unit\", \"\"), \"floor\", \"\"), \"value1\", \"\"), \"value2\", \"\"), \"rows\", {}), \"tableData\", []), \"page\", {\n limit: 0 /** 当前点击*/,\n sizePage: 10 /** 当前多少页*/,\n total: 0 /**总数 */\n }), \"formDate\", new FormData());\n },\n created: function created() {},\n mounted: function mounted() {\n this.createLoad();\n this.ChangeList();\n this.getlist();\n this.getbmlist();\n // this.BmChange();\n // this.louce();\n },\n methods: {\n createLoad: function createLoad() {\n this.loading = true;\n this.loadingMsg = '加载中...';\n },\n clearLoad: function clearLoad() {\n this.loading = false;\n this.loadingMsg = '';\n },\n bs64: function bs64(_bs) {\n var reader = new FileReader();\n reader.readAsDataURL(_bs);\n return new Promise(function (resolve) {\n reader.onload = function (e) {\n resolve(e.target.result);\n };\n });\n },\n ChangeList: function ChangeList() {\n var _this = this;\n var Content = {\n dataType: \"floor\"\n };\n (0, _getdata.ChangeList)(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n // this.$message({\n // message: res.returnMsg,\n // type: \"success\"\n // });\n // console.log(res.returnData,445)\n _this.louOption = res.returnData;\n\n // this.ChangeList = res.returnData;\n // this.options = res.returnData;\n } else {\n _this.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n\n // console.log(res, \"部门\");\n }).catch(function (err) {\n console.log(err);\n });\n },\n louce: function louce() {},\n BmChange: function BmChange() {\n // console.log(this.ruleForm.useDeptName, 123);\n // this.ruleForm.use_dept_name =\n // console.log(this.ruleForm.use_dept_name)\n },\n getbmlist: function getbmlist() {\n var _this2 = this;\n (0, _getdata.GetBmList)().then(function (res) {\n if (res.returnCode == \"1\") {\n // this.$message({\n // message: res.returnMsg,\n // type: \"success\"\n // });\n _this2.options = res.returnData;\n } else {\n _this2.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n\n // console.log(res, \"部门\");\n }).catch(function (err) {\n console.log(err);\n });\n },\n // 弹框关闭的回调\n closeDialog: function closeDialog() {\n this.ruleForm = {};\n this.$refs[\"ruleForm\"].resetFields();\n },\n onSubmit: function onSubmit() {\n this.createLoad();\n // console.log(\"submit!\");\n this.page.limit = 1;\n this.getlist();\n },\n submitForm: function submitForm(formName) {\n var _this3 = this;\n // console.log(this.ruleForm,'----')\n\n this.$refs[\"ruleForm\"].validate(function (valid) {\n if (valid) {\n _this3.validation = true;\n if (_this3.office != \"添加\") {\n // this.validation = true;\n _this3.completeTitle = \"修改\";\n _this3.nav = \"是否修改?\";\n } else {\n _this3.completeTitle = \"添加\";\n _this3.nav = \"是否添加?\";\n }\n } else {\n console.log(\"error submit!!\");\n return false;\n }\n // this.dialogTableVisible = false;\n // this.$refs[\"ruleForm\"].resetFields();\n });\n },\n resetForm: function resetForm(formName) {\n this.dialogTableVisible = false;\n this.$refs[\"ruleForm\"].resetFields();\n // this.$refs[formName].resetFields();\n },\n addban: function addban() {\n this.dialogTableVisible = true;\n this.office = \"添加\";\n },\n handleUpdate: function handleUpdate(row) {\n var _this4 = this;\n var Content = {\n id: row.id\n };\n (0, _getdata.DetailB)(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n // this.$message({\n // message: res.returnMsg,\n // type: \"success\"\n // });\n // console.log(res,'765')\n // this.ruleForm = res.returnData;\n _this4.ruleForm = {\n belongCompany: res.returnData.belongCompany,\n officeStoried: res.returnData.officeStoried,\n officeFloorValue: res.returnData.officeFloor,\n officeRoomNo: res.returnData.officeRoomNo,\n useDeptName: res.returnData.useDeptId,\n roomTypeCode: res.returnData.roomType,\n stationCount: res.returnData.stationCount,\n usingStationCount: res.returnData.usingStationCount\n }, _this4.rows = res.returnData;\n } else {\n _this4.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(err);\n });\n\n // this.rows = row;\n // this.ids = row.id;\n this.office = \"修改\";\n this.dialogTableVisible = true;\n // this.ruleForm = row;\n },\n closeDialogDel: function closeDialogDel(val) {\n var _this5 = this;\n // console.log(val,537)\n var Content;\n if (this.office != \"添加\") {\n Content = {\n id: this.rows.id,\n belongCompany: this.ruleForm.belongCompany,\n officeFloor: this.ruleForm.officeFloorValue ? this.ruleForm.officeFloorValue : this.rows.officeFloor,\n // officeFloorValue: this.ruleForm.officeFloorValue.name?this.ruleForm.officeFloorValue.name:this.rows.officeFloorValue,\n officeRoomNo: this.ruleForm.officeRoomNo,\n officeStoried: this.ruleForm.officeStoried,\n roomType: this.ruleForm.roomTypeCode,\n // roomTypeValue:this.ruleForm.roomTypeCode=='0'?'办公间':'会议室',\n stationCount: this.ruleForm.stationCount,\n useDeptId: this.ruleForm.useDeptName ? this.ruleForm.useDeptName : this.rows.useDeptId,\n // useDeptName:this.ruleForm.useDeptName.name?this.ruleForm.useDeptName.name:this.rows.useDeptName,\n userId: \"40\",\n usingStationCount: this.ruleForm.usingStationCount\n };\n } else {\n Content = {\n belongCompany: this.ruleForm.belongCompany,\n officeFloor: this.ruleForm.officeFloorValue,\n // officeFloorValue: this.ruleForm.officeFloorValue.name,\n officeRoomNo: this.ruleForm.officeRoomNo,\n officeStoried: this.ruleForm.officeStoried,\n roomType: this.ruleForm.roomTypeCode,\n // roomTypeValue:this.ruleForm.roomTypeCode=='0'?'办公间':'会议室',\n stationCount: this.ruleForm.stationCount,\n useDeptId: this.ruleForm.useDeptName,\n // useDeptName:this.ruleForm.useDeptName.name,\n userId: \"40\",\n usingStationCount: this.ruleForm.usingStationCount\n };\n }\n if (val == 1) {\n var Contents = {\n id: this.row.id,\n userId: \"40\"\n };\n (0, _getdata.DelB)(Contents).then(function (res) {\n if (res.returnCode == \"1\") {\n _this5.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this5.createLoad();\n _this5.getlist();\n } else {\n _this5.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(\"error!\");\n });\n } else if (val == 2 || val == 3) {\n (0, _getdata.Save)(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this5.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n if (_this5.office == \"修改\") {\n _this5.page.limit = _this5.page.limit;\n _this5.createLoad();\n _this5.getlist();\n } else {\n _this5.createLoad();\n _this5.getlist();\n }\n } else {\n _this5.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n _this5.dialogTableVisible = false;\n _this5.$refs[\"ruleForm\"].resetFields();\n }).catch(function (err) {\n console.log(\"error!\");\n });\n }\n this.validation = false;\n },\n handleModifyStatus: function handleModifyStatus(row) {\n this.completeTitle = \"删除\";\n this.nav = \"是否删除?\";\n this.row = row;\n this.validation = true;\n // console.log(index, row);\n },\n handleDrag: function handleDrag() {\n // this.$refs.select.blur();\n },\n handleFetchPv: function handleFetchPv(id) {\n // console.log(id,111)\n // const id = 11;\n this.$router.push({\n name: \"Workspace\"\n });\n },\n /** */onchange: function onchange(file) {\n var _this6 = this;\n this.fileList = [];\n // this.formDate = new FormData();\n // this.formDate.append(\"file\", file.raw);\n this.fileList.push(file);\n var flag = false;\n if (this.fileList.length > 0) {\n flag = false;\n var Lastindex = this.fileList[0].name.lastIndexOf(\".\");\n if (this.fileList[0].name.slice(Lastindex) != \".xls\" && this.fileList[0].name.slice(Lastindex) != \".xlsx\") {\n flag = false;\n this.$message({\n message: \"请选择正确的Excel格式\",\n type: \"warning\"\n });\n return false;\n } else {\n flag = true;\n }\n } else {\n flag = true;\n }\n this.bs64(file.raw).then(function (bs64) {\n _this6.formDate = {\n file: bs64\n };\n if (flag) {\n _this6.createLoad();\n (0, _getdata.BanImport)(_this6.formDate).then(function (res) {\n if (res.returnCode == \"1\") {\n _this6.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this6.clearLoad();\n _this6.getlist();\n } else {\n _this6.clearLoad();\n _this6.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n // console.log(res,'000')\n }).catch(function (err) {\n _this6.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n });\n }\n });\n },\n //导入\n handlePreview: function handlePreview() {\n this.formDate = new FormData();\n this.$refs.upload.clearFiles();\n },\n beforeUpload: function beforeUpload(file) {\n console.log(file, 1111);\n },\n // 自定义上传 导入数据\n uploadFile: function uploadFile(item) {\n var _this7 = this;\n console.log(22222);\n var form = new FormData();\n form.append(\"file\", item.file);\n (0, _getdata.BanImport)(form).then(function (res) {\n if (res.returnCode == \"1\") {\n _this7.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this7.createLoad();\n _this7.getlist();\n } else {\n _this7.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n // console.log(res,'000')\n }).catch(function (err) {\n _this7.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n });\n },\n // 导出\n onOut: function onOut() {\n var _this8 = this;\n (0, _getdata.Own)().then(function (res) {\n if (res.returnCode === \"1\") {\n var str = \"belongCompany=\" + _this8.formInline.unit + \"&officeFloor=\" + _this8.formInline.floor + \"&officeRoomNo=\" + _this8.formInline.roomId + \"&officeStoried=\" + _this8.formInline.building + \"&useDeptId=\" + _this8.formInline.part;\n var url =\n // http://192.168.138.193:7080\n \"/greenH5/greenWebmodul/rest/greenOfficeHourseResource/exportByExcel?\" + str;\n // console.log(url,800)\n window.location.href = url;\n }\n });\n },\n //导入\n // onImport(){\n // },\n formatJson: function formatJson(filterVal, jsonData) {\n return jsonData.map(function (v) {\n return filterVal.map(function (j) {\n if (j === \"timestamp\") {\n return parseTime(v[j]);\n } else {\n return v[j];\n }\n });\n });\n },\n // 分页\n currentChanges: function currentChanges(val) {\n this.createLoad();\n this.page.limit = val;\n this.getlist();\n },\n getlist: function getlist() {\n var _this9 = this;\n var Content = {\n currentPage: this.page.limit,\n queryObj: {\n belongCompany: this.formInline.unit,\n officeFloor: this.formInline.floor,\n officeRoomNo: this.formInline.roomId,\n officeStoried: this.formInline.building,\n useDeptId: this.formInline.part\n }\n };\n (0, _getdata.ZyMange)(Content).then(function (res) {\n // console.log(res);\n if (res.returnCode == \"1\") {\n _this9.clearLoad();\n // console.log(res.returnData,888)\n _this9.tableData = res.returnData.data;\n _this9.page.total = res.returnData.total;\n _this9.page.limit = res.returnData.currentPage;\n if (_this9.page.total == 0) {\n _this9.$message({\n message: \"当前无数据\",\n type: \"success\"\n });\n } else {\n _this9.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n }\n } else {\n _this9.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this9.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this9.clearLoad();\n }, 300);\n });\n }\n }\n};",null]} |