{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\yhxt-web\\src\\views\\basicDataManagement\\children\\Builder.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\basicDataManagement\\children\\Builder.vue","mtime":1709835205614},{"path":"D:\\jenkins\\workspace\\yhxt-web\\babel.config.js","mtime":1667326389982},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\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 _typeof from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/typeof.js\";\nimport _toConsumableArray from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nimport _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.map\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.array.find-index\";\nimport \"core-js/modules/web.dom.iterable\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { mapState } from 'vuex';\nimport org from '@/api/org.js';\nimport req from '@/request.js';\nimport orgrequest from '@/api/org.js';\nimport utils from '@/hotent-ui-util.js';\nimport basicData from '@/api/basicData.js';\nimport RoadInfoDialog from '@/components/dialog/RoadInfoDialog.vue';\nimport companyInfoSelector from '@/components/selector/companyInfoSelector.vue';\nvar orgTree = function orgTree() {\n return import('@/views/uc/org/OrgTree.vue');\n};\nexport default {\n components: {\n RoadInfoDialog: RoadInfoDialog,\n companyInfoSelector: companyInfoSelector,\n orgTree: orgTree\n },\n computed: mapState({\n deleteUrl: function deleteUrl() {\n return window.context.yhxt + '/bizMigrantBuildersInformation/v1/updateMigrantWorkersInformation';\n },\n headers: function headers(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n },\n upload: function upload() {\n return window.context.yhxt + '/bizAccessory/v1/minioUpload';\n }\n }),\n data: function data() {\n return {\n loading: false,\n reFresh: true,\n updata: {\n bizPath: 'builders'\n },\n dialogImageUrl: '',\n updialogVisible: false,\n files: [],\n fileList: [],\n showDialogId: '',\n showDialogName: '',\n selectOrgId: '',\n //默认选择外单位管理 1258608622670319616\n selectOrgName: '',\n orgList: [],\n //下拉框待选择的组织\n demList: [],\n //下拉框待选择的维度\n treeData: [],\n //树形菜单展示的数组\n defaultProps: {\n children: 'children',\n label: 'name'\n },\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n company: [],\n roadData: [],\n searchForm: {},\n companyOptions: [],\n genderOptions: [{\n label: '男',\n value: '1'\n }, {\n label: '女',\n value: '2'\n }],\n data: [],\n dialogVisible: false,\n dialogVisibleEnclosure: false,\n //判断是否是添加还是修改\n type: '',\n form: {\n gender: '1'\n },\n permission: 'b',\n disabled: false,\n //按钮禁用控制\n //文件上传地址\n rules: {\n workerName: {\n required: true,\n message: '请输入人员姓名',\n trigger: 'blur'\n },\n idNumber: [{\n required: true,\n message: '请输入身份证号',\n trigger: 'blur'\n }, {\n pattern: /(^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{2}$)/,\n message: '请输入合法身份证号',\n trigger: 'blur'\n }],\n gender: {\n required: true,\n message: '请选择性别',\n trigger: 'blur'\n },\n age: {\n required: true,\n message: '请输入年龄',\n trigger: 'blur'\n },\n nation: {\n required: true,\n message: '请输入民族',\n trigger: 'blur'\n },\n phoneNum: [{\n required: true,\n message: '请输入手机号',\n trigger: 'blur'\n },\n // 这个只能验证手机号\n // { pattern:/^0{0,1}(13[0-9]|15[7-9]|153|156|18[7-9])[0-9]{8}$/, message: \"请输入合法手机号\", trigger: \"blur\" }\n {\n pattern: /^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/,\n message: '请输入合法手机号/电话号',\n trigger: 'blur'\n }],\n companyName: {\n required: true,\n message: '请选择公司',\n trigger: 'blur'\n },\n insuranceAmount: {\n required: true,\n message: '请输入保险额度',\n trigger: 'blur'\n },\n insuranceStartDate: {\n required: true,\n message: '请选择保险生效时间',\n trigger: 'blur'\n },\n insuranceEndDate: {\n required: true,\n message: '请选择保险到期时间',\n trigger: 'blur'\n }\n }\n };\n },\n created: function created() {\n this.company = this.getCompany();\n },\n mounted: function mounted() {\n var _this = this;\n //维度-组织数据\n // this.getAllDemList()\n //获取用户导入按钮参数\n orgrequest.getDescAll().then(function (rep) {\n for (var i = 0; i < rep.length; i++) {\n _this.orgList.push({\n key: rep[i].id,\n value: rep[i].demName\n });\n if (rep[i].isDefault === 1) {\n _this.selectOrgId = rep[i].id;\n }\n }\n });\n },\n watch: {\n selectOrgId: function selectOrgId(orgId, oldOrgId) {\n var _this2 = this;\n this.reFresh = false;\n this.$nextTick(function () {\n _this2.reFresh = true;\n });\n }\n },\n methods: {\n uploadBeforeFile: function uploadBeforeFile() {\n this.loading = true;\n },\n error: function error() {\n this.loading = false;\n },\n success: function success(response, file, fileList) {\n this.loading = false;\n this.$message({\n type: response.state == true ? 'success' : 'warning',\n message: response.state == true ? '上传成功' : '上传失败'\n });\n var imgList = [];\n fileList.forEach(function (item) {\n if (!item.id) {\n if (item.response) {\n imgList.push(item.response.value);\n }\n } else {\n imgList.push(item);\n }\n });\n this.fileList = fileList;\n this.files = imgList;\n },\n //删除事件\n handleRemove: function handleRemove(file) {\n var INdex = this.fileList.findIndex(function (item) {\n return item.uid == file.uid;\n });\n this.fileList.splice(INdex, 1);\n var imgList = [];\n this.fileList.forEach(function (item) {\n if (!item.id) {\n if (item.response) {\n imgList.push(item.response.value);\n }\n } else {\n imgList.push(item);\n }\n });\n if (file.id) {\n basicData.deleteEnclosureManagement(file.id).then(function (res) {});\n }\n this.files = imgList;\n },\n handlePictureCardPreview: function handlePictureCardPreview(file) {\n if (file.name.split('.')[1] == 'jpg' || file.name.split('.')[1] == 'JPG' || file.name.split('.')[1] == 'jpeg' || file.name.split('.')[1] == 'JPEG' || file.name.split('.')[1] == 'png' || file.name.split('.')[1] == 'PNG' || file.name.split('.')[1] == 'bmp' || file.name.split('.')[1] == 'BMP' || file.name.split('.')[1] == 'gif' || file.name.split('.')[1] == 'GIF') {\n this.dialogImageUrl = file.url;\n } else {\n this.dialogImageUrl = require(\"../../../assets/downImg/\\u6587\\u4EF6\\u5939.png\");\n }\n this.updialogVisible = true;\n },\n handleDownload: function handleDownload(file) {\n var _this3 = this;\n if (file.id) {\n req.downloadGetCopy(window.context.yhxt + \"/bizAccessory/v1/minIoAllDownFile?bizPath=builders&ids=\".concat(file.id)).then(function (res) {\n if (res) {\n _this3.$message.success('下载成功');\n }\n });\n } else {\n this.$message.info('请先保存附件');\n }\n },\n rowClick: function rowClick(row, column, event) {\n this.$refs.htTable.$refs.htTable.toggleRowSelection(row);\n },\n orgTreeClick: function orgTreeClick(orgbytree) {\n console.log(orgbytree);\n if (orgbytree.id == '1419863231459102720') return;\n //重置数据\n var ary = this.$refs.htTable.querys;\n for (var i = 0; i < ary.length; i++) {\n if (ary[i].group && ary[i].group == 'orgTree') {\n ary.remove(ary[i]);\n }\n }\n var quickSearchEl = document.querySelector('.quick-search input');\n if (quickSearchEl && !quickSearchEl.value) {\n this.$refs.htTable.querys = [];\n }\n if (!orgbytree.code) {\n this.$refs.htTable.querys = [];\n this.showDialogId = '';\n this.showDialogName = '';\n this.form.companyId = this.showDialogId;\n this.form.companyName = this.showDialogName;\n } else {\n this.orgCode = orgbytree.code;\n var ids = [];\n var trees = '';\n this.getOrgTrees(orgbytree, ids);\n trees = ids.join(',');\n if (trees != '') {\n this.$refs.htTable.querys.push({\n property: 'companyId',\n value: trees,\n group: 'orgTree',\n relation: 'AND',\n operation: 'IN'\n });\n }\n this.showDialogId = trees;\n this.showDialogName = orgbytree.name;\n this.form.companyId = this.showDialogId;\n this.form.companyName = this.showDialogName;\n }\n this.$refs.htTable.load();\n },\n getOrgTrees: function getOrgTrees(node, ids) {\n ids.push(node.id);\n // let arr = node.children\n // if (arr) {\n // for (var i = 0; i < arr.length; i++) {\n // this.getOrgTrees(arr[i], ids)\n // }\n // }\n },\n handleRefresh: function handleRefresh(cb) {\n this.loadTreeData(cb);\n //重置数据\n var ary = this.$refs.htTable.querys;\n for (var i = 0; i < ary.length; i++) {\n if (ary[i].group && ary[i].group == 'orgTree') {\n ary.remove(ary[i]);\n }\n }\n this.$refs.htTable.load();\n this.showDialogId = '';\n this.showDialogName = '';\n },\n getAllDemList: function getAllDemList() {\n var _this4 = this;\n org.getDescAll().then(function (resp) {\n for (var i = 0; i < resp.length; i++) {\n _this4.orgList.push({\n key: resp[i].id,\n value: resp[i].demName\n });\n _this4.demList.push({\n key: resp[i].code,\n value: resp[i].demName\n });\n _this4.dimenList = resp;\n if (resp[i].isDefault === 0) {\n _this4.selectOrgId = resp[i].id;\n }\n }\n }).then(function (params) {\n var dem = {\n demId: _this4.selectOrgId\n };\n org.getByParentAndDemToTree(dem).then(function (data) {\n _this4.treeData = utils.tile2nest(data);\n });\n });\n },\n loadTreeData: function loadTreeData(cb) {\n var _this5 = this;\n var param = {\n demId: this.selectOrgId\n };\n org.getByParentAndDemToTree(param).then(function (data) {\n _this5.treeData = utils.tile2nest(data);\n cb && cb();\n });\n },\n // //字典回调数据\n handleDict: function handleDict(val, obj, str) {\n if (str === 'yxss') {\n this.form.typeValue = obj.name;\n } else if (str === 'fx') {\n this.form.directionValue = obj.name;\n }\n },\n //所属路段获取焦点触发事件\n handleFocusRouter: function handleFocusRouter() {\n this.$refs.road.open();\n },\n //所属路线打开弹框\n openRoad: function openRoad() {\n this.$refs.road.open();\n },\n //选取路线回填数据\n handleSelectRoad: function handleSelectRoad(data) {\n // console.log(data.name, '路线信息')\n this.form.roadSegmentName = data.name;\n this.form.roadSegmentId = data.id;\n this.$refs.roadSegmentName.focus();\n this.$refs.roadSegmentName.blur();\n // console.log(this.form.routeName)\n },\n afterDelete: function afterDelete() {\n this.$refs.htTable.load();\n },\n //新增\n handleAdd: function handleAdd() {\n console.log(this.form);\n this.fileList = [];\n this.dialogVisible = true;\n this.type = 'add';\n },\n //修改\n handleEdit: function handleEdit(data) {\n var _this6 = this;\n this.type = 'edit';\n this.$http.get('${form}/bizMigrantBuildersInformation/v1/getVo/' + data.id).then(function (res) {\n console.log(res);\n _this6.fileList = res.data.accessoryList;\n _this6.form = res.data.migrantBuildersInformation;\n _this6.dialogVisible = true;\n });\n },\n handleClose: function handleClose(done) {\n //清空表单\n this.form = {\n gender: '1'\n };\n this.files = [];\n this.fileList = [];\n done();\n },\n //取消弹窗\n handleCancel: function handleCancel() {\n //清空表单\n // this.form = {companyName: '', companyId: ''}\n this.form = {\n gender: '1'\n };\n this.files = [];\n this.fileList = [];\n this.dialogVisible = false;\n },\n //提交保存或者修改\n handleSubmit: function handleSubmit() {\n var _this7 = this;\n //验证表单是否填写完\n this.$refs.form.validate(function (bool) {\n if (bool) {\n //请求保存提交\n var data = {\n accessoryList: _this7.files,\n migrantBuildersInformation: _this7.form\n };\n _this7.$http.post('${yhxt}/bizMigrantBuildersInformation/v1/save', data).then(function (res) {\n // this.$message.success(res.message)\n //打开修改弹窗\n console.log(res);\n _this7.dialogVisible = false;\n _this7.$refs.htTable.load(); //重新获取数据\n });\n }\n });\n },\n uniqueFunc: function uniqueFunc(arr, uniId) {\n var res = new Map();\n return arr.filter(function (item) {\n return !res.has(item[uniId]) && res.set(item[uniId], 1);\n });\n },\n handleReset: function handleReset() {\n this.searchForm = _objectSpread(_objectSpread({}, this.searchForm), {}, {\n workerName: '',\n insuranceStartDate: '',\n insuranceEndDate: '',\n gender: ''\n });\n this.findinfo();\n },\n findinfo: function findinfo() {\n var _this8 = this;\n typeof this.$refs.filterTable !== 'undefined' && this.$refs.filterTable.clearFilter();\n var query = [];\n if (typeof this.$refs.htTable.querys !== 'undefined') {\n query = _toConsumableArray(this.$refs.htTable.querys);\n }\n var search = {\n company_id_: this.searchForm.companyId,\n gender: this.searchForm.gender,\n insuranceStartDate: this.searchForm.insuranceStartDate,\n insuranceEndDate: this.searchForm.insuranceEndDate,\n workerName: this.searchForm.workerName\n };\n for (var i in search) {\n if (search[i]) {\n query.push({\n group: 'advance',\n operation: 'LIKE',\n property: i,\n relation: 'AND',\n value: search[i]\n });\n }\n }\n query = this.uniqueFunc(query, 'property');\n var data = {\n pageBean: {\n page: 1,\n pageSize: 20,\n showTotal: true\n },\n querys: query\n };\n this.topQuery = query;\n this.$http.post('${yhxt}/bizMigrantBuildersInformation/v1/getJson', data).then(function (res) {\n console.log(res, '11');\n _this8.data = res.data.rows;\n _this8.pageResult = {\n page: res.data.page,\n pageSize: res.data.pageSize,\n total: res.data.total\n };\n });\n },\n getCompany: function getCompany() {\n var _this9 = this;\n this.$http.post('${yhxt}/Company/v1/getCompany').then(function (res) {\n res.data.forEach(function (item) {\n _this9.companyOptions.push({\n id: item.id,\n name: item.name\n });\n });\n });\n },\n //深层拷贝回去公司名称\n deepClone: function deepClone(obj) {\n var objClone = Array.isArray(obj) ? [] : {};\n if (obj && _typeof(obj) === 'object') {\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n //判断ojb子元素是否为对象,如果是,递归复制\n if (obj[key] && _typeof(obj[key]) === 'object') {\n objClone[key] = this.deepClone(obj[key]);\n } else {\n if (obj[key] == obj.name) {\n this.companyOptions.push({\n id: obj.id,\n name: obj.name\n });\n } //如果不是,简单复制\n objClone[key] = obj[key];\n }\n }\n }\n }\n },\n loadData: function loadData(param, cb) {\n var _this10 = this;\n // let r = JSON.stringify(param.pageBean)\n // let l = JSON.stringify(this.pageResult)\n // console.log(r, l)\n // if (r == l) {\n // console.log('一样')\n // param\n // } else {\n // console.log('不一样')\n // let query = []\n // let search = {\n // company_id_: this.searchForm.companyId,\n // road_segment_name_: this.searchForm.roadSegmentName,\n // type_: this.searchForm.type,\n // name_: this.searchForm.name\n // }\n // for (let i in search) {\n // if (search[i]) {\n // query.push({\n // group: 'advance',\n // operation: 'LIKE',\n // property: i,\n // relation: 'AND',\n // value: search[i]\n // })\n // }\n // }\n // param.querys = query\n // }\n if (typeof this.topQuery !== 'undefined' && this.topQuery.length !== 0) {\n param.querys = typeof param.querys !== 'undefined' ? param.querys : [];\n this.topQuery.forEach(function (item) {\n param.querys.push(item);\n });\n param.querys = this.uniqueFunc(param.querys, 'property');\n }\n if (param.querys) {\n param.querys.forEach(function (item) {\n if (item.property == 'companyName') {\n item.property = 'company_Name_';\n }\n });\n }\n this.$http.post('${yhxt}/bizMigrantBuildersInformation/v1/getJson', param).then(function (response) {\n console.log(response);\n _this10.data = response.data.rows;\n _this10.pageResult = {\n page: response.data.page,\n pageSize: response.data.pageSize,\n total: response.data.total\n };\n }).finally(function () {\n if (cb) {\n if (Object.keys(_this10.$route.params).length !== 0 && Object.keys(_this10.$route.params.value).length !== 0 && !_this10.isFindinfo) {\n _this10.isFindinfo = true;\n var obj = _this10.$route.params.value;\n _this10.orgTreeClick(obj);\n }\n cb();\n }\n });\n },\n changed: function changed(obj) {\n this.form.roadSegmentName = obj.name;\n this.form.roadSegmentId = obj.id;\n },\n //默认赋值为第一条数据的值\n value: function value(obj) {\n this.form.roadSegmentName = obj.name;\n this.form.roadSegmentId = obj.id;\n },\n //公司赋值\n handleChanged: function handleChanged(obj) {\n // console.log(obj.valueInfo.join(','))\n this.form.companyIds = JSON.stringify(obj.valueInfo);\n this.form.companyName = obj.name;\n this.form.companyId = obj.id;\n },\n companyValue: function companyValue(obj) {\n // console.log(obj)\n this.form.companyName = obj.name;\n this.form.companyId = obj.id;\n this.form.companyIds = JSON.stringify(obj.id.split(' ')); //必须是空格\n }\n }\n};",null]}