{"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\\maintenanceInspection\\specialProjectInspection\\SpecialInspectionBridge.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\maintenanceInspection\\specialProjectInspection\\SpecialInspectionBridge.vue","mtime":1717697645384},{"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 _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.reflect.delete-property\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.array.find-index\";\nimport _toConsumableArray from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nimport \"core-js/modules/es6.function.name\";\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\nimport { mapState } from 'vuex';\nimport req from '@/request.js';\nimport basicData from '@/api/basicData.js';\nimport eipOrgSelector from '@/components/eipControl/selector/EipOrgSelector.vue';\nimport bridgeInfoSelector from '@/components/selector/bridgeInfoSelector.vue';\nimport LoadSelect from '@/components/selector/LoadSelect.vue';\nimport companyInfoSelector from '@/components/selector/companyInfoSelector.vue';\nimport InputSearch from '@/components/inputSearch/InputSearch.vue';\nimport CascaderCompany from '@/components/selector/CascaderCompany.vue';\nexport default {\n name: 'SpacialInspectionBridge',\n components: {\n // eipOrgSelector,\n bridgeInfoSelector: bridgeInfoSelector,\n // companyInfoSelector,\n InputSearch: InputSearch,\n CascaderCompany: CascaderCompany,\n LoadSelect: LoadSelect\n },\n data: function data() {\n return {\n updata: {\n bizPath: 'bridge'\n },\n dialogImageUrl: '',\n updialogVisible: false,\n files: [],\n fileList: [],\n company: [],\n searchForm: {\n checkDate: [],\n startTime: '',\n endTime: ''\n },\n companyOptions: [],\n data: [],\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n dialogVisible: false,\n dialogVisibleEnclosure: false,\n //判断是否是添加还是修改\n type: '',\n form: {\n companyIds: '',\n companyName: '',\n companyId: '',\n fileList: []\n },\n permission: 'b',\n //附件数据\n enclosureData: [],\n //附件管理所需id\n sourceId: '',\n //删除附件管理ids\n ids: [],\n loading: false,\n //上传附件加载控制\n disabled: false,\n //按钮禁用控制\n downLoading: false,\n //文件导出加载控制\n accept: '.jpg,.jpeg,.png,.bmp,.pdf,.JPG,.JPEG,.PBG,.BMP,.PDF,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.rtf,.txt,.zip,.rar,.vsd,.dwg,',\n // files: [],\n rules: {\n brigeName: {\n required: true,\n message: '桥梁名称',\n trigger: 'blur'\n },\n // checkConclusion: {required: true, message: '检查结论', trigger: 'blur'},\n checkDate: {\n required: true,\n message: '检查日期',\n trigger: 'blur'\n },\n checkUnit: {\n required: true,\n message: '检查单位',\n trigger: 'blur'\n },\n operator: {\n required: true,\n message: '经办人',\n trigger: 'blur'\n },\n rummager: {\n required: true,\n message: '检查人',\n trigger: 'blur'\n },\n checkContent: {\n required: true,\n message: '检查内容',\n trigger: 'blur'\n },\n url: {\n required: true,\n message: '附件地址',\n trigger: 'blur'\n },\n companyName: {\n required: true,\n message: '请选择所属公司',\n trigger: 'blur'\n },\n fileList: {\n required: true,\n message: '请上传文件',\n trigger: 'change'\n }\n },\n accessories: [],\n select: {\n data: [],\n page: 1,\n more: true\n }\n };\n },\n computed: mapState({\n // submitUrl: function () {\n // return `${window.context.portal}/portal/commonBasic/v1/`\n // },\n upload: function upload() {\n return window.context.yhxt + '/bizAccessory/v1/minioUpload';\n },\n downLoad: function downLoad() {\n return \"\".concat(window.context.portal, \"/bizAccessory/v1/minioDrawingUpload?sourceId=\").concat(this.sourceId);\n },\n deleteUrl: function deleteUrl() {\n return window.context.yhxt + '/bizBridgeSpecialCheck/v1/updateBridge';\n },\n headers: function headers(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n }),\n created: function created() {\n this.company = this.getCompany();\n var moment = require('moment');\n var firstDayOfYear = moment().startOf('year').format('YYYY-MM-DD');\n var lastDayOfYear = moment().endOf('year').format('YYYY-MM-DD');\n this.searchForm.checkDate = [firstDayOfYear, lastDayOfYear];\n this.searchForm.startTime = firstDayOfYear;\n this.searchForm.endTime = lastDayOfYear;\n this.findinfo();\n },\n methods: {\n getSelectOptionData: function getSelectOptionData(param) {\n var _this = this;\n var data = {\n pageBean: {\n page: param.page,\n pageSize: 10,\n showTotal: true\n },\n querys: []\n };\n if (param.keyword) {\n data.querys.push({\n group: 'advance',\n operation: 'LIKE',\n property: 'name_',\n relation: 'AND',\n value: param.keyword\n });\n }\n return new Promise(function (resolve) {\n basicData.getBridgeManagement(data).then(function (res) {\n if (!res.rows) {\n resolve();\n }\n res.rows.forEach(function (item) {\n item.name = item.name + '(' + item.directionValue + ')';\n });\n // 如果加载跟多合并之前的数据\n if (param.more) {\n _this.select.data = [].concat(_toConsumableArray(_this.select.data), _toConsumableArray(res.rows));\n } else {\n _this.select.data = res.rows;\n }\n _this.select.page = res.page;\n var page = res.page,\n pageSize = res.pageSize,\n total = res.total;\n _this.select.more = page * pageSize < total;\n resolve();\n });\n });\n },\n loadSelectChange: function loadSelectChange(data) {\n this.form.brigeId = data.id;\n this.form.brigeName = data.name;\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 this.form.accessories = imgList;\n if (file.id) {\n basicData.deleteEnclosureManagement(file.id).then(function (res) {});\n }\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 _this2 = this;\n if (file.id) {\n req.downloadGetCopy(window.context.yhxt + \"/bizAccessory/v1/minIoAllDownFile?bizPath=bridge&ids=\".concat(file.id)).then(function (res) {\n if (res) {\n _this2.$message.success('下载成功');\n }\n });\n } else {\n this.$message.info('请先保存附件');\n }\n },\n //所属桥梁获取焦点触发事件\n handleFocusRouter: function handleFocusRouter() {\n this.$refs.bridge.open();\n },\n //所属桥梁打开弹框\n openRoute: function openRoute() {\n this.$refs.bridge.open();\n },\n //选取桥梁回填数据\n handleSelectBridge: function handleSelectBridge(data) {\n this.form.brigeName = data.name;\n this.form.brigeId = data.id;\n this.$refs.brigeName.focus();\n this.$refs.brigeName.blur();\n },\n afterDelete: function afterDelete() {\n this.$refs.htTable.load();\n },\n //新增\n handleAdd: function handleAdd() {\n this.dialogVisible = true;\n this.type = 'add';\n },\n //修改\n handleEdit: function handleEdit(data) {\n var _this3 = this;\n this.type = 'edit';\n this.$http.get('${form}/bizBridgeSpecialCheck/v1/getVo/' + data.id).then(function (res) {\n console.log(res);\n _this3.form = res.data.bizBridgeSpecialCheck;\n _this3.fileList = res.data.accessories;\n _this3.files = res.data.accessories;\n _this3.dialogVisible = true;\n });\n },\n handleClose: function handleClose(done) {\n //清空表单\n this.form = {\n companyIds: '',\n companyName: '',\n companyId: ''\n };\n this.files = [];\n this.fileList = [];\n this.dialogVisible = false;\n // done()\n },\n //取消弹窗\n handleCancel: function handleCancel() {\n //清空表单\n // this.form = {companyName: '', companyId: ''}\n this.form = {\n companyIds: '',\n companyName: '',\n companyId: ''\n };\n this.files = [];\n this.fileList = [];\n this.dialogVisible = false;\n },\n //提交保存或者修改\n handleSubmit: function handleSubmit() {\n var _this4 = this;\n //验证表单是否填写完\n console.log(this.form);\n this.$refs.form.validate(function (bool) {\n if (bool) {\n Reflect.deleteProperty(_this4.form, 'fileList');\n var data = {\n bizBridgeSpecialCheck: _this4.form,\n accessories: _this4.accessories\n };\n basicData.addSpecialProjectInspectionData(data).then(function (res) {\n //请求附件管理\n _this4.$message.success(res.message);\n _this4.form = {\n companyIds: '',\n companyName: '',\n companyId: ''\n };\n //打开修改弹窗\n _this4.dialogVisible = false;\n _this4.$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 companyId: ['1419863231459102720'],\n companyIds: '',\n checkDate: '',\n brigeName: '',\n startTime: '',\n endTime: ''\n });\n var moment = require('moment');\n var firstDayOfYear = moment().startOf('year').format('YYYY-MM-DD');\n var lastDayOfYear = moment().endOf('year').format('YYYY-MM-DD');\n this.searchForm.checkDate = [firstDayOfYear, lastDayOfYear];\n this.searchForm.startTime = firstDayOfYear;\n this.searchForm.endTime = lastDayOfYear;\n this.findinfo();\n },\n findinfo: function findinfo() {\n var _this5 = this;\n typeof this.$refs.filterTable !== 'undefined' && this.$refs.filterTable.clearFilter();\n var query = [];\n var search = {\n company_id_: this.searchForm.companyIds,\n // check_date_: this.searchForm.checkDate,\n brige_name_: this.searchForm.brigeName,\n startTime: this.searchForm.startTime,\n endTime: this.searchForm.endTime\n };\n for (var i in search) {\n if (search[i]) {\n if (i == 'company_id_') {\n query.push({\n group: 'companyIds',\n operation: 'IN',\n parentGroup: '',\n property: 'COMPANY_ID_',\n relation: 'AND',\n value: search[i]\n });\n } else if (i == 'startTime') {\n query.push({\n group: 'main',\n operation: 'GREAT_EQUAL',\n parentGroup: '',\n property: 'check_date_',\n relation: 'AND',\n value: search[i]\n });\n } else if (i == 'endTime') {\n query.push({\n group: 'main',\n operation: 'LESS_EQUAL',\n parentGroup: '',\n property: 'check_date_',\n relation: 'AND',\n value: search[i]\n });\n } else {\n query.push({\n group: 'advance',\n operation: 'LIKE',\n property: i,\n relation: 'AND',\n value: search[i]\n });\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 basicData.getSpecialProjectInspectionData(data).then(function (res) {\n console.log(res, '11');\n _this5.data = res.rows;\n _this5.pageResult = {\n page: res.page,\n pageSize: res.pageSize,\n total: res.total\n };\n });\n },\n getCompany: function getCompany() {\n var _this6 = this;\n this.$http.post('${yhxt}/Company/v1/getCompany').then(function (res) {\n res.data.forEach(function (item) {\n _this6.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 _this7 = 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 // check_date_: this.searchForm.checkDate,\n // brige_name_: this.searchForm.brigeName\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 basicData.getSpecialProjectInspectionData(param).then(function (response) {\n console.log(response);\n _this7.data = response.rows;\n _this7.pageResult = {\n page: response.page,\n pageSize: response.pageSize,\n total: response.total\n };\n }).finally(function () {\n if (cb) {\n cb();\n }\n });\n },\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.accessories = imgList;\n this.form.fileList = fileList;\n // 防止用户打开了文件选择框之后不选择文件而出现效验失败\n if (this.form.fileList) {\n this.$refs.form.clearValidate('fileList');\n }\n },\n //路线信息赋值\n changed: function changed(obj) {\n this.form.brigeName = obj.name;\n this.form.brigeId = obj.id;\n this.form.companyName = obj.companyName;\n this.form.companyId = obj.companyId;\n },\n value: function value(obj) {\n console.log(obj);\n this.form.brigeName = obj.name;\n this.form.brigeId = obj.id;\n this.form.companyName = obj.companyName;\n this.form.companyId = obj.companyId;\n }\n }\n};",null]}