From 15d66d6d34ce779744bfe56a03e3bb15f33cd7b0 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 02 八月 2025 11:17:24 +0800
Subject: [PATCH] 1.不合格处理流程添加权限
---
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/illuminance-recording.vue | 117 +++++++++++++++++++---------------------------------------
1 files changed, 39 insertions(+), 78 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/illuminance-recording.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/illuminance-recording.vue
index a9c7baa..ce87d88 100644
--- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/illuminance-recording.vue
+++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/illuminance-recording.vue
@@ -6,10 +6,8 @@
<el-button size="small" type="primary" @click="clickAdd">鏂� 澧�</el-button>
</div>
</div>
- <el-table
- :data="tableData"
- height="calc(100vh - 18em)"
- style="width: 100%">
+ <el-table :data="tableData" height="calc(100vh - 18em)" style="width: 100%"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
<el-table-column label="搴忓彿" type="index" width="120">
<template v-slot="scope">
<span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span>
@@ -32,44 +30,29 @@
</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 :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" background
+ @current-change="handleCurrentChange">
</el-pagination>
- <el-dialog
- :visible.sync="dialogVisible"
- title="鏂板"
- width="50%"
- @open="openDialog">
+ <el-dialog :visible.sync="dialogVisible" title="鏂板" width="50%" @open="openDialog">
<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 :rules="[{ required: true, message: '璇疯緭鍏ユ祴璇曞湴鐐�', trigger: 'change' }]" label="娴嬭瘯鏃ユ湡"
- prop="testDate">
- <el-date-picker
- v-model="form.testDate"
- format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- size="small"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd">
+ prop="testDate">
+ <el-date-picker v-model="form.testDate" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small"
+ style="width: 100%" type="date" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :rules="[{ required: true, message: '璇疯緭鍏ヨ澶囧悕绉�', trigger: 'change' }]" label="璁惧鍚嶇О"
- prop="deviceId">
- <el-select v-model="form.deviceId"
- class="table_input"
- clearable
- filterable
- placeholder="璁惧鍚嶇О"
- size="small" @change="getCalibrationDateFun">
- <el-option v-for="item in equipOptions" :key="item.id" :label="item.deviceName" :value="item.id">
- {{item.deviceName + item.managementNumber}}
+ prop="deviceId">
+ <el-select v-model="form.deviceId" class="table_input" clearable filterable placeholder="璁惧鍚嶇О"
+ size="small" @change="getCalibrationDateFun">
+ <el-option v-for="item in equipOptions" :key="item.id" :label="item.deviceName" :value="item.id">
+ {{ item.deviceName + item.managementNumber }}
</el-option>
</el-select>
</el-form-item>
@@ -91,8 +74,8 @@
</el-col>
<el-col :span="12">
<el-form-item label="妫�娴嬭��" prop="recipientUser">
- <el-select v-model="form.testerId" clearable filterable placeholder="璇烽�夋嫨"
- size="small" style="width: 100%;">
+ <el-select v-model="form.testerId" clearable filterable placeholder="璇烽�夋嫨" 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>
@@ -100,8 +83,8 @@
</el-col>
<el-col :span="12">
<el-form-item label="鏍告煡浜�" prop="recipientUser">
- <el-select v-model="form.checkerId" clearable filterable placeholder="璇烽�夋嫨"
- size="small" style="width: 100%;" >
+ <el-select v-model="form.checkerId" clearable filterable placeholder="璇烽�夋嫨" 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>
@@ -109,11 +92,7 @@
</el-col>
<el-col :span="24">
<el-form-item label="缁撹">
- <el-input
- v-model="form.conclusion"
- :rows="2"
- placeholder="璇疯緭鍏ュ唴瀹�"
- type="textarea">
+ <el-input v-model="form.conclusion" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" type="textarea">
</el-input>
</el-form-item>
</el-col>
@@ -123,25 +102,15 @@
<el-button size="small" type="primary" @click="feMeasuredQuantityListAdd">鏂板</el-button>
</div>
<div>
- <el-table
- :data="form.illuminationDetectionAreaList"
- height="40vh"
- style="width: 100%; margin: auto">
+ <el-table :data="form.illuminationDetectionAreaList" height="40vh" style="width: 100%; margin: auto"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
<el-table-column label="搴忓彿" type="index" width="80"></el-table-column>
- <el-table-column
- align="center"
- label="妫�娴嬪尯鍩熷悕绉�"
- min-width="180"
- prop="detectionAreaLabel">
+ <el-table-column align="center" label="妫�娴嬪尯鍩熷悕绉�" min-width="180" prop="detectionAreaLabel">
<template #default="{ row }">
<el-input v-model="row.detectionAreaLabel" :rows="1" type="textarea"></el-input>
</template>
</el-table-column>
- <el-table-column
- align="center"
- label="妫�娴嬪��"
- min-width="300"
- prop="name">
+ <el-table-column align="center" label="妫�娴嬪��" min-width="300" prop="name">
<template>
<el-table-column align="center" label="绗竴娆�" min-width="100" prop="valueOne">
<template #default="{ row }">
@@ -165,19 +134,12 @@
</el-table-column>
</template>
</el-table-column>
- <el-table-column
- align="center"
- label="澶囨敞"
- min-width="180"
- prop="detectionAreaLabel">
+ <el-table-column align="center" label="澶囨敞" min-width="180" prop="detectionAreaLabel">
<template #default="{ row }">
<el-input v-model="row.remark" :rows="1" type="textarea"></el-input>
</template>
</el-table-column>
- <el-table-column
- fixed="right"
- label="鎿嶄綔"
- width="100">
+ <el-table-column fixed="right" label="鎿嶄綔" width="100">
<template slot-scope="scope">
<el-button size="small" type="text" @click="feMeasuredQuantityListDelete(scope.row, scope.$index)">
鍒犻櫎
@@ -190,9 +152,9 @@
</el-form>
</div>
<span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">鍙� 娑�</el-button>
- <el-button type="primary" :loading="submitLoading" @click="addPowerSupplyStability">纭� 瀹�</el-button>
- </span>
+ <el-button @click="dialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" :loading="submitLoading" @click="addPowerSupplyStability">纭� 瀹�</el-button>
+ </span>
</el-dialog>
</div>
</template>
@@ -256,22 +218,22 @@
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);
+ row.average = Math.round(avg / 3);
} else {
this.$message.warning("蹇呴』涓烘暟瀛楋紒")
}
}
},
edit(row) {
- getFeIlluminationDetectionArea({intensityIlluminationId:row.intensityIlluminationId}).then(res => {
- this.form = {...row}
+ getFeIlluminationDetectionArea({ intensityIlluminationId: row.intensityIlluminationId }).then(res => {
+ this.form = { ...row }
this.form.illuminationDetectionAreaList = res.data;
this.dialogVisible = true
});
},
initData() {
- getFeLightningProtection({...this.search}).then(res => {
- if (res.code === 200){
+ getFeLightningProtection({ ...this.search }).then(res => {
+ if (res.code === 200) {
this.tableData = res.data.records;
this.search.total = res.data.total;
}
@@ -291,7 +253,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- deleteFeLightningProtection({intensityIlluminationId: row.intensityIlluminationId}).then(res => {
+ deleteFeLightningProtection({ intensityIlluminationId: row.intensityIlluminationId }).then(res => {
this.$message.success('鍒犻櫎鎴愬姛锛�')
this.initData()
})
@@ -299,8 +261,8 @@
},
feMeasuredQuantityListDelete(row, index) {
if (row.detectionAreaId) {
- deleteFeIlluminationDetectionArea({detectionAreaId:row.detectionAreaId}).then(res => {
- if (res.code === 200){
+ deleteFeIlluminationDetectionArea({ detectionAreaId: row.detectionAreaId }).then(res => {
+ if (res.code === 200) {
this.form.illuminationDetectionAreaList.splice(index, 1)
this.$message.success('鍒犻櫎鎴愬姛锛�')
}
@@ -326,7 +288,7 @@
// 鑾峰彇鎵�鏈夎澶�
getEquipOptions() {
this.equipOptions = []
- deviceScopeSearch({status:'0'}).then(res => {
+ deviceScopeSearch({ status: '0' }).then(res => {
if (res.code === 200 && res.data) {
this.equipOptions = res.data
}
@@ -379,11 +341,10 @@
},
// 瀵煎嚭
downLoadPost(row) {
- exportFeIllumination({intensityIlluminationId: row.intensityIlluminationId}).then(res => {
+ exportFeIllumination({ intensityIlluminationId: row.intensityIlluminationId }).then(res => {
this.outLoading = false
- const blob = new Blob([res],{ type: 'application/msword' });
+ const blob = new Blob([res], { type: 'application/msword' });
this.$download.saveAs(blob, '鐓у害璁板綍.docx')
- this.$message.success('瀵煎嚭鎴愬姛')
})
},
}
--
Gitblit v1.9.3