{"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\\MqiCheckData.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\maintenanceInspection\\MqiCheckData.vue","mtime":1719252794903},{"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 \"core-js/modules/es6.regexp.split\";\nimport _typeof from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/typeof.js\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.map\";\nimport _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nvar _name$components$comp;\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\nimport { mapState } from 'vuex';\nimport req from '@/request.js';\nimport basicData from '@/api/basicData.js';\nimport eipOrgSelector from '@/components/eipControl/selector/EipOrgSelector.vue';\nimport sctionInfoSelector from '@/components/selector/sctionInfoSelector.vue';\nimport companyInfoSelector from '@/components/selector/companyInfoSelector.vue';\nimport fileUpload from '@/components/upload/fileUploadProject.vue';\nimport CascaderCompany from '@/components/selector/CascaderCompany.vue';\nvar portal = window.context.portal;\nimport _ from 'lodash';\nexport default (_name$components$comp = {\n name: 'MqiCheckData',\n components: {\n // eipOrgSelector,\n sctionInfoSelector: sctionInfoSelector,\n // companyInfoSelector,\n fileUpload: fileUpload,\n CascaderCompany: CascaderCompany\n },\n computed: {\n headers: function headers(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n },\n data: function data() {\n return {\n submiting: false,\n detailTableColumn: [{\n name: '方向',\n key: 'direction',\n width: 120,\n type: 'dict'\n }, {\n name: '开始桩号',\n key: 'startPeg',\n width: 120,\n type: 'input'\n }, {\n name: '结束桩号',\n key: 'endPeg',\n width: 120,\n type: 'input'\n }, {\n name: 'MQI',\n key: 'mqiAvg',\n width: 100,\n type: 'inputNumber'\n }, {\n name: '长度',\n key: 'length',\n width: 100,\n type: 'inputNumber'\n }, {\n name: '路基SCI',\n key: 'sciAvg',\n width: 100,\n type: 'inputNumber'\n }, {\n name: '路面PQI',\n key: 'pqiAvg',\n width: 80,\n type: 'inputNumber'\n }, {\n name: '桥隧构造物BCI',\n key: 'bciAvg',\n width: 120,\n type: 'inputNumber'\n }, {\n name: '沿线设施TCI',\n key: 'tciAvg',\n width: 100,\n type: 'inputNumber'\n }, {\n name: '操作',\n key: 'opt',\n width: 100,\n type: 'button'\n }],\n importData: {\n title: 'MQI',\n templateName: 'MQI.xls',\n downloadUrl: '/assets/excel/MQI.xlsx',\n importUrl: window.context.yhxt + '/bizMqiCheckDetail/v1/importData',\n mqiId: '',\n contractId: '',\n contractName: ''\n },\n action: window.context.yhxt + '/bizMqiCheckDetail/v1/import',\n dictSelection: [],\n //勾选复选框\n\n accessories: [],\n dadToSon: {\n bizPath: 'mqi',\n fileList: []\n },\n fileList: [],\n roadData: [],\n company: [],\n searchForm: {\n yearValue: '',\n checkDate: ''\n },\n companyOptions: [],\n dataBaseOptions: {\n dataBaseId: '',\n tableName: 'biz_mqi_check_data',\n // 必填\n tableSchema: ''\n },\n originAPIOptions: {\n url: '/bizMqiCheckData/v1/getJson',\n // 列表请求接口地址\n method: 'post',\n // 列表请求方法\n moduleRoot: 'yhxt' // 微服务根路径\n },\n\n exportQuery: {},\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 bizMqiCheckData: {\n roadSegmentName: '',\n //路段名称\n roadSegmentId: '',\n //路段ID\n lane: '1',\n //车道值\n laneValue: '行车道1',\n companyName: '',\n year: '',\n //年份\n checkDate: ''\n // direction: '1', //方向\n // rating: '1' //评定等级\n },\n\n detailList: [],\n accessoryList: []\n },\n permission: 'b',\n MqiData: [],\n //mqi表格数据\n key: '',\n tableData: [],\n currentStartIndex: 0,\n currentEndIndex: 20,\n rules: {\n roadSegmentName: {\n required: true,\n message: '路段名称',\n trigger: 'blur'\n },\n companyName: {\n required: true,\n message: '所属公司',\n trigger: 'blur'\n },\n year: {\n required: true,\n message: '年份',\n trigger: 'blur'\n },\n lane: {\n required: true,\n message: 'MQI数据',\n trigger: 'blur'\n },\n checkDate: {\n required: true,\n message: '检查日志',\n trigger: 'blur'\n }\n },\n loadingdetailList: false\n };\n },\n directives: {\n loadmore: {\n // componentUpdated updated\n componentUpdated: function componentUpdated(el, binding, vnode, oldVnode) {\n // 设置默认溢出显示数量\n var spillDataNum = 10;\n // 设置隐藏函数\n var timeout = false;\n var setRowDisableNone = function setRowDisableNone(topNum, showRowNum, binding) {\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(function () {\n binding.value.call(null, topNum, topNum + showRowNum + spillDataNum);\n });\n };\n setTimeout(function () {\n var dataSize = vnode.data.attrs['data-size'];\n var oldDataSize = oldVnode.data.attrs['data-size'];\n if (dataSize === oldDataSize) return;\n var selectWrap = el.querySelector('.el-table__body-wrapper');\n var selectTbody = selectWrap.querySelector('table tbody');\n var selectRow = selectWrap.querySelector('table tr');\n if (!selectRow) {\n return;\n }\n var rowHeight = selectRow.clientHeight;\n var showRowNum = Math.round(selectWrap.clientHeight / rowHeight);\n var createElementTR = document.createElement('tr');\n var createElementTRHeight = (dataSize - showRowNum - spillDataNum) * rowHeight;\n createElementTR.setAttribute('style', \"height: \".concat(createElementTRHeight, \"px;\"));\n selectTbody.append(createElementTR);\n\n // 监听滚动后事件\n selectWrap.addEventListener('scroll', function () {\n var topPx = this.scrollTop - spillDataNum * rowHeight;\n var topNum = Math.round(topPx / rowHeight);\n var minTopNum = dataSize - spillDataNum - showRowNum;\n if (topNum > minTopNum) {\n topNum = minTopNum;\n }\n if (topNum < 0) {\n topNum = 0;\n topPx = 0;\n }\n selectTbody.setAttribute('style', \"transform: translateY(\".concat(topPx, \"px)\"));\n createElementTR.setAttribute('style', \"height: \".concat(createElementTRHeight - topPx > 0 ? createElementTRHeight - topPx : 0, \"px;\"));\n setRowDisableNone(topNum, showRowNum, binding);\n });\n });\n }\n }\n }\n}, _defineProperty(_name$components$comp, \"computed\", mapState({\n // submitUrl: function () {\n // return `${window.context.portal}/portal/commonBasic/v1/`\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 + '/bizMqiCheckData/v1/removes';\n },\n headers: function headers(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n },\n filteredData: function filteredData() {\n var _this = this;\n var list = this.tableData.filter(function (item, index) {\n if (index < _this.currentStartIndex) {\n return false;\n } else if (index > _this.currentEndIndex) {\n return false;\n } else {\n return true;\n }\n });\n return list;\n }\n})), _defineProperty(_name$components$comp, \"created\", function created() {\n this.init();\n this.company = this.getCompany();\n this.roadData = this.getroad();\n var moment = require('moment');\n this.searchForm.yearValue = moment().subtract(1, 'years').format('YYYY');\n this.findinfo();\n}), _defineProperty(_name$components$comp, \"methods\", {\n sonToDad: function sonToDad(data) {\n // console.log(data)\n var arr = [];\n data.forEach(function (item) {\n arr.push(_defineProperty({\n isDele: item.isDele,\n name: item.name,\n url: item.url,\n suffix: item.suffix,\n type: item.type\n }, \"type\", 0));\n });\n this.accessories = arr;\n this.form.accessoryList = this.accessories;\n },\n handelLoadmore: function handelLoadmore(currentStartIndex, currentEndIndex) {\n this.currentStartIndex = currentStartIndex;\n this.currentEndIndex = currentEndIndex;\n },\n //初始化年份\n init: function init() {\n var myDate = new Date();\n // var data = myDate.toLocaleDateString()\n var year = myDate.getFullYear(); //获取当前年\n this.initSelectYear(year);\n this.form.bizMqiCheckData.year = year;\n this.form.bizMqiCheckData.yearValue = year;\n this.form.bizMqiCheckData.checkDate = this.getDate();\n },\n //计算要显示年份\n initSelectYear: function initSelectYear(year) {\n this.years = [];\n for (var i = 0; i < 12; i++) {\n this.years.push({\n value: year - i,\n label: year - i + '年'\n });\n }\n },\n //年份赋值\n yearChange: function yearChange(value) {\n this.form.bizMqiCheckData.yearValue = value;\n this.form.bizMqiCheckData.year = value;\n },\n //所属桥梁获取焦点触发事件\n handleFocusRoad: function handleFocusRoad() {\n this.$refs.road.open();\n },\n //所属桥梁打开弹框\n openRoad: function openRoad() {\n this.$refs.road.open();\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 _this2 = this;\n basicData.getByIdMQIData(data.id).then(function (res) {\n _this2.form = res;\n console.log(res);\n _this2.tableData = _.cloneDeep(_this2.form.detailList);\n _this2.dadToSon.fileList = res.accessoryList;\n // this.accessories = res.accessoryList\n });\n\n console.log(this.dadToSon);\n console.log();\n var form = {\n roadSegmentName: '',\n //路段名称\n roadSegmentId: '',\n //路段ID\n lane: '1',\n //车道值\n laneValue: '行车道1',\n companyName: '',\n year: '' //年份\n // direction: '1', //方向\n // rating: '1' //评定等级\n };\n\n this.sourceId = data.id;\n this.type = 'edit';\n this.form = _objectSpread(_objectSpread({}, form), this.form);\n this.dialogVisible = true;\n },\n handleClose: function handleClose(done) {\n //清空表单\n this.form = {\n bizMqiCheckData: {\n roadSegmentName: '',\n //路段名称\n roadSegmentId: '',\n //路段ID\n lane: '1',\n //车道值\n laneValue: '行车道1',\n year: '' //年份\n // direction: '1', //方向\n // rating: '1' //评定等级\n },\n\n detailList: []\n };\n done();\n },\n //取消弹窗\n handleCancel: function handleCancel() {\n //清空表单\n // this.form = {companyName: '', companyId: ''}\n this.form = {\n bizMqiCheckData: {\n roadSegmentName: '',\n //路段名称\n roadSegmentId: '',\n //路段ID\n lane: '1',\n //车道值\n laneValue: '行车道1',\n companyName: '',\n year: '' //年份\n // direction: '1', //方向\n // rating: '1' //评定等级\n },\n\n detailList: []\n };\n this.dialogVisible = false;\n },\n //提交保存或者修改\n handleSubmit: function handleSubmit() {\n var _this3 = this;\n this.submiting = true;\n //验证表单是否填写完\n this.$refs.form.validate(function (bool) {\n console.log(_this3.form);\n if (bool) {\n _this3.submiting = true;\n _this3.form.detailList = _this3.tableData.map(function (item) {\n if (item.key) {\n delete item.key;\n delete item.id;\n }\n return item;\n });\n\n //请求保存提交\n basicData.addMQIData(_this3.form).then(function (res) {\n //请求附件管理\n // this.getEnclosureData(res.value.id)\n _this3.$message.success(res.message);\n _this3.form = {\n bizMqiCheckData: {\n roadSegmentName: '',\n //路段名称\n roadSegmentId: '',\n //路段ID\n lane: '1',\n //车道值\n laneValue: '行车道1',\n companyName: '',\n year: '' //年份\n // direction: '1', //方向\n // rating: '1' //评定等级\n },\n\n detailList: [],\n accessoryList: []\n };\n _this3.dialogVisible = false;\n _this3.$refs.htTable.load();\n }).finally(function () {\n _this3.submiting = false;\n });\n } else {\n _this3.submiting = false;\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 var moment = require('moment');\n this.searchForm = _objectSpread(_objectSpread({}, this.searchForm), {}, {\n companyId: ['1419863231459102720'],\n companyIds: '',\n roadSegmentName: '',\n checkDate: '',\n yearValue: '',\n startTime: '',\n endTime: ''\n });\n this.searchForm.yearValue = moment().subtract(1, 'years').format('YYYY');\n this.findinfo();\n },\n findinfo: function findinfo() {\n var _this4 = this;\n typeof this.$refs.filterTable !== 'undefined' && this.$refs.filterTable.clearFilter();\n var query = [];\n var search = {\n company_id_: this.searchForm.companyIds,\n road_segment_id_: this.searchForm.roadSegmentName,\n // check_date_: this.searchForm.checkDate,\n year_value_: this.searchForm.yearValue,\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 == 'road_segment_id_') {\n query.push({\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'road_segment_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.getMQIData(data).then(function (res) {\n console.log(res, '11');\n _this4.data = res.rows;\n _this4.pageResult = {\n page: res.page,\n pageSize: res.pageSize,\n total: res.total\n };\n });\n },\n getroad: function getroad() {\n var arr = [];\n basicData.getRoadManagement().then(function (res) {\n res.rows.forEach(function (item) {\n arr.push({\n value: item.name,\n key: item.id\n });\n });\n console.log(arr, '12');\n });\n return arr;\n },\n getCompany: function getCompany() {\n var _this5 = this;\n this.$http.post('${yhxt}/Company/v1/getCompany').then(function (res) {\n res.data.forEach(function (item) {\n _this5.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 _this6 = 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 // check_date_: this.searchForm.checkDate,\n // year_value_: this.searchForm.yearValue,\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 this.exportQuery = param;\n basicData.getMQIData(param).then(function (response) {\n // console.log(response)\n _this6.data = response.rows;\n _this6.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 //车道字典回调\n handleDict: function handleDict(val, obj, str) {\n if (str === 'zxjc-MQIjc') {\n if (obj) {\n this.form.bizMqiCheckData.laneValue = obj.name;\n }\n } else if (str === 'qlfx') {\n if (obj) {\n this.form.bizMqiCheckData.directionValue = obj.name;\n }\n } else if (str === 'MQI-pddj') {\n if (obj) {\n this.form.bizMqiCheckData.directionValue = obj.name;\n }\n }\n },\n //添加表格数据\n addTableData: function addTableData() {\n this.tableData.push({\n id: this.tableData.length + Math.random() + new Date().getTime(),\n key: this.tableData.length + Math.random() + new Date().getTime(),\n direction: '1',\n //方向\n rating: '1' //评定等级\n });\n },\n //删除表格数据\n delTableData: function delTableData(id) {\n // console.log(key)\n this.tableData = this.tableData.filter(function (item) {\n return item.id !== id;\n });\n },\n //路段信息赋值\n changed: function changed(obj) {\n console.log(obj);\n this.form.bizMqiCheckData.roadSegmentName = obj.name;\n this.form.bizMqiCheckData.roadSegmentId = obj.id;\n this.form.bizMqiCheckData.companyId = obj.companyId;\n this.form.bizMqiCheckData.companyName = obj.companyName;\n this.form.bizMqiCheckData.routeName = obj.routeName;\n this.form.bizMqiCheckData.routeId = obj.routeId;\n },\n //默认赋值为第一条数据的值\n value: function value(obj) {\n console.log(obj);\n if (this.type == 'add') {\n this.form.bizMqiCheckData.roadSegmentName = obj.name;\n this.form.bizMqiCheckData.roadSegmentId = obj.id;\n this.form.bizMqiCheckData.companyId = obj.companyId;\n this.form.bizMqiCheckData.companyName = obj.companyName;\n this.form.bizMqiCheckData.routeName = obj.routeName;\n this.form.bizMqiCheckData.routeId = obj.routeId;\n }\n },\n //公司赋值\n handleChanged: function handleChanged(obj) {\n // console.log(obj.valueInfo.join(','))\n this.form.bizMqiCheckData.companyIds = JSON.stringify(obj.valueInfo);\n this.form.bizMqiCheckData.companyName = obj.name;\n this.form.bizMqiCheckData.companyId = obj.id;\n },\n companyValue: function companyValue(obj) {\n // console.log(obj)\n this.form.bizMqiCheckData.companyName = obj.name;\n this.form.bizMqiCheckData.companyId = obj.id;\n this.form.bizMqiCheckData.companyIds = JSON.stringify(obj.id.split(' '));\n //必须是空格\n },\n handleprogress: function handleprogress(file, fileList) {},\n handleSuccess: function handleSuccess(res) {\n var _this7 = this;\n console.log(res);\n this.loadingdetailList = true;\n res.value.forEach(function (item) {\n _this7.tableData.push(item);\n });\n this.loadingdetailList = false;\n console.log(this.tableData, 'this.form.detailList');\n },\n handelExport: function handelExport() {\n var _this8 = this;\n console.log('点了');\n if (!this.dictSelection.length) {\n this.$message.warning(\"\\u8BF7\\u9009\\u62E9\\u8981\\u5BFC\\u51FA\\u7684\\u6570\\u636E\");\n return;\n } else {\n var msg = \"\\u786E\\u5B9A\\u5BFC\\u51FA\\u9009\\u4E2D\\u6570\\u636E\\u5417?\";\n this.$confirm(msg, '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n var id = [];\n _this8.dictSelection.forEach(function (item) {\n console.log(item);\n id.push(item.id);\n });\n var param = _this8.qs.stringify({\n id: id.join(',')\n });\n // 调用接口 提交数据\n var url = window.context.yhxt + '/bizMqiCheckDetail/v1/export?' + param;\n req.downloadGet(url);\n _this8.dictSelection = [];\n // this.$http.get(\n // '${yhxt}/assessment/curingAssessment/v1/exportCuringAssessment?' +\n // param\n // )(res => {\n // this.dictSelection = []\n // this.$refs.htTable.load()\n // })\n }).catch(function () {\n _this8.$message({\n type: 'info',\n message: \"\\u5DF2\\u5BFC\\u51FA\\u9009\\u4E2D\\u7684\\u6570\\u636E\"\n });\n _this8.$refs.htTable.load(); //重新获取数据\n });\n }\n },\n handleCommand: function handleCommand(params) {\n if (params.command == 'admin') {\n this.handelExport();\n }\n },\n downLoadTemplete: function downLoadTemplete() {\n var _this9 = this;\n this.loading = true;\n req.downloadGet(\"\".concat(portal, \"/yhxt/api/file/download?fileType=2\")).then(function (res) {\n _this9.loading = false;\n var blob = new Blob([res.data], {\n type: 'application/vnd.ms-excel'\n });\n var link = document.createElement('a'); //定义一个a标签\n link.href = window.URL.createObjectURL(blob); //需要生成一个 URL 来实现下载,链接到blob上\n link.download = '文件'; //下载后的文件名称\n link.click(); //模拟在按钮上实现一次鼠标点击\n window.URL.revokeObjectURL(link.href); //释放 URL 对象\n }).catch(function () {\n _this9.loading = false;\n });\n },\n handleSelect: function handleSelect(selection) {\n this.dictSelection = selection;\n console.log(selection);\n if (selection.length == 1) {\n this.importData.mqiId = selection[0].id;\n } else {\n this.importData.mqiId = '';\n }\n },\n load: function load() {\n this.$refs.htTable.load();\n }\n}), _name$components$comp);",null]}