{"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\\Mobile\\Manage\\MobileSaftyDanger.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Mobile\\Manage\\MobileSaftyDanger.vue","mtime":1688109363933},{"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/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\nimport _defineProperty from \"D:/jenkins/workspace/bzzgj-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\n\nvar _methods;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 moment from 'moment';\nimport CmgtSaftyDangerCheckrecordApi from '@/views/Manage/saftyDanger/api/CmgtSaftyDangerCheckrecordApi';\nimport nineLittlePlaceApi from '@/views/Manage/saftyDanger/api/nineLittlePlaceApi';\nimport programApi from '@/views/Manage/saftyDanger/api/programApi';\nimport productManage from '@/api/device/productManage.js';\nimport req from '@/request.js';\nimport resourceManage from '@/api/device/resourceManage.js';\nimport DingMaterialApi from \"./api/DingMaterialApi\";\nimport { mapState } from 'vuex';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nexport default {\n name: 'MobileDevice',\n data: function data() {\n var _ref;\n\n return _ref = {\n tabsClickInput: false,\n fieldData: '',\n uploadUrl: window.context.portal + '/file/v1/uploadFileForConfig',\n // 服务器上传地址\n previewUrl: window.context.portal + '/file/onlinePreviewController/v1/getFileById_',\n detailListFrom: {\n checkRecordId: null,\n unitId: null,\n reformImgUrlArray: [],\n imgUrlArray: [],\n checkDate: null,\n dangerContent: null,\n reformSugguest: null,\n reference: null,\n id: null\n },\n reviseShow: false,\n minDate: new Date('1900/01/01'),\n showCalendar: false,\n unitName: '',\n unitData: [],\n showUnit: false,\n popupShow: false,\n // unitTitle: '受检单位类别',\n // checksTitle: '排查方案名称',\n programmeData: [],\n value: '',\n methodData: [{\n text: '请选择',\n value: ''\n }, {\n text: '日常检查',\n value: '1'\n }, {\n text: '临时检查',\n value: '2'\n }],\n expireStatusList: [{\n text: '请选择',\n value: ''\n }, {\n text: '正常',\n value: '1'\n }, {\n text: '临期',\n value: '2'\n }, {\n text: '超期',\n value: '3'\n }],\n active: '0',\n activeIds: [],\n activeIndex: 0,\n policeList: [],\n treeData: [],\n queryParam: {\n pageBean: ''\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 't.expireStatus',\n relation: 'AND',\n value: ''\n }, {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 't.handleStatus',\n relation: 'AND',\n value: '1'\n }, {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 't.type',\n relation: 'AND',\n value: ''\n }, {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 't.unitId',\n relation: 'AND',\n value: ''\n }, {\n group: 'main',\n operation: 'BETWEEN',\n parentGroup: '',\n property: 't.latestReviewDate',\n relation: 'AND',\n value: ''\n }],\n page: 1,\n startPicker: false,\n statusData: {\n name: '',\n value: ''\n },\n title: '我的设备',\n currentUser: {},\n params: {\n trainingDate: ''\n }\n }, _defineProperty(_ref, \"previewUrl\", window.context.portal + '/file/onlinePreviewController/v1/getFileById_'), _defineProperty(_ref, \"columns\", []), _defineProperty(_ref, \"startColumns\", []), _defineProperty(_ref, \"product\", {\n name: '',\n id: ''\n }), _defineProperty(_ref, \"showPicker\", false), _defineProperty(_ref, \"deviceData\", []), _defineProperty(_ref, \"loading\", false), _defineProperty(_ref, \"finished\", true), _defineProperty(_ref, \"refreshing\", false), _ref;\n },\n computed: mapState({\n header: function header(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n }),\n created: function created() {\n this.yhztList = dictUtils.getDictItemsFromCache('aqjczt');\n this.dwlxList = dictUtils.getDictItemsFromCache('zhgl-dwlx');\n this.dwlxList = this.dwlxList.map(function (item) {\n return {\n text: item.name,\n value: item.value\n };\n });\n this.dwlxList.unshift({\n text: '所有受检单位',\n value: ''\n });\n },\n mounted: function mounted() {\n this.currentUser = JSON.parse(sessionStorage.getItem('currentUser'));\n this.deviceStatus = dictUtils.getDictItemsFromCache('sbzt'); // this.getProducts()\n\n this.getDevice();\n this.getTreen();\n this.getUnit();\n },\n methods: (_methods = {\n //选择事间\n onConfirmTime: function onConfirmTime(val) {\n this.querys[4].value = [this.dayjs(val[0]).format('YYYY-MM-DD'), this.dayjs(val[1]).format('YYYY-MM-DD')];\n this.showCalendar = false;\n },\n //确认\n reviseBtn: function reviseBtn() {\n var _this = this;\n\n console.log(this.detailListFrom);\n CmgtSaftyDangerCheckrecordApi.CSaftyDangerCheckrecordDetailUpdateById(this.detailListFrom, function (res) {\n console.log(res); // this.$notify({\n // type: 'success',\n // message: '修改成功',\n // duration: 2000\n // })\n\n _this.$toast.success('修改成功');\n\n _this.handelCloseDetail();\n\n _this.page = 1;\n _this.deviceData = [];\n\n _this.getDevice();\n });\n },\n // 图片转换\n convertImg: function convertImg(arr) {\n var _this2 = this;\n\n var newArr = [];\n\n if (Array.isArray(arr)) {\n newArr = arr.map(function (it) {\n return {\n url: _this2.previewUrl + it,\n id: it\n };\n });\n return newArr;\n }\n\n console.log(newArr);\n },\n beforeAvatarUpload: function beforeAvatarUpload(file) {\n var isJPG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg';\n var isLt10M = file.size / 1024 / 1024 < 10;\n\n if (!isJPG) {\n this.$message.error('上传图片只能是 JPG 格式!');\n }\n\n if (!isLt10M) {\n this.$message.error('上传图片大小不能超过 10MB!');\n }\n\n return isJPG && isLt10M;\n },\n handleAvatarSuccess: function handleAvatarSuccess(res, file, fileList) {\n if (res.success) {\n var arr = [];\n arr.push(res.fileId);\n this.detailListFrom.imgUrlArray = this.detailListFrom.imgUrlArray.concat(arr);\n } else {\n this.$message.error('上传文件失败!');\n }\n },\n handleAvatarSuccess1: function handleAvatarSuccess1(res, file, fileList) {\n if (res.success) {\n var arr = [];\n arr.push(res.fileId);\n this.detailListFrom.reformImgUrlArray = this.detailListFrom.reformImgUrlArray.concat(arr);\n } else {\n this.$message.error('上传文件失败!');\n }\n },\n handleRemove: function handleRemove(file, fileList) {\n var _this3 = this;\n\n this.detailListFrom.imgUrlArray.forEach(function (e, index) {\n if (e == file.id) {\n _this3.detailListFrom.imgUrlArray.splice(index, 1);\n }\n });\n },\n handleRemove1: function handleRemove1(file, fileList) {\n var _this4 = this;\n\n this.detailListFrom.reformImgUrlArray.forEach(function (e, index) {\n if (e == file.id) {\n _this4.detailListFrom.reformImgUrlArray.splice(index, 1);\n }\n });\n },\n //\n onConfirm: function onConfirm(date) {\n this.detailListFrom.checkDate = moment(date).format('YYYY-MM-DD');\n this.showPicker = false;\n },\n //清空\n handelCloseDetail: function handelCloseDetail() {\n this.detailListFrom = {\n checkRecordId: null,\n unitId: null,\n imgUrlArray: [],\n reformImgUrlArray: [],\n checkDate: null,\n dangerContent: null,\n reformSugguest: null,\n reference: null,\n id: null\n };\n this.reviseShow = false;\n },\n //修改关闭\n reviseShowBack: function reviseShowBack() {\n this.handelCloseDetail();\n }\n }, _defineProperty(_methods, \"onConfirmTime\", function onConfirmTime(val) {\n this.querys[4].value = [this.dayjs(val[0]).format('YYYY-MM-DD'), this.dayjs(val[1]).format('YYYY-MM-DD')];\n this.showCalendar = false;\n }), _defineProperty(_methods, \"getUnit\", function getUnit() {\n var _this5 = this;\n\n nineLittlePlaceApi.loadCmgtSaftyDangerUnit({\n pageBean: {\n pageSize: -1,\n page: 1\n }\n }, function (res) {\n // this.total = res.total\n console.log(res);\n _this5.unitData = res.rows;\n });\n }), _defineProperty(_methods, \"resetBtn\", function resetBtn() {\n this.querys[4].value = '';\n this.querys[3].value = '';\n this.unitName = '';\n this.page = 1;\n this.deviceData = [];\n this.getDevice();\n this.popupShow = false;\n }), _defineProperty(_methods, \"confirmBtn\", function confirmBtn() {\n this.page = 1;\n this.deviceData = [];\n this.getDevice();\n this.popupShow = false;\n }), _defineProperty(_methods, \"unitConfirm\", function unitConfirm(val) {\n console.log(val);\n this.querys[3].value = val.id;\n this.unitName = val.unitName;\n this.showUnit = false;\n }), _defineProperty(_methods, \"popupShowBack\", function popupShowBack() {\n // this.querys[3].value = ''\n // this.querys[4].value = ''\n // this.unitName = ''\n this.popupShow = false;\n }), _defineProperty(_methods, \"seoBtn\", function seoBtn(v) {\n // this.regionMast = 1\n // this.siftActive = '0'\n this.popupShow = true;\n }), _defineProperty(_methods, \"tabsClick\", function tabsClick(name, title) {\n console.log(name);\n\n if (name == '0') {\n // this.active = '0'\n this.querys[1].value = 1;\n this.tabsClickInput = false;\n }\n\n if (name == '1') {\n // this.active = '1'\n this.querys[1].value = 2;\n this.tabsClickInput = false;\n }\n\n if (name == '2') {\n // this.active = '2'\n this.querys[1].value = 3;\n this.tabsClickInput = true;\n }\n\n this.page = 1;\n this.deviceData = [];\n this.getDevice();\n }), _defineProperty(_methods, \"loadData\", function loadData(id) {\n var _this6 = this;\n\n var queryParam = {\n pageBean: {},\n querys: []\n };\n queryParam.pageBean = {\n page: 1,\n pageSize: -1\n };\n queryParam.querys = [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'typeId',\n relation: 'AND',\n value: id\n }];\n productManage.productInfo(queryParam).then(function (res) {\n console.log(res); // this.total = res.total\n\n _this6.columns = res.rows.map(function (item) {\n return {\n value: item.id,\n text: item.name\n };\n });\n _this6.columns[0] = {\n text: '请选择',\n value: ''\n };\n });\n }), _defineProperty(_methods, \"onNavClick\", function onNavClick(val) {\n console.log(val);\n this.loadData(val.id);\n }), _defineProperty(_methods, \"getTreen\", function getTreen() {\n var _this7 = this;\n\n productManage.productType().then(function (res) {\n res.value.map(function (item) {\n item.children = item.children.map(function (items) {\n return {\n children: [],\n id: items.id,\n text: items.name\n };\n });\n });\n _this7.getTreenData = res.value;\n _this7.treeData = res.value.map(function (item) {\n return {\n children: item.children,\n id: item.id,\n text: item.name\n };\n });\n console.log(_this7.treeData); // this.$set(this.treeData)\n });\n }), _defineProperty(_methods, \"handleDetail\", function handleDetail(row) {\n this.detailListFrom.checkRecordId = row.checkRecordId;\n this.detailListFrom.unitId = row.unitId;\n this.detailListFrom.imgUrlArray = row.imgUrlArray ? row.imgUrlArray : [];\n this.detailListFrom.reformImgUrlArray = row.reformImgUrlArray ? row.reformImgUrlArray : [];\n this.detailListFrom.checkDate = row.checkDate;\n this.detailListFrom.dangerContent = row.dangerContent;\n this.detailListFrom.reformSugguest = row.reformSugguest;\n this.detailListFrom.reference = row.reference;\n this.detailListFrom.id = row.id;\n this.detailListFrom.fileList = row.fileList;\n this.reviseShow = true;\n }), _defineProperty(_methods, \"onCancel\", function onCancel() {\n this.showPicker = false;\n }), _defineProperty(_methods, \"onLoad\", function onLoad() {\n var _this8 = this;\n\n setTimeout(function () {\n _this8.page++;\n _this8.loading = true;\n\n _this8.getDevice();\n }, 500);\n }), _defineProperty(_methods, \"onRefresh\", function onRefresh() {\n var _this9 = this;\n\n setTimeout(function () {\n _this9.page = 1;\n _this9.refreshing = true;\n _this9.deviceData = [];\n\n _this9.getDevice();\n }, 500);\n }), _defineProperty(_methods, \"unitChange\", function unitChange(v) {\n this.page = 1;\n this.deviceData = [];\n this.getDevice();\n }), _defineProperty(_methods, \"teamChange\", function teamChange(v) {\n this.page = 1;\n this.deviceData = [];\n this.getDevice();\n }), _defineProperty(_methods, \"orgChange\", function orgChange(v) {\n this.page = 1;\n this.deviceData = [];\n this.getDevice();\n }), _defineProperty(_methods, \"getDevice\", function getDevice() {\n var _this10 = this;\n\n this.finished = false;\n this.queryParam.pageBean = {\n pageSize: 10,\n page: this.page\n }; // this.loading = true\n\n this.queryParam.querys = [];\n\n if (this.querys[0].value) {\n this.queryParam.querys.push(this.querys[0]);\n }\n\n if (this.querys[1].value) {\n this.queryParam.querys.push(this.querys[1]);\n }\n\n if (this.querys[2].value) {\n this.queryParam.querys.push(this.querys[2]);\n }\n\n if (this.querys[3].value) {\n this.queryParam.querys.push(this.querys[3]);\n }\n\n if (this.querys[4].value) {\n this.queryParam.querys.push(this.querys[4]);\n }\n\n CmgtSaftyDangerCheckrecordApi.CSaftyDangerAbarbeitungList(this.queryParam, function (res) {\n // console.log(res, 'res')\n // res.rows.forEach(item => {\n // this.dwlxList.forEach(val => {\n // if (item.unitType == val.value) {\n // item['unitTypeName'] = val.text\n // }\n // })\n // })\n _this10.loading = false;\n _this10.deviceData = _this10.deviceData.concat(res.value.rows);\n console.log(_this10.deviceData); // 如果加载完毕,显示没有更多了\n\n if (res.value.rows.length === 0) {\n _this10.finished = true;\n }\n\n setTimeout(function () {\n //code\n _this10.refreshing = false;\n }, 1000);\n });\n }), _methods)\n};",null]}