{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\resourceManage\\components\\unitManageDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\resourceManage\\components\\unitManageDialog.vue","mtime":1686792516249},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.split\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/bzzgj-fvue/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 resourceManage from '@/api/device/resourceManage.js';\nimport utils from '@/hotent-ui-util.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport { ExtendParamsMixin } from '@/mixins/extendParams.js';\nexport default {\n name: 'unitManageModal',\n mixins: [ExtendParamsMixin],\n data: function data() {\n var checkPhone = function checkPhone(rule, value, callback) {\n var moblie = /^1(3|4|5|6|7|8|9)\\d{9}$/; // 手机\n\n var tel = /^([2-9][0-9]{4,7})+(\\-[0-9]{1,4})?$/; //座机\n\n if (!moblie.test(value) && !tel.test(value)) {\n callback(new Error('联系电话不合规则'));\n } else {\n callback();\n }\n };\n\n return {\n visible: false,\n title: '新增',\n activeCollapse: '1',\n params: {\n companyAddress: '',\n companyCode: '',\n companyFax: '',\n companyMail: '',\n companyMan: '',\n companyName: '',\n companyShortName: '',\n companyTel: '',\n companyTypeShow: ['1'],\n companyType: '',\n memo: ''\n },\n companyType: [],\n //单位类型\n rules: {\n companyName: [{\n required: true,\n message: '请输入单位名称',\n trigger: 'change'\n }],\n companyShortName: [{\n required: true,\n message: '请输入单位简称',\n trigger: 'change'\n }],\n companyCode: [{\n required: true,\n message: '请输入单位编码',\n trigger: 'change'\n }],\n companyTypeShow: [{\n required: true,\n message: '请选择单位类型',\n trigger: 'change'\n }],\n companyTel: [{\n required: true,\n message: '请输入联系电话',\n trigger: 'blur'\n }, {\n validator: checkPhone,\n trigger: 'blur'\n }]\n }\n };\n },\n created: function () {\n var _created = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n this.companyType = dictUtils.getDictItemsFromCache('dwlx');\n _context.next = 3;\n return this.getExtendParams(1);\n\n case 3:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function created() {\n return _created.apply(this, arguments);\n }\n\n return created;\n }(),\n methods: {\n changeType: function changeType() {\n this.$forceUpdate();\n },\n add: function add() {\n // 扩展字段混入到表单绑定数据中\n // this.handleExtendParamsMixin()\n this.visible = true;\n },\n edit: function edit(row) {\n console.log(row);\n this.params = utils.deepClone(row);\n this.params.companyTypeShow = this.params.companyType ? this.params.companyType.split(',') : ['1']; // 获取扩展字段值\n // await this.getExtendParamsData(1, this.params.id)\n // 扩展字段混入到表单绑定数据中\n // this.handleExtendParamsMixin()\n\n this.visible = true;\n this.title = '修改';\n },\n handleClose: function handleClose() {\n this.params = {\n companyAddress: '',\n companyCode: '',\n companyFax: '',\n companyMail: '',\n companyMan: '',\n companyName: '',\n companyShortName: '',\n companyTel: '',\n companyTypeShow: ['1'],\n companyType: '',\n memo: ''\n };\n this.title = '新增';\n this.activeCollapse = '1';\n this.visible = false;\n },\n handleSave: function handleSave() {\n var _this = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n var tempData = utils.deepClone(_this.params);\n tempData.companyType = tempData.companyTypeShow.length ? tempData.companyTypeShow.join(',') : '';\n delete tempData.companyTypeShow; // 扩展字段提交前预处理数据\n\n tempData = _this.handleExtendParamsSave(tempData, '1');\n var method;\n\n if (_this.title === '新增') {\n method = resourceManage.addUnit; // console.log('新增')\n } else if (_this.title === '修改') {\n method = resourceManage.editUnit; // console.log('修改')\n } // console.log(tempData, 'tempData')\n\n\n method(tempData, function (response) {\n if (response.state) {\n _this.$notify({\n type: 'success',\n message: _this.title + '成功',\n duration: 2000\n });\n\n _this.handleClose();\n\n _this.$parent.loadData(1);\n } else {\n _this.$message.warning(response.message);\n }\n });\n } else {\n _this.$notify({\n type: 'warning',\n message: '请完善表单信息!',\n duration: 2000\n });\n }\n });\n }\n }\n};",null]}