| | |
| | | processReport, |
| | | processComplain, |
| | | inconsistentDistribution, |
| | | facilitiesAndEnvironment, |
| | | internalWastes, |
| | | foreignRegister, |
| | | } |
| | | } |
| | | |
| | |
| | | delInconsistentDistribution:'/inconsistentDistribution/delInconsistentDistribution', // ä¸ç¬¦å项çåå¸å é¤ |
| | | exportInconsistentDistribution:'/inconsistentDistribution/exportInconsistentDistribution', // 导åºä¸ç¬¦å项çåå¸ |
| | | } |
| | | |
| | | // 6.3 设æ½åç¯å¢æ¡ä»¶ |
| | | const facilitiesAndEnvironment = { |
| | | // 设æ½åç¯å¢æ¡ä»¶è¦æ±-设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨ |
| | | addFeLightningProtection: "/feIllumination/addFeLightningProtection", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨-æ£æµåºå æ°å¢/ä¿®æ¹ |
| | | deleteFeLightningProtection: "/feIllumination/deleteFeLightningProtection", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨-æ£æµåºå å é¤ |
| | | getFeLightningProtection: "/feIllumination/getFeLightningProtection", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨-æ£æµåºå æ¥è¯¢ |
| | | deleteFeIlluminationDetectionArea: "/feIllumination/deleteFeIlluminationDetectionArea", // ç
§åº¦è®°å½è¡¨-æ£æµåºå å é¤ |
| | | getFeIlluminationDetectionArea: "/feIllumination/getFeIlluminationDetectionArea", // ç
§åº¦è®°å½è¡¨-æ£æµåºå æ ¹æ®ç
§åº¦è®°å½æ¥è¯¢ |
| | | exportFeIllumination: "/feIllumination/exportFeIllumination", // ç
§åº¦è®°å½è¡¨-æ£æµåºå å¯¼åº |
| | | // 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµ |
| | | addLightningProtectionDetection: "/feLightningProtection/addLightningProtectionDetection", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµæ°å¢/ä¿®æ¹ |
| | | deleteLightningProtectionDetection: "/feLightningProtection/deleteLightningProtectionDetection", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµå é¤ |
| | | getLightningProtectionDetection: "/feLightningProtection/getLightningProtectionDetection", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµæ¥è¯¢ |
| | | exportOfLightningProtectionDetection: "/feLightningProtection/exportOfLightningProtectionDetection", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµå¯¼åº |
| | | // 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§ |
| | | addLaboratoryFacilityPowerStable: "/fePowerStable/addLaboratoryFacilityPowerStable", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§æ°å¢/ä¿®æ¹ |
| | | deleteLaboratoryFacilityPowerStable: "/fePowerStable/deleteLaboratoryFacilityPowerStable", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§å é¤ |
| | | getLaboratoryFacilityPowerStablePage: "/fePowerStable/getLaboratoryFacilityPowerStablePage", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§æ¥è¯¢ |
| | | getCalibrationDate: "/fePowerStable/getCalibrationDate", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§ æ°å¢ éæ©è®¾å¤åæ¥è¯¢ææ°è®¾å¤ç¼å·ï¼æ ¡åæ¥æ |
| | | deleteFeMeasuredQuantity: "/fePowerStable/deleteFeMeasuredQuantity", // 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§-æµå®é å é¤ |
| | | getFeMeasuredQuantityService: "/fePowerStable/getFeMeasuredQuantityService", // çµæºç¨³å®æ§-æµå®é æ ¹æ®çµæºç¨³å®æ§æ¥è¯¢ |
| | | exportFePowerStable: "/fePowerStable/exportFePowerStable", // çµæºç¨³å®æ§-æµå®é å¯¼åº |
| | | // 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-æ¸©æ¹¿åº¦è®°å½ |
| | | addFeTempHumDate: "/feTempHumDate/addFeTempHumDate", // è¯éªåºå-æ°å¢/ä¿®æ¹ |
| | | deleteFeTempHumDate: "/feTempHumDate/deleteFeTempHumDate", // è¯éªåºå-å é¤ |
| | | getFeTempHumDate: "/feTempHumDate/getFeTempHumDate", // è¯éªåºå-æ¥è¯¢" |
| | | addFeTempHumRecord: "/feTempHumDate/addFeTempHumRecord", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-æ¸©æ¹¿åº¦è®°å½æ°å¢/ä¿®æ¹ |
| | | deleteFeTempHumRecord: "/feTempHumDate/deleteFeTempHumRecord", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-温湿度记å½å é¤ |
| | | getFeTempHumRecordPage: "/feTempHumDate/getFeTempHumRecordPage", // 设æ½åç¯å¢æ¡ä»¶è¦æ±-æ¸©æ¹¿åº¦è®°å½æ¥è¯¢ |
| | | exportTemperatureAndHumidityRecords: '/feTempHumDate/exportTemperatureAndHumidityRecords', // 设æ½åç¯å¢æ¡ä»¶è¦æ±-æ¸©æ¹¿åº¦è®°å½ å¯¼åº |
| | | } |
| | | // 6.3ä¸åºå¤ç |
| | | const internalWastes = { |
| | | pageInternalWastes: '/internalWastes/pageInternalWastes', // å®å
¨å
å¡ä¸åºå¤çå页æ¥è¯¢ |
| | | getInternalWastesOne: '/internalWastes/getInternalWastesOne', // å®å
¨å
å¡ä¸åºå¤çæ¥ç详æ
|
| | | addInternalWastes: '/internalWastes/addInternalWastes', // å®å
¨å
å¡ä¸åºå¤çæ°å¢ |
| | | updateInternalWastes: '/internalWastes/updateInternalWastes', // å®å
¨å
å¡ä¸åºå¤çåé¡µä¿®æ¹ |
| | | delInternalWastes: '/internalWastes/delInternalWastes', // å®å
¨å
å¡ä¸åºå¤çå é¤ |
| | | exportInternalWastes: '/internalWastes/exportInternalWastes', // 导åºä¸åºå¤ç |
| | | } |
| | | // 6.3è¿åºäººåç»è®° |
| | | const foreignRegister = { |
| | | pageForeignRegister: '/foreignRegister/pageForeignRegister', // 夿¥äººåå页æ¥è¯¢ |
| | | getForeignRegisterOne: '/foreignRegister/getForeignRegisterOne', // 夿¥äººåæ¥ç详æ
|
| | | addForeignRegister: '/foreignRegister/addForeignRegister', // 夿¥äººåæ°å¢ |
| | | updateForeignRegister: '/foreignRegister/updateForeignRegister', // 夿¥äººåä¿®æ¹ |
| | | delForeignRegister: '/foreignRegister/delForeignRegister', // 夿¥äººåå é¤ |
| | | exportForeignRegister: '/foreignRegister/exportForeignRegister', // 导åºå¤æ¥äººå |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="夿¥äººå管çä¿¡æ¯" |
| | | width="80%" @close="closeThreeWastesDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="auto"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¥æ" prop="registerDate"> |
| | | <el-date-picker v-model="form.registerDate" |
| | | clearable |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è¿å
¥åºå" prop="area"> |
| | | <el-input v-model="form.area" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è¿å
¥äººå" prop="personnel"> |
| | | <el-input v-model="form.personnel" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è¿å
¥åå " prop="reason"> |
| | | <el-input v-model="form.reason" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="éªå人å" prop="accompanyingId"> |
| | | <el-select v-model="form.accompanyingId" clearable filterable |
| | | placeholder="è¯·éæ©éªå人å" size="small"> |
| | | <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¹å人ç¾å" prop="approveId"> |
| | | <el-select v-model="form.approveId" clearable filterable |
| | | placeholder="è¯·éæ©æ¹å人" size="small"> |
| | | <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¿å¯åå
¶å®æ
åµ" prop="confidentiality"> |
| | | <el-input v-model="form.confidentiality" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="夿³¨" prop="remark"> |
| | | <el-input v-model="form.remark" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeThreeWastesDia">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'Personnel-management-dia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | registerDate: '', |
| | | area: '', |
| | | personnel: '', |
| | | reason: '', |
| | | accompanyingId: '', |
| | | accompanyingName: '', |
| | | approveId: '', |
| | | approveName: '', |
| | | confidentiality: '', |
| | | remark: '', |
| | | }, |
| | | rules: { |
| | | registerDate: [{required: true, message: 'è¯·éæ©æ¥æ',trigger: 'change'}], |
| | | area: [{required: true, message: '请填åè¿å
¥åºå',trigger: 'blur'}], |
| | | personnel: [{required: true, message: '请填åè¿å
¥äººå',trigger: 'blur'}], |
| | | reason: [{required: true, message: '请填åè¿å
¥åå ',trigger: 'blur'}], |
| | | accompanyingId: [{required: true, message: 'è¯·éæ©éªå人å',trigger: 'change'}], |
| | | approveId: [{required: true, message: 'è¯·éæ©æ¹å人',trigger: 'change'}], |
| | | confidentiality: [{required: true, message: '请填åä¿å¯åå
¶ä»æ
åµ',trigger: 'blur'}], |
| | | remark: [{required: false, message: '请填å夿³¨',trigger: 'blur'}], |
| | | }, |
| | | operationType: '', |
| | | personList: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia (type, row) { |
| | | this.getAuthorizedPerson() |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type !== 'add') { |
| | | this.searchInfo(row) |
| | | } else { |
| | | this.form.accompanyingId = JSON.parse(localStorage.getItem("user")).userId |
| | | } |
| | | }, |
| | | // æ¥è¯¢è¯¦æ
|
| | | searchInfo (row) { |
| | | this.diaLoading = true |
| | | this.$axios(this.$api.foreignRegister.getForeignRegisterOne + '?registerId=' + row.registerId).then(res => { |
| | | this.diaLoading = false |
| | | if (res.code === 201) return |
| | | this.form = res.data |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.diaLoading = false |
| | | }) |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit () { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | const internalImplementDto = this.HaveJson(this.form) |
| | | const index = this.personList.findIndex(item => item.value === internalImplementDto.accompanyingId) |
| | | if (index > -1) { |
| | | internalImplementDto.accompanyingName = this.personList[index].label |
| | | } |
| | | const index1 = this.personList.findIndex(item => item.value === internalImplementDto.approveId) |
| | | if (index1 > -1) { |
| | | internalImplementDto.approveName = this.personList[index].label |
| | | } |
| | | if (this.operationType === 'add') { |
| | | this.$axios.post(this.$api.foreignRegister.addForeignRegister, internalImplementDto, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeThreeWastesDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else if (this.operationType === 'edit') { |
| | | this.$axios.post(this.$api.foreignRegister.updateForeignRegister, internalImplementDto, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeThreeWastesDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | closeThreeWastesDia () { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeThreeWastesDia') |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 160px">æ¥æï¼</span> |
| | | <el-date-picker v-model="searchForm.registerDate" |
| | | clearable |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | style="width: 100%" |
| | | type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" @click="handleDown">导 åº</el-button> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <ZTTable |
| | | :column="tableColumn" |
| | | :height="'calc(100vh - 20em)'" |
| | | :table-data="tableData" |
| | | :table-loading="tableLoading" |
| | | style="padding: 0 10px;margin-bottom: 16px"> |
| | | </ZTTable> |
| | | <el-pagination :current-page="1" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </div> |
| | | <personnel-management-dia v-if="threeWastesDia" ref="threeWastesDia" @closeThreeWastesDia="closeThreeWastesDia"></personnel-management-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ZTTable from '../../caorui/ZTTable/index.vue'; |
| | | import PersonnelManagementDia from './Personnel-management-dia.vue'; |
| | | import ThreeWastesDialog from './three-wastes-dialog.vue'; |
| | | |
| | | export default { |
| | | name: 'Personnel-management', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { ThreeWastesDialog, PersonnelManagementDia, ZTTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | registerDate: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'æ¥æ', |
| | | prop: 'registerDate', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'è¿å
¥åºå', |
| | | prop: 'area', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'è¿å
¥äººå', |
| | | prop: 'personnel', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'è¿å
¥åå ', |
| | | prop: 'reason', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'éªå人å', |
| | | prop: 'accompanyingName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ¹å人ç¾å', |
| | | prop: 'approveName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ä¿å¯åå
¶ä»æ
åµ', |
| | | prop: 'confidentiality', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | minWidth: '220', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | }, |
| | | total: 0, |
| | | threeWastesDia: false |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList () { |
| | | const entity = this.searchForm |
| | | const page = this.page |
| | | this.tableLoading = true |
| | | this.$axios.post(this.$api.foreignRegister.pageForeignRegister, {entity, page}, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // å é¤ |
| | | delPlan (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | this.$axios.get(this.$api.foreignRegister.delForeignRegister + '?registerId=' + row.registerId).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ°å¢ï¼ç¼è¾ï¼æ¹åå¼¹æ¡ |
| | | openFormDia (type, row) { |
| | | this.threeWastesDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.threeWastesDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | // å¯¼åº |
| | | handleDown (row) { |
| | | const entity = this.searchForm |
| | | this.$axios.post(this.$api.foreignRegister.exportForeignRegister,{entity},{ |
| | | responseType: "blob", |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '夿¥äººåç»è®°' + '.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | closeThreeWastesDia () { |
| | | this.threeWastesDia = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm () { |
| | | this.searchForm.registerDate = ''; |
| | | this.searchList() |
| | | }, |
| | | // å页 |
| | | handleSizeChange(val) { |
| | | this.page.size = val; |
| | | this.searchList(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.page.current = val; |
| | | this.searchList(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search-background { |
| | | width: 100%; |
| | | height: 60px; |
| | | line-height: 60px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 30px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 50px; |
| | | } |
| | | .search_label { |
| | | width: 80px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 120px); |
| | | } |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | height: calc(100vh - 18em); |
| | | } |
| | | |
| | | </style> |
| | | <template> |
| | | <div class="below-standard-main"> |
| | | <div style="width: 100%;height: 100%;"> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;">夿¥äººå管ç</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="small" type="primary" @click="$refs['ValueTable'].openAddDia('æ°å¢æ¥å£')" v-if="addPower">æ° å¢</el-button> |
| | | <el-button size="small" @click="$refs['ValueTable'].openDownDia()">导 åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ¥æï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | v-model="componentData.entity.sample" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="date" |
| | | size="small" |
| | | @change="refreshTable()" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.unPass.pageInsUnPass" :componentData="componentData" |
| | | :key="upIndex" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../../tool/value-table.vue' |
| | | export default { |
| | | components: { |
| | | ValueTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | componentData: { |
| | | entity: { |
| | | sample: null, |
| | | model: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [], |
| | | tagField: [], |
| | | selectField: [], |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | stateList: [], |
| | | addPower:true, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.getPower() |
| | | }, |
| | | methods :{ |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.upIndex++ |
| | | }, |
| | | // æéåé
|
| | | getPower(radio) { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-row> |
| | | <el-col :span="2"> |
| | | <el-menu style="height: 100vh;" @select="clickSelect" :default-active="activeName"> |
| | | <el-menu-item index="çµæºç¨³å®æ§"> |
| | | <span slot="title">çµæºç¨³å®æ§</span> |
| | | </el-menu-item> |
| | | <el-menu-item index="é²é·æ£æµ"> |
| | | <span slot="title">é²é·æ£æµ</span> |
| | | </el-menu-item> |
| | | <el-menu-item index="ç
§åº¦è®°å½"> |
| | | <span slot="title">ç
§åº¦è®°å½</span> |
| | | </el-menu-item> |
| | | <el-menu-item index="温湿度记å½"> |
| | | <span slot="title">温湿度记å½</span> |
| | | </el-menu-item> |
| | | </el-menu> |
| | | </el-col> |
| | | <el-col :span="22" style="padding: 10px"> |
| | | <power-supply-stability v-if="activeName === 'çµæºç¨³å®æ§'"/> |
| | | <lightning-protection-detection v-if="activeName === 'é²é·æ£æµ'" /> |
| | | <illuminance-recording v-if="activeName === 'ç
§åº¦è®°å½'"/> |
| | | <temperature-humidity-record v-if="activeName === '温湿度记å½'"/> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | // çµæºç¨³å®æ§ |
| | | import PowerSupplyStability from "./facilities-environmental-conditions/power-supply-stability.vue"; |
| | | // é²é·æ£æµ |
| | | import LightningProtectionDetection from "./facilities-environmental-conditions/lightning-protection-detection.vue"; |
| | | // ç
§åº¦è®°å½ |
| | | import IlluminanceRecording from "./facilities-environmental-conditions/illuminance-recording.vue"; |
| | | // æ¸©æ¹¿åº¦è®°å½ |
| | | import TemperatureHumidityRecord from "./facilities-environmental-conditions/temperature-humidity-record.vue"; |
| | | |
| | | export default { |
| | | components: {TemperatureHumidityRecord, IlluminanceRecording, LightningProtectionDetection, PowerSupplyStability}, |
| | | data() { |
| | | return { |
| | | activeName: "çµæºç¨³å®æ§" |
| | | } |
| | | }, |
| | | methods: { |
| | | clickSelect(index) { |
| | | this.activeName = index; |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="header"> |
| | | <div>ç
§åº¦è®°å½</div> |
| | | <div> |
| | | <el-button type="primary" size="small" @click="clickAdd">æ° å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | height="calc(100vh - 18em)"> |
| | | <el-table-column type="index" label="åºå·" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="conclusion" label="ç»è®º" min-width="180"></el-table-column> |
| | | <el-table-column prop="testDate" label="æµè¯æ¥æ" width="testDate" min-width="180"></el-table-column> |
| | | <el-table-column prop="testerUser" label="æ£æµè
" min-width="180"></el-table-column> |
| | | <el-table-column prop="checkerUser" label="æ ¸æ¥äºº" min-width="180"></el-table-column> |
| | | <el-table-column prop="deviceName" label="设å¤åç§°" min-width="180"></el-table-column> |
| | | <el-table-column prop="managementNumber" label="设å¤ç¼å·" min-width="180"></el-table-column> |
| | | <el-table-column prop="calibrationDate" label="æ ¡åæ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column prop="nextCalibrationDate" label="䏿¬¡æ ¡åæ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´" min-width="180"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½" min-width="140"> |
| | | <template v-slot="scope"> |
| | | <el-button type="text" size="small" @click="downLoadPost(scope.row)">导åº</el-button> |
| | | <el-button type="text" size="small" @click="edit(scope.row)">ç¼è¾</el-button> |
| | | <el-button type="text" size="small" @click="deleteRowFun(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | <el-dialog |
| | | title="æ°å¢" |
| | | :visible.sync="dialogVisible" |
| | | @open="openDialog" |
| | | width="50%"> |
| | | <div style="height: 50vh; overflow-y: auto"> |
| | | <el-form ref="form" :model="form" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æµè¯æ¥æ" prop="testDate" |
| | | :rules="[{ required: true, message: '请è¾å
¥æµè¯å°ç¹', trigger: 'change' }]"> |
| | | <el-date-picker |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | format="yyyy-MM-dd" |
| | | size="small" |
| | | v-model="form.testDate" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤åç§°" prop="deviceId" |
| | | :rules="[{ required: true, message: '请è¾å
¥æµè¯å°ç¹', trigger: 'change' }]"> |
| | | <el-cascader |
| | | size="small" |
| | | style="width: 100%" |
| | | :props="{ expandTrigger: 'hover', emitPath:false }" |
| | | v-model="form.deviceId" |
| | | :options="cascaderList" |
| | | filterable |
| | | clearable |
| | | @change="getCalibrationDateFun" |
| | | ></el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤ç¼å·"> |
| | | <el-input v-model="form.managementNumber" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ ¡åæ¥æ"> |
| | | <el-input v-model="form.calibrationDate" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="䏿¬¡æ ¡åæ¥æ"> |
| | | <el-input v-model="form.nextCalibrationDate" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµè
" prop="recipientUser"> |
| | | <el-select v-model="form.testerId" filterable placeholder="è¯·éæ©" clearable |
| | | size="small" style="width: 100%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ ¸æ¥äºº" prop="recipientUser"> |
| | | <el-select v-model="form.checkerId" filterable placeholder="è¯·éæ©" clearable |
| | | size="small" style="width: 100%;" > |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ç»è®º"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥å
容" |
| | | v-model="form.conclusion"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <div> |
| | | <div style="display: flex; justify-content: flex-end; margin-bottom: 0.5em"> |
| | | <el-button type="primary" size="small" @click="feMeasuredQuantityListAdd">æ°å¢</el-button> |
| | | </div> |
| | | <div> |
| | | <el-table |
| | | :data="form.illuminationDetectionAreaList" |
| | | style="width: 100%; margin: auto" |
| | | height="40vh"> |
| | | <el-table-column type="index" label="åºå·" width="80"></el-table-column> |
| | | <el-table-column |
| | | prop="detectionAreaLabel" |
| | | label="æ£æµåºååç§°" |
| | | align="center" |
| | | min-width="180"> |
| | | <template #default="{ row }"> |
| | | <el-input type="textarea" :rows="1" v-model="row.detectionAreaLabel"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="æ£æµå¼" |
| | | align="center" |
| | | min-width="300"> |
| | | <template> |
| | | <el-table-column label="ç¬¬ä¸æ¬¡" align="center" prop="valueOne" min-width="100"> |
| | | <template #default="{ row }"> |
| | | <el-input :rows="1" v-model="row.valueOne" @blur="getAverage(row)"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç¬¬äºæ¬¡" align="center" prop="valueTwo" min-width="100"> |
| | | <template #default="{ row }"> |
| | | <el-input :rows="1" v-model="row.valueTwo" @blur="getAverage(row)"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç¬¬ä¸æ¬¡" align="center" prop="valueThree" min-width="100"> |
| | | <template #default="{ row }"> |
| | | <el-input :rows="1" v-model="row.valueThree" @blur="getAverage(row)"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¹³åå¼" align="center" prop="average" min-width="100"> |
| | | <template #default="{ row }"> |
| | | <el-input :rows="1" v-model="row.average"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="detectionAreaLabel" |
| | | label="夿³¨" |
| | | align="center" |
| | | min-width="180"> |
| | | <template #default="{ row }"> |
| | | <el-input type="textarea" :rows="1" v-model="row.remark"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="æä½" |
| | | width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="feMeasuredQuantityListDelete(scope.row, scope.$index)" type="text" size="small"> |
| | | å é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="addPowerSupplyStability">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | tableData: [], |
| | | dialogVisible: false, |
| | | form: { |
| | | deviceId: null, |
| | | illuminationDetectionAreaList: [] |
| | | }, |
| | | cascaderList: [], |
| | | responsibleOptions: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.initData() |
| | | }, |
| | | watch: { |
| | | dialogVisible(newVal) { |
| | | if (!newVal) { |
| | | this.form = { |
| | | deviceId: null, |
| | | illuminationDetectionAreaList: [] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | getAverage(row) { |
| | | if (row.valueOne && row.valueTwo && row.valueThree) { |
| | | if (!isNaN(row.valueOne) && !isNaN(row.valueTwo) && !isNaN(row.valueThree)) { |
| | | const avg = Number(row.valueOne) + Number(row.valueTwo) + Number(row.valueThree) |
| | | console.log(avg) |
| | | row.average = Math.round(avg/3); |
| | | } else { |
| | | this.$message.warning("å¿
须为æ°åï¼") |
| | | } |
| | | } |
| | | }, |
| | | edit(row) { |
| | | this.$axios.get(this.$api.facilitiesAndEnvironment.getFeIlluminationDetectionArea + "?intensityIlluminationId=" + row.intensityIlluminationId).then(res => { |
| | | this.form = {...row} |
| | | this.form.illuminationDetectionAreaList = res.data; |
| | | this.dialogVisible = true |
| | | }); |
| | | }, |
| | | initData() { |
| | | this.$axios.get(this.$api.facilitiesAndEnvironment.getFeLightningProtection + '?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; |
| | | }); |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.size = val; |
| | | this.initData(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val; |
| | | this.initData(); |
| | | }, |
| | | deleteRowFun(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteFeLightningProtection + '?intensityIlluminationId=' + row.intensityIlluminationId).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | this.initData() |
| | | }) |
| | | }) |
| | | }, |
| | | feMeasuredQuantityListDelete(row, index) { |
| | | if (row.detectionAreaId) { |
| | | this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteFeIlluminationDetectionArea + '?detectionAreaId=' + row.detectionAreaId).then(res => { |
| | | if (res.code === 201) return |
| | | this.form.illuminationDetectionAreaList.splice(index, 1) |
| | | this.$message.success('å 餿åï¼') |
| | | }) |
| | | } else { |
| | | this.form.illuminationDetectionAreaList.splice(index, 1) |
| | | this.$message.success('å 餿åï¼') |
| | | } |
| | | }, |
| | | openDialog() { |
| | | this.$axios.get(this.$api.deviceScope.treeDevice).then(res => { |
| | | this.cascaderList = res.data; |
| | | }); |
| | | this.$nextTick(() => { |
| | | this.$refs['form'].clearValidate() |
| | | }) |
| | | this.getUserList() |
| | | }, |
| | | clickAdd() { |
| | | this.dialogVisible = true |
| | | }, |
| | | feMeasuredQuantityListAdd() { |
| | | const obj = { |
| | | detectionAreaLabel: null, |
| | | valueOne: null, |
| | | valueTwo: null, |
| | | valueThree: null, |
| | | average: null, |
| | | remark: null, |
| | | } |
| | | this.form.illuminationDetectionAreaList.push(obj) |
| | | }, |
| | | addPowerSupplyStability() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.$axios.post(this.$api.facilitiesAndEnvironment.addFeLightningProtection, this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.initData() |
| | | this.dialogVisible = false |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | getCalibrationDateFun() { |
| | | if (this.form.deviceId) { |
| | | this.$axios.get(this.$api.facilitiesAndEnvironment.getCalibrationDate + '?deviceId=' + this.form.deviceId).then(res => { |
| | | if (res.code === 201) return; |
| | | this.$set(this.form, 'deviceName', res.data.deviceName) |
| | | this.$set(this.form, 'managementNumber', res.data.managementNumber) |
| | | this.$set(this.form, 'calibrationDate', res.data.calibrationDate) |
| | | this.$set(this.form, 'nextCalibrationDate', res.data.nextCalibrationDate) |
| | | }); |
| | | } else { |
| | | this.form.deviceName = null |
| | | this.form.managementNumber = null |
| | | this.form.calibrationDate = null |
| | | this.form.nextCalibrationDate = null |
| | | } |
| | | }, |
| | | // å¯¼åº |
| | | downLoadPost(row) { |
| | | this.$axios.get(this.$api.facilitiesAndEnvironment.exportFeIllumination + '?intensityIlluminationId=' + row.intensityIlluminationId,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'ç
§åº¦è®°å½' + '.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .header { |
| | | height: 3em; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="header"> |
| | | <div>é²é·æ£æµ</div> |
| | | <div> |
| | | <el-button type="primary" size="small" @click="clickAdd">导 å
¥</el-button> |
| | | <el-button type="primary" size="small" @click="downLoadPost">导 åº</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | height="calc(100vh - 18em)"> |
| | | <el-table-column type="index" label="åºå·" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="fileName" |
| | | label="åæä»¶å" |
| | | min-width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="detectionDate" |
| | | label="æ£æµæ¥æ" |
| | | min-width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="termValidity" |
| | | min-width="180" |
| | | label="æææ"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="detectionUnit" |
| | | min-width="180" |
| | | label="æ£æµåä½"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" min-width="100"> |
| | | <template v-slot="scope"> |
| | | <el-button type="text" size="small" @click="edit(scope.row)">ç¼è¾</el-button> |
| | | <el-button type="text" size="small" @click="deleteRowFun(scope.row)">å é¤</el-button> |
| | | <el-button type="text" size="small" @click="download(scope.row)">ä¸è½½</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | <el-dialog |
| | | title="æ° å¢" |
| | | :visible.sync="dialogVisible" |
| | | width="50%"> |
| | | <div style="height: 50vh;"> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµæ¥æ" prop="detectionDate" |
| | | :rules="[{ required: true, message: '请è¾å
¥æµè¯å°ç¹', trigger: 'blur' }]"> |
| | | <el-date-picker |
| | | value-format="yyyy-MM-dd" |
| | | format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | size="small" |
| | | v-model="form.detectionDate" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æææ" prop="termValidity" |
| | | :rules="[{ required: true, message: '请è¾å
¥æµè¯å°ç¹', trigger: 'blur' }]"> |
| | | <el-date-picker |
| | | value-format="yyyy-MM-dd" |
| | | format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | size="small" |
| | | v-model="form.termValidity" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æ£æµåä½" prop="detectionUnit" |
| | | :rules="[{ required: true, message: '请è¾å
¥æµè¯å°ç¹', trigger: 'blur' }]"> |
| | | <el-input v-model="form.detectionUnit" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµåä½" > |
| | | <el-upload |
| | | class="upload-demo" |
| | | drag |
| | | action="#" |
| | | :on-remove="handleRemove" |
| | | :http-request="httpRequest" |
| | | :file-list="form.fileList" |
| | | :on-exceed="handleExceed" |
| | | :limit="1" |
| | | multiple> |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="addImport">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | tableData: [], |
| | | dialogVisible: false, |
| | | form: { |
| | | fileList: [], |
| | | fileData: [] |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.initData() |
| | | }, |
| | | watch: { |
| | | dialogVisible(newVal) { |
| | | if (!newVal) { |
| | | this.form = { |
| | | fileList: [], |
| | | fileData: [] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | // å¯¼åº |
| | | downLoadPost() { |
| | | this.$axios.get(this.$api.facilitiesAndEnvironment.exportOfLightningProtectionDetection,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'é²é·æ£æµå¯¼åº' + '.xlsx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | initData() { |
| | | this.$axios.get(this.$api.facilitiesAndEnvironment.getLightningProtectionDetection + '?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; |
| | | }); |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.size = val; |
| | | this.initData(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val; |
| | | this.initData(); |
| | | }, |
| | | clickAdd() { |
| | | this.dialogVisible = true |
| | | }, |
| | | // æä»¶æ°éè¿å¤æ¶æé |
| | | handleExceed() { |
| | | this.$message({type: 'error', message: 'æå¤æ¯æ1个éä»¶ä¸ä¼ '}) |
| | | }, |
| | | // è¦çé»è®¤çä¸ä¼ è¡ä¸ºï¼å¯ä»¥èªå®ä¹ä¸ä¼ çå®ç°ï¼å°ä¸ä¼ çæä»¶ä¾æ¬¡æ·»å å°fileListæ°ç»ä¸,æ¯æå¤ä¸ªæä»¶ |
| | | httpRequest(option) { |
| | | this.form.fileData.push(option) |
| | | }, |
| | | addImport() { |
| | | console.log(this.form) |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | let params = new FormData() |
| | | if (this.form.lightningProtectionId) { |
| | | params.append("lightningProtectionId", this.form.lightningProtectionId) |
| | | } |
| | | params.append("termValidity", this.form.termValidity) |
| | | params.append("detectionUnit", this.form.detectionUnit) |
| | | params.append("detectionDate", this.form.detectionDate) |
| | | if (this.form.fileData.length > 0) { |
| | | params.append("file", this.form.fileData[0].file) |
| | | } |
| | | this.$axios.post(this.$api.facilitiesAndEnvironment.addLightningProtectionDetection, params, { |
| | | headers: {'Content-Type': 'multipart/form-data;'}, |
| | | noQs: true |
| | | }).then(res => { |
| | | if (res.code === 201) return; |
| | | this.dialogVisible = false |
| | | this.initData() |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | edit(row) { |
| | | this.dialogVisible = true |
| | | this.form = {...row} |
| | | this.form.fileList = [] |
| | | this.form.fileData = [] |
| | | this.form.fileList.push({name: row.systemFileName, url: "123434"}) |
| | | console.log(this.form) |
| | | }, |
| | | deleteRowFun(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteLightningProtectionDetection + '?lightningProtectionId=' + row.lightningProtectionId).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | this.initData() |
| | | }) |
| | | }) |
| | | }, |
| | | handleRemove(file) { |
| | | this.$axios.delete(this.$api.personnel.deleteCNASFile + "?fileName=" + file.name).then(res => { |
| | | if (res.code === 201) return; |
| | | this.$message.success('å 餿åï¼') |
| | | let index = this.form.fileList.indexOf(fileName) |
| | | if (index != -1) { |
| | | this.successFileList.splice(index, 1) |
| | | } |
| | | }) |
| | | }, |
| | | download(row) { |
| | | let url = ''; |
| | | |
| | | // fileDownload.downloadIamge(url, row.fileName) |
| | | url = this.javaApi + 'img/' + row.systemFileName |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .header { |
| | | height: 3em; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="header"> |
| | | <div>çµæºç¨³å®æ§</div> |
| | | <div> |
| | | <el-button type="primary" size="small" @click="dialogVisible = true">æ° å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | height="calc(100vh - 18em)"> |
| | | <el-table-column type="index" label="åºå·" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="testLocation" label="æµè¯å°ç¹" min-width="180"></el-table-column> |
| | | <el-table-column prop="testDate" label="æµè¯æ¥æ" width="testDate" min-width="180"></el-table-column> |
| | | <el-table-column prop="conclusion" label="ç»è®º" min-width="180"></el-table-column> |
| | | <el-table-column prop="testerUser" label="æ£æµè
" min-width="180"></el-table-column> |
| | | <el-table-column prop="checkerUser" label="æ ¸æ¥äºº" min-width="180"></el-table-column> |
| | | <el-table-column prop="deviceName" label="设å¤åç§°" min-width="180"></el-table-column> |
| | | <el-table-column prop="managementNumber" label="设å¤ç¼å·" min-width="180"></el-table-column> |
| | | <el-table-column prop="calibrationDate" label="æ ¡åæ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column prop="nextCalibrationDate" label="䏿¬¡æ ¡åæ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´" min-width="180"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½" min-width="140"> |
| | | <template v-slot="scope"> |
| | | <el-button type="text" size="small" @click="downLoadPost(scope.row)">导åº</el-button> |
| | | <el-button type="text" size="small" @click="edit(scope.row)">ç¼è¾</el-button> |
| | | <el-button type="text" size="small" @click="deleteRowFun(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | <el-dialog |
| | | title="æ°å¢" |
| | | :visible.sync="dialogVisible" |
| | | @open="openDialog" |
| | | width="50%"> |
| | | <div style="height: 50vh; overflow-y: auto"> |
| | | <el-form ref="form" :model="form" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æµè¯å°ç¹" prop="testLocation" |
| | | :rules="[{ required: true, message: '请è¾å
¥æµè¯å°ç¹', trigger: 'blur' }]"> |
| | | <el-input v-model="form.testLocation" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æµè¯æ¥æ" prop="testDate" |
| | | :rules="[{ required: true, message: '请è¾å
¥æµè¯å°ç¹', trigger: 'change' }]"> |
| | | <el-date-picker |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | format="yyyy-MM-dd" |
| | | size="small" |
| | | v-model="form.testDate" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤åç§°" prop="deviceId" |
| | | :rules="[{ required: true, message: '请è¾å
¥æµè¯å°ç¹', trigger: 'change' }]"> |
| | | <el-cascader |
| | | size="small" |
| | | style="width: 100%" |
| | | :props="{ expandTrigger: 'hover', emitPath:false }" |
| | | v-model="form.deviceId" |
| | | :options="cascaderList" |
| | | filterable |
| | | clearable |
| | | @change="getCalibrationDateFun" |
| | | ></el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤ç¼å·"> |
| | | <el-input v-model="form.managementNumber" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ ¡åæ¥æ"> |
| | | <el-input v-model="form.calibrationDate" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="䏿¬¡æ ¡åæ¥æ"> |
| | | <el-input v-model="form.nextCalibrationDate" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµè
" prop="recipientUser"> |
| | | <el-select v-model="form.testerId" filterable placeholder="è¯·éæ©" clearable |
| | | size="small" style="width: 100%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ ¸æ¥äºº" prop="recipientUser"> |
| | | <el-select v-model="form.checkerId" filterable placeholder="è¯·éæ©" clearable |
| | | size="small" style="width: 100%;" > |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ç»è®º"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥å
容" |
| | | v-model="form.conclusion"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <div> |
| | | <div style="display: flex; justify-content: flex-end; margin-bottom: 0.5em"> |
| | | <el-button type="primary" size="small" @click="feMeasuredQuantityListAdd">æ°å¢</el-button> |
| | | </div> |
| | | <div> |
| | | <el-table |
| | | :data="form.feMeasuredQuantityList" |
| | | style="width: 100%; margin: auto" |
| | | height="40vh"> |
| | | <el-table-column type="index" label="åºå·" width="80"></el-table-column> |
| | | <el-table-column |
| | | prop="measuredQuantityLabel" |
| | | label="æµå®éåç§°" |
| | | align="center" |
| | | min-width="180"> |
| | | <template #default="{ row }"> |
| | | <el-input type="textarea" :rows="1" v-model="row.measuredQuantityLabel"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="å¼" |
| | | align="center" |
| | | min-width="300"> |
| | | <template> |
| | | <el-table-column label="A" align="center" prop="valueA" min-width="100"> |
| | | <template #default="{ row }"> |
| | | <el-input :rows="1" v-model="row.valueA"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="B" align="center" prop="valueB" min-width="100"> |
| | | <template #default="{ row }"> |
| | | <el-input :rows="1" v-model="row.valueB"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="C" align="center" prop="valueC" min-width="100"> |
| | | <template #default="{ row }"> |
| | | <el-input :rows="1" v-model="row.valueC"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="æä½" |
| | | width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="feMeasuredQuantityListDelete(scope.row, scope.$index)" type="text" size="small"> |
| | | å é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="addPowerSupplyStability">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | tableData: [], |
| | | dialogVisible: false, |
| | | form: { |
| | | deviceId: null, |
| | | feMeasuredQuantityList: [] |
| | | }, |
| | | cascaderList: [], |
| | | responsibleOptions: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.initData() |
| | | }, |
| | | watch: { |
| | | dialogVisible(newVal) { |
| | | if (!newVal) { |
| | | this.form = { |
| | | deviceId: null, |
| | | feMeasuredQuantityList: [] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | 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; |
| | | }); |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.size = val; |
| | | this.initData(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val; |
| | | this.initData(); |
| | | }, |
| | | // çµæºç¨³å®æ§ è¡¨æ ¼ä¸çè¡å é¤æé® |
| | | deleteRowFun(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteLaboratoryFacilityPowerStable + '?powerStableId=' + row.powerStableId).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | this.initData() |
| | | }) |
| | | }) |
| | | }, |
| | | // çµæºç¨³å®æ§-æå¼å¼¹æ¡è°ç¨è®¾å¤æ¥å£ï¼æ¥è¯¢ä½¿ç¨çè®¾å¤ |
| | | openDialog() { |
| | | this.$axios.get(this.$api.deviceScope.treeDevice).then(res => { |
| | | this.cascaderList = res.data; |
| | | }); |
| | | this.$nextTick(() => { |
| | | this.$refs['form'].clearValidate() |
| | | }) |
| | | this.getUserList() |
| | | }, |
| | | // çµæºç¨³å®æ§-å¼¹æ¡çéæ©è®¾å¤åè°ç¨æ¥å£ï¼æ¥è¯¢è®¾å¤ç¼å·ï¼æ ¡åæ¥æï¼ä¸æ¬¡æ ¡åæ¥æ |
| | | getCalibrationDateFun() { |
| | | if (this.form.deviceId) { |
| | | this.$axios.get(this.$api.facilitiesAndEnvironment.getCalibrationDate + '?deviceId=' + this.form.deviceId).then(res => { |
| | | if (res.code === 201) return; |
| | | this.$set(this.form, 'deviceName', res.data.deviceName) |
| | | this.$set(this.form, 'managementNumber', res.data.managementNumber) |
| | | this.$set(this.form, 'calibrationDate', res.data.calibrationDate) |
| | | this.$set(this.form, 'nextCalibrationDate', res.data.nextCalibrationDate) |
| | | }); |
| | | } else { |
| | | this.form.deviceName = null |
| | | this.form.managementNumber = null |
| | | this.form.calibrationDate = null |
| | | this.form.nextCalibrationDate = null |
| | | } |
| | | }, |
| | | // çµæºç¨³å®æ§-æµå®éå¼¹æ¡ä¸è¡¨æ ¼çå é¤è¡ |
| | | feMeasuredQuantityListDelete(row, index) { |
| | | if (row.measuredQuantityId) { |
| | | this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteFeMeasuredQuantity + '?measuredQuantityId=' + row.measuredQuantityId).then(res => { |
| | | if (res.code === 201) return |
| | | this.form.feMeasuredQuantityList.splice(index, 1) |
| | | this.$message.success('å 餿åï¼') |
| | | }) |
| | | } else { |
| | | this.form.feMeasuredQuantityList.splice(index, 1) |
| | | this.$message.success('å 餿åï¼') |
| | | } |
| | | }, |
| | | // çµæºç¨³å®æ§-æµå®éè¡¨æ ¼æ°å¢è¡ |
| | | feMeasuredQuantityListAdd() { |
| | | const obj = { |
| | | measuredQuantityLabel: null, |
| | | valueA: null, |
| | | valueB: null, |
| | | valueC: null, |
| | | } |
| | | this.form.feMeasuredQuantityList.push(obj) |
| | | }, |
| | | // çµæºç¨³å®æ§ æ°å¢ |
| | | addPowerSupplyStability() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.$axios.post(this.$api.facilitiesAndEnvironment.addLaboratoryFacilityPowerStable, this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.initData() |
| | | this.dialogVisible = false |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | // å¯¼åº |
| | | downLoadPost(row) { |
| | | this.$axios.get(this.$api.facilitiesAndEnvironment.exportFePowerStable + '?powerStableId=' + row.powerStableId,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'çµæºç¨³å®æ§' + '.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | // çµæºç¨³å®æ§ ç¹å»è¡ç¼è¾è§¦å |
| | | edit(row) { |
| | | this.$axios.get(this.$api.facilitiesAndEnvironment.getFeMeasuredQuantityService + "?powerStableId=" + row.powerStableId).then(res => { |
| | | this.form = {...row} |
| | | this.form.feMeasuredQuantityList = res.data; |
| | | this.dialogVisible = true |
| | | }); |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .header { |
| | | height: 3em; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <div class="header"> |
| | | <div>è¯éªåºå</div> |
| | | <div> |
| | | <el-button type="primary" size="small" @click="clickAdd">æ° å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | @row-click="clickRow" |
| | | highlight-current-row |
| | | height="calc(100vh - 18em)"> |
| | | <el-table-column type="index" label="åºå·" width="80"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="monthDate" label="æåº¦æ¶é´" min-width="180"></el-table-column> |
| | | <el-table-column prop="testAreaName" label="è¯éªåºååç§°" min-width="180"></el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´" min-width="180"></el-table-column> |
| | | <el-table-column prop="createName" label="å建人" min-width="180"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½" min-width="140"> |
| | | <template v-slot="scope"> |
| | | <el-button type="text" size="small" @click="downLoadPost(scope.row)">导åº</el-button> |
| | | <el-button type="text" size="small" @click="edit(scope.row)">ç¼è¾</el-button> |
| | | <el-button type="text" size="small" @click="deleteRowFun(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="header"> |
| | | <div>温湿度记å½ï¼{{ saveRow.monthDate }}</div> |
| | | <div> |
| | | <el-button type="primary" size="small" v-if="saveRow.monthDate" @click="dialogVisible1 = true">æ° å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="tableData1" |
| | | style="width: 100%" |
| | | height="calc(100vh - 18em)"> |
| | | <el-table-column type="index" label="åºå·" width="80"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search1.current - 1) * search1.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ä¸å" min-width="200" align="center"> |
| | | <template> |
| | | <el-table-column prop="morningTestTime" label="æ¶é´" min-width="110" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="morningTemp" label="温度" min-width="80" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="morningHum" label="湿度" min-width="80" show-overflow-tooltip></el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="morningRecorderUser" label="è®°å½å" min-width="100"></el-table-column> |
| | | <el-table-column label="ä¸å" min-width="200" align="center"> |
| | | <template> |
| | | <el-table-column prop="afternoonTime" label="æ¶é´" min-width="110" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="afternoonTemp" label="温度" min-width="80" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="afternoonHum" label="湿度" min-width="80" show-overflow-tooltip></el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="afternoonRecorderUser" label="è®°å½å" min-width="100"></el-table-column> |
| | | <el-table-column prop="note" label="夿³¨" show-overflow-tooltip min-width="100"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½" min-width="100"> |
| | | <template v-slot="scope"> |
| | | <el-button type="text" size="small" @click="edit1(scope.row)">ç¼è¾</el-button> |
| | | <el-button type="text" size="small" @click="deleteRowFun1(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="search1.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="search1.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange1" |
| | | @current-change="handleCurrentChange1"> |
| | | </el-pagination> |
| | | </el-col> |
| | | </el-row> |
| | | <el-dialog |
| | | title="æç¤º" |
| | | :visible.sync="dialogVisible" |
| | | width="50%"> |
| | | <div style="height: 20vh;"> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æåº¦æ¶é´" prop="monthDate" |
| | | :rules="[{ required: true, message: '请è¾å
¥æåº¦æ¶é´', trigger: 'blur' }]"> |
| | | <el-date-picker |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | format="yyyy-MM-dd" |
| | | size="small" |
| | | v-model="form.monthDate" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="è¯éªåºå" prop="testAreaName" |
| | | :rules="[{ required: true, message: '请è¾å
¥è¯éªåºå', trigger: 'blur' }]"> |
| | | <el-input v-model="form.testAreaName"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="addPowerSupplyStability">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="æç¤º" |
| | | :visible.sync="dialogVisible1" |
| | | @open="openDialog" |
| | | width="50%"> |
| | | <div style="height: 40vh;"> |
| | | <el-form ref="form1" :model="form1" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸åæ¶é´"> |
| | | <el-date-picker |
| | | value-format="yyyy-MM-dd hh:mm:ss" |
| | | style="width: 100%" |
| | | format="yyyy-MM-dd hh:mm:ss" |
| | | size="small" |
| | | v-model="form1.morningTestTime" |
| | | type="datetime" |
| | | placeholder="è¯·éæ©æ¶é´"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸å温度"> |
| | | <el-input v-model="form1.morningTemp" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸å湿度"> |
| | | <el-input v-model="form1.morningHum" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸åè®°å½å"> |
| | | <el-select v-model="form1.morningRecorderId" filterable placeholder="è¯·éæ©" clearable |
| | | size="small" style="width: 100%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸åæ¶é´"> |
| | | <el-date-picker |
| | | value-format="yyyy-MM-dd hh:mm:ss" |
| | | style="width: 100%" |
| | | format="yyyy-MM-dd hh:mm:ss" |
| | | size="small" |
| | | v-model="form1.afternoonTime" |
| | | type="datetime" |
| | | placeholder="è¯·éæ©æ¶é´"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸å温度"> |
| | | <el-input v-model="form1.afternoonTemp" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸å湿度"> |
| | | <el-input v-model="form1.afternoonHum" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸åè®°å½å"> |
| | | <el-select v-model="form1.afternoonRecorderId" filterable placeholder="è¯·éæ©" clearable |
| | | size="small" style="width: 100%;"> |
| | | <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥å
容" |
| | | v-model="form1.note"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible1 = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="addPowerSupplyStability1">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | search1: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | tableData: [], |
| | | tableData1: [], |
| | | dialogVisible: false, |
| | | dialogVisible1: false, |
| | | form: {}, |
| | | form1: {}, |
| | | saveRow: {}, |
| | | responsibleOptions: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.initData() |
| | | }, |
| | | watch: { |
| | | dialogVisible(newVal) { |
| | | if (!newVal) { |
| | | this.form = { |
| | | } |
| | | } |
| | | }, |
| | | dialogVisible1(newVal) { |
| | | if (!newVal) { |
| | | this.form1 = { |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | // å¯¼åº |
| | | downLoadPost(row) { |
| | | this.$axios.get(this.$api.facilitiesAndEnvironment.exportTemperatureAndHumidityRecords + '?dateId=' + row.dateId,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '温湿度记å½' + '.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | openDialog() { |
| | | this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | addPowerSupplyStability() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.$axios.post(this.$api.facilitiesAndEnvironment.addFeTempHumDate, this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.initData() |
| | | this.dialogVisible = false |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | addPowerSupplyStability1() { |
| | | if (!this.saveRow) { |
| | | this.$message.warning("è¯·éæ©è¯éªåºåï¼") |
| | | return |
| | | } |
| | | this.$refs.form1.validate((valid) => { |
| | | if (valid) { |
| | | this.form1.dateId = this.saveRow.dateId |
| | | this.$axios.post(this.$api.facilitiesAndEnvironment.addFeTempHumRecord, this.form1, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.initData1(this.saveRow.dateId) |
| | | this.dialogVisible1 = false |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | clickRow(row) { |
| | | this.saveRow = row |
| | | this.initData1(row.dateId) |
| | | }, |
| | | edit(row) { |
| | | this.form = {...row} |
| | | this.dialogVisible = true |
| | | }, |
| | | deleteRowFun(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteFeTempHumDate + '?dateId=' + row.dateId).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | this.initData() |
| | | }) |
| | | }) |
| | | }, |
| | | edit1(row) { |
| | | this.form1 = {...row} |
| | | this.dialogVisible1 = true |
| | | }, |
| | | deleteRowFun1(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteFeTempHumRecord + '?tempHumId=' + row.tempHumId).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | this.initData1(this.saveRow.dateId) |
| | | }) |
| | | }) |
| | | }, |
| | | initData() { |
| | | this.$axios.get(this.$api.facilitiesAndEnvironment.getFeTempHumDate + '?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; |
| | | }); |
| | | }, |
| | | initData1(dateId) { |
| | | this.$axios.get(this.$api.facilitiesAndEnvironment.getFeTempHumRecordPage + '?size=' + this.search1.size + '¤t=' + this.search1.current + '&dateId=' + dateId).then(res => { |
| | | if (res.code === 201) return; |
| | | this.tableData1 = res.data.records; |
| | | this.search1.total = res.data.total; |
| | | }); |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.size = val; |
| | | this.initData(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val; |
| | | this.initData(); |
| | | }, |
| | | handleSizeChange1(val) { |
| | | this.search1.size = val; |
| | | this.initData1(); |
| | | }, |
| | | handleCurrentChange1(val) { |
| | | this.search1.current = val; |
| | | this.initData1(); |
| | | }, |
| | | clickAdd() { |
| | | this.dialogVisible = true |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .header { |
| | | height: 3em; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="ä¸åºå¤çä¿¡æ¯" |
| | | width="80%" @close="closeThreeWastesDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="auto"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨" prop="purposes"> |
| | | <el-input v-model="form.remark" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <div style="text-align: right;margin-bottom: 10px"> |
| | | <el-button size="small" type="primary" @click="addRow">æ·»å </el-button> |
| | | <el-button size="small" type="danger" @click="clearTable">æ¸
空</el-button> |
| | | </div> |
| | | <el-table :data="wastesDetailList" border height="300" style="width: 100%"> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | <el-table-column header-align="center" label="æ¥æ¶äºº" prop="acceptor"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.acceptor" size="small"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="æ¥æ¶åä½" prop="receivingUnit"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.receivingUnit" size="small"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="åç§°" prop="designation"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.designation" size="small"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="移交人" prop="transferPeople" width="180"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.transferPeople" size="small"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="ä½ç§¯" prop="volume" width="180"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.volume" size="small"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="éå¤çæ¥æ" prop="deliveryDate" width="180"> |
| | | <template slot-scope="{row}"> |
| | | <!-- <el-input v-model="row.deliveryDate" size="small"/> --> |
| | | <el-date-picker |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | format="yyyy-MM-dd" |
| | | size="small" |
| | | v-model="row.deliveryDate" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeThreeWastesDia">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'three-wastes-dialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | remark: '', |
| | | wastesId: '', |
| | | }, |
| | | rules: { |
| | | remark: [{required: false, message: '请填å夿³¨',trigger: 'blur'}], |
| | | }, |
| | | wastesDetailList: [], |
| | | operationType: '', |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia (type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type !== 'add') { |
| | | this.searchInfo(row) |
| | | } |
| | | }, |
| | | // æ¥è¯¢è¯¦æ
|
| | | searchInfo (row) { |
| | | this.diaLoading = true |
| | | this.$axios(this.$api.internalWastes.getInternalWastesOne + '?wastesId=' + row.wastesId).then(res => { |
| | | this.diaLoading = false |
| | | if (res.code === 201) return |
| | | this.form = res.data |
| | | this.wastesDetailList = this.form.wastesDetailList |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.diaLoading = false |
| | | }) |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit () { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | if (this.wastesDetailList.length === 0) { |
| | | this.$message.warning('请添å è¡¨æ ¼æ°æ®') |
| | | return |
| | | } |
| | | this.loading = true |
| | | const internalImplementDto = this.HaveJson(this.form) |
| | | internalImplementDto.wastesDetailList = this.HaveJson(this.wastesDetailList) |
| | | if (this.operationType === 'add') { |
| | | this.$axios.post(this.$api.internalWastes.addInternalWastes, internalImplementDto, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeThreeWastesDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else if (this.operationType === 'edit') { |
| | | this.$axios.post(this.$api.internalWastes.updateInternalWastes, internalImplementDto, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeThreeWastesDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | // å¢å è¡¨æ ¼è¡æ°æ® |
| | | addRow () { |
| | | this.wastesDetailList.push({ |
| | | acceptor: '', |
| | | receivingUnit: '', |
| | | designation: '', |
| | | transferPeople: '', |
| | | volume: '', |
| | | deliveryDate: '', |
| | | }) |
| | | }, |
| | | // æ¸
ç©ºè¡¨æ ¼æ°æ® |
| | | clearTable () { |
| | | this.wastesDetailList = [] |
| | | }, |
| | | closeThreeWastesDia () { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeThreeWastesDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="search-background"> |
| | | <span class="search-group"> |
| | | <span style="width: 160px">夿³¨ï¼</span> |
| | | <el-input v-model="searchForm.remark" clearable size="small"></el-input> |
| | | <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <ZTTable |
| | | :column="tableColumn" |
| | | :height="'calc(100vh - 20em)'" |
| | | :table-data="tableData" |
| | | :table-loading="tableLoading" |
| | | style="padding: 0 10px;margin-bottom: 16px"> |
| | | </ZTTable> |
| | | <el-pagination :current-page="1" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </div> |
| | | <three-wastes-dialog v-if="threeWastesDia" ref="threeWastesDia" @closeThreeWastesDia="closeThreeWastesDia"></three-wastes-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ZTTable from '../../caorui/ZTTable/index.vue'; |
| | | import ThreeWastesDialog from './three-wastes-dialog.vue'; |
| | | import ImplementPlanDia from '../a8-internal-audit-management/implementPlanDia.vue'; |
| | | |
| | | export default { |
| | | name: 'a6-three-wastes-treatment', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { ImplementPlanDia, ThreeWastesDialog, ZTTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | remark: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'å建æ¶é´', |
| | | prop: 'createTime', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å建人', |
| | | prop: 'createUser', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ä¿®æ¹æ¶é´', |
| | | prop: 'updateTime', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ä¿®æ¹äºº', |
| | | prop: 'updateUser', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | minWidth: '220', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | }, |
| | | total: 0, |
| | | threeWastesDia: false |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList () { |
| | | const entity = this.searchForm |
| | | const page = this.page |
| | | this.tableLoading = true |
| | | this.$axios.post(this.$api.internalWastes.pageInternalWastes, {entity, page}, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // å é¤ |
| | | delPlan (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | this.$axios.get(this.$api.internalWastes.delInternalWastes + '?wastesId=' + row.wastesId).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ°å¢ï¼ç¼è¾ï¼æ¹åå¼¹æ¡ |
| | | openFormDia (type, row) { |
| | | this.threeWastesDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.threeWastesDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | // å¯¼åº |
| | | handleDown (row) { |
| | | this.$axios.get(this.$api.internalWastes.exportInternalWastes + '?wastesId=' + row.wastesId,{responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'ä¸åºå¤ç导åº' + '.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | closeThreeWastesDia () { |
| | | this.threeWastesDia = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm () { |
| | | this.searchForm.remark = ''; |
| | | this.searchList() |
| | | }, |
| | | // å页 |
| | | handleSizeChange(val) { |
| | | this.page.size = val; |
| | | this.searchList(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.page.current = val; |
| | | this.searchList(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search-background { |
| | | width: 100%; |
| | | height: 60px; |
| | | line-height: 60px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="main"> |
| | | <el-tabs v-model="activeName" :lazy="true" type="border-card"> |
| | | <!-- <el-tab-pane label="夿¥äººå管ç" name="夿¥äººå管ç">--> |
| | | <!-- <ExternalPersonnelManagement v-if="activeName === '夿¥äººå管ç'"/>--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- <el-tab-pane label="å®éªå®¤è®¾æ½åºæä¿¡æ¯" name="å®éªå®¤è®¾æ½åºæä¿¡æ¯">--> |
| | | <!-- 空--> |
| | | <!-- </el-tab-pane>--> |
| | | <el-tab-pane label="设æ½åç¯å¢æ¡ä»¶è¦æ±" name="设æ½åç¯å¢æ¡ä»¶è¦æ±"> |
| | | <FacilitiesEnvironmentalConditions v-if="activeName === '设æ½åç¯å¢æ¡ä»¶è¦æ±'"/> |
| | | </el-tab-pane> |
| | | <!-- <el-tab-pane label="ç¯å¢æ¡ä»¶å¼ç¨" name="ç¯å¢æ¡ä»¶å¼ç¨">--> |
| | | <!-- 空--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- <el-tab-pane label="å®å
¨åºä»£è¡¨æ£æ¥" name="å®å
¨åºä»£è¡¨æ£æ¥">--> |
| | | <!-- 空--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- <el-tab-pane label="å®å
¨å
å¡" name="å®å
¨å
å¡">--> |
| | | <!-- 空--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- <el-tab-pane label="åºç©å¤ç交æ¥è®°å½" name="åºç©å¤ç交æ¥è®°å½">--> |
| | | <!-- 空--> |
| | | <!-- </el-tab-pane>--> |
| | | <el-tab-pane label="ä¸åºå¤ç" name="ä¸åºå¤ç"> |
| | | <a6-three-wastes-treatment v-if="activeName === 'ä¸åºå¤ç'"></a6-three-wastes-treatment> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="è¿åºäººå管ç" name="è¿åºäººå管ç"> |
| | | <personnel-management v-if="activeName === 'è¿åºäººå管ç'"></personnel-management> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import FacilitiesEnvironmentalConditions from "../do/a6-facilities-environment/facilities-environmental-conditions.vue"; |
| | | // 夿¥äººå管ç |
| | | import ExternalPersonnelManagement from "../do/a6-facilities-environment/external-personnel-management.vue"; |
| | | import A6ThreeWastesTreatment from '../do/a6-facilities-environment/three-wastes-treatment.vue'; |
| | | import PersonnelManagement from '../do/a6-facilities-environment/Personnel-management.vue'; |
| | | |
| | | export default { |
| | | components: { |
| | | PersonnelManagement, |
| | | A6ThreeWastesTreatment, |
| | | ExternalPersonnelManagement, |
| | | FacilitiesEnvironmentalConditions}, |
| | | data() { |
| | | return { |
| | | activeName: '设æ½åç¯å¢æ¡ä»¶è¦æ±', |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .main { |
| | | padding: 15px 0; |
| | | width: 100%; |
| | | border-radius: 15px; |
| | | } |
| | | /deep/ .el-tabs--border-card>.el-tabs__content { |
| | | height: calc(100vh - 9em); |
| | | padding: 0; |
| | | } |
| | | </style> |