{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Mobile\\Manage\\MobileTrainingPlan.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Mobile\\Manage\\MobileTrainingPlan.vue","mtime":1688109363933},{"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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport SecurityFileApi from '@/views/Manage/saftyDanger/api/SecurityFileApi'\r\nimport nineLittlePlaceApi from '@/views/Manage/saftyDanger/api/nineLittlePlaceApi'\r\nimport programApi from '@/views/Manage/saftyDanger/api/programApi'\r\nimport productManage from '@/api/device/productManage.js'\r\nimport req from '@/request.js'\r\nimport resourceManage from '@/api/device/resourceManage.js'\r\nimport DingMaterialApi from './api/DingMaterialApi'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nexport default {\r\n name: 'MobileDevice',\r\n data() {\r\n return {\r\n pickerType: '',\r\n minDate: new Date('1900/01/01'),\r\n showCalendar: false,\r\n unitName: '',\r\n unitData: [],\r\n showUnit: false,\r\n popupShow: false,\r\n value: '',\r\n methodData: [\r\n {\r\n text: '请选择',\r\n value: ''\r\n },\r\n {text: '日常检查', value: '1'},\r\n {text: '临时检查', value: '2'}\r\n ],\r\n active: '0',\r\n activeIds: [],\r\n activeIndex: 0,\r\n policeList: [],\r\n treeData: [],\r\n queryParam: {\r\n pageBean: ''\r\n },\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'unit_name_',\r\n relation: 'AND',\r\n value: ''\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'type_',\r\n relation: 'AND',\r\n value: ''\r\n },\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'name_',\r\n relation: 'AND',\r\n value: ''\r\n }\r\n ],\r\n page: 1,\r\n startPicker: false,\r\n statusData: {name: '', value: ''},\r\n title: '我的设备',\r\n currentUser: {},\r\n params: {\r\n trainingDate: ''\r\n },\r\n previewUrl:\r\n window.context.portal + '/file/onlinePreviewController/v1/getFileById_', //图标预览\r\n columns: [], //产品列表\r\n startColumns: [],\r\n product: {\r\n name: '',\r\n id: ''\r\n },\r\n showPicker: false,\r\n deviceData: [],\r\n loading: false,\r\n finished: true,\r\n refreshing: false\r\n }\r\n },\r\n created() {\r\n this.yhztList = dictUtils.getDictItemsFromCache('aqjczt')\r\n this.dwlxList = dictUtils.getDictItemsFromCache('zhgl-dwlx')\r\n this.dwlxList = this.dwlxList.map(item => {\r\n return {text: item.name, value: item.value}\r\n })\r\n this.dwlxList.unshift({\r\n text: '所有单位类别',\r\n value: ''\r\n })\r\n },\r\n mounted() {\r\n this.currentUser = JSON.parse(sessionStorage.getItem('currentUser'))\r\n this.deviceStatus = dictUtils.getDictItemsFromCache('sbzt')\r\n\r\n // this.getProducts()\r\n this.getDevice()\r\n this.getTreen()\r\n this.getUnit()\r\n },\r\n methods: {\r\n //搜索\r\n onSearch() {\r\n this.page = 1\r\n this.deviceData = []\r\n this.getDevice()\r\n },\r\n onConfirmTime(val) {\r\n this.querys[4].value = [\r\n this.dayjs(val[0]).format('YYYY-MM-DD'),\r\n this.dayjs(val[1]).format('YYYY-MM-DD')\r\n ]\r\n this.showCalendar = false\r\n },\r\n //获取单位\r\n getUnit() {\r\n nineLittlePlaceApi.loadCmgtSaftyDangerUnit(\r\n {\r\n pageBean: {\r\n pageSize: -1,\r\n page: 1\r\n }\r\n },\r\n res => {\r\n // this.total = res.total\r\n console.log(res)\r\n this.unitData = res.rows.map(item => {\r\n return {\r\n text: item.unitName,\r\n value: item.id\r\n }\r\n })\r\n this.unitData.unshift({\r\n text: '所有单位',\r\n value: ''\r\n })\r\n }\r\n )\r\n },\r\n //重置\r\n resetBtn() {\r\n this.querys[2].value = ''\r\n this.querys[1].value = ''\r\n this.pickerType = ''\r\n this.page = 1\r\n this.deviceData = []\r\n this.getDevice()\r\n this.popupShow = false\r\n },\r\n //确认\r\n confirmBtn() {\r\n this.page = 1\r\n this.deviceData = []\r\n this.getDevice()\r\n this.popupShow = false\r\n },\r\n //返回\r\n popupShowBack() {\r\n // this.querys[2].value = ''\r\n // this.querys[1].value = ''\r\n // this.pickerType = ''\r\n this.popupShow = false\r\n },\r\n //搜索\r\n seoBtn(v) {\r\n // this.regionMast = 1\r\n // this.siftActive = '0'\r\n this.popupShow = true\r\n },\r\n // 获取产品信息\r\n loadData(id) {\r\n let queryParam = {\r\n pageBean: {},\r\n querys: []\r\n }\r\n queryParam.pageBean = {\r\n page: 1,\r\n pageSize: -1\r\n }\r\n queryParam.querys = [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'typeId',\r\n relation: 'AND',\r\n value: id\r\n }\r\n ]\r\n productManage.productInfo(queryParam).then(res => {\r\n console.log(res)\r\n // this.total = res.total\r\n this.columns = res.rows.map(item => {\r\n return {\r\n value: item.id,\r\n text: item.name\r\n }\r\n })\r\n this.columns[0] = {\r\n text: '请选择',\r\n value: ''\r\n }\r\n })\r\n },\r\n onNavClick(val) {\r\n console.log(val)\r\n this.loadData(val.id)\r\n },\r\n // 产品组织树查询\r\n getTreen() {\r\n productManage.productType().then(res => {\r\n res.value.map(item => {\r\n item.children = item.children.map(items => {\r\n return {\r\n children: [],\r\n id: items.id,\r\n text: items.name\r\n }\r\n })\r\n })\r\n this.getTreenData = res.value\r\n this.treeData = res.value.map(item => {\r\n return {\r\n children: item.children,\r\n id: item.id,\r\n text: item.name\r\n }\r\n })\r\n console.log(this.treeData)\r\n // this.$set(this.treeData)\r\n })\r\n },\r\n // 跳转设备详情\r\n handleDetail(item) {\r\n this.$router.push({\r\n name: 'MobileTrainingPlanDetail',\r\n query: {id: item.id}\r\n })\r\n // if (this.active == '2') {\r\n // }\r\n },\r\n onCancel() {\r\n this.showPicker = false\r\n },\r\n onLoad() {\r\n // // this.loading = true\r\n // // this.getDevice()\r\n setTimeout(() => {\r\n this.page++\r\n this.loading = true\r\n this.getDevice()\r\n }, 500)\r\n },\r\n onRefresh() {\r\n setTimeout(() => {\r\n this.page = 1\r\n this.refreshing = true\r\n this.deviceData = []\r\n this.getDevice()\r\n }, 500)\r\n },\r\n unitChange(v) {\r\n console.log(v)\r\n this.pickerType = v.text\r\n this.querys[1].value = v.value\r\n this.showPicker = false\r\n // this.page = 1\r\n // this.deviceData = []\r\n // this.getDevice()\r\n },\r\n teamChange(v) {\r\n this.page = 1\r\n this.deviceData = []\r\n this.getDevice()\r\n },\r\n orgChange(v) {\r\n this.page = 1\r\n this.deviceData = []\r\n this.getDevice()\r\n },\r\n getDevice() {\r\n this.finished = false\r\n this.queryParam.pageBean = {pageSize: 10, page: this.page}\r\n this.queryParam.querys = []\r\n if (this.querys[0].value) {\r\n this.queryParam.querys.push(this.querys[0])\r\n }\r\n if (this.querys[1].value) {\r\n this.queryParam.querys.push(this.querys[1])\r\n }\r\n if (this.querys[2].value) {\r\n this.queryParam.querys.push(this.querys[2])\r\n }\r\n SecurityFileApi.loadCmgtSaftyTrainingPlan(this.queryParam, res => {\r\n // console.log(res, 'res')\r\n res.rows.forEach(item => {\r\n this.dwlxList.forEach(val => {\r\n if (item.unitType == val.value) {\r\n item['unitTypeName'] = val.text\r\n }\r\n })\r\n })\r\n this.loading = false\r\n this.deviceData = this.deviceData.concat(res.rows)\r\n console.log(this.deviceData)\r\n\r\n // 如果加载完毕,显示没有更多了\r\n if (res.rows.length === 0) {\r\n this.finished = true\r\n }\r\n setTimeout(() => {\r\n //code\r\n this.refreshing = false\r\n }, 1000)\r\n })\r\n }\r\n }\r\n}\r\n",null]}