| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getLaboratoryFacilityPowerStablePage, |
| | | deviceScopeSearch, |
| | | treeDevice, |
| | | selectUserCondition, |
| | | addLaboratoryFacilityPowerStable, |
| | | deleteFeMeasuredQuantity |
| | | } from '@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | search: { |
| | | size: 20, |
| | | size: 10, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | |
| | | methods: { |
| | | // åå§åè°ç¨ |
| | | initData() { |
| | | this.$axios.get(this.$api.facilitiesAndEnvironment.getLaboratoryFacilityPowerStablePage + '?size=' + this.search.size + '¤t=' + this.search.current).then(res => { |
| | | if (res.code === 201) return; |
| | | this.tableData = res.data.records; |
| | | this.search.total = res.data.total; |
| | | }); |
| | | getLaboratoryFacilityPowerStablePage({ |
| | | ...this.search |
| | | }).then(res => { |
| | | if (res.code === 200){ |
| | | this.tableData = res.data.records; |
| | | this.search.total = res.data.total; |
| | | } |
| | | }) |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.size = val; |
| | |
| | | // è·åææè®¾å¤ |
| | | getEquipOptions() { |
| | | this.equipOptions = [] |
| | | this.$axios.get(this.$api.deviceScope.deviceScopeSearch+'?status=0').then(res => { |
| | | deviceScopeSearch({status:'0'}).then(res => { |
| | | if (res.code === 200 && res.data) { |
| | | this.equipOptions = res.data |
| | | } |
| | |
| | | }, |
| | | // çµæºç¨³å®æ§-æå¼å¼¹æ¡è°ç¨è®¾å¤æ¥å£ï¼æ¥è¯¢ä½¿ç¨çè®¾å¤ |
| | | openDialog() { |
| | | this.$axios.get(this.$api.deviceScope.treeDevice).then(res => { |
| | | treeDevice().then(res => { |
| | | this.cascaderList = res.data; |
| | | }); |
| | | }) |
| | | this.$nextTick(() => { |
| | | this.$refs['form'].clearValidate() |
| | | }) |
| | |
| | | this.submitLoading = true |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.$axios.post(this.$api.facilitiesAndEnvironment.addLaboratoryFacilityPowerStable, this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | addLaboratoryFacilityPowerStable(this.form).then(res => { |
| | | this.submitLoading = false |
| | | if (res.code === 200) { |
| | | this.initData() |
| | |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { |
| | | selectUserCondition().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | id: a.id, |
| | | name: a.name |
| | | }) |
| | | }) |
| | | this.responsibleOptions = data |
| | | } |
| | | }) |
| | | }, |