From 80c915239301b1f0e3a732a6318e7743709e9489 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期一, 31 三月 2025 16:01:38 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/temperature-humidity-record.vue | 165 ++++++++++++++++++++++-------------------------------- 1 files changed, 67 insertions(+), 98 deletions(-) diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/temperature-humidity-record.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/temperature-humidity-record.vue index 2dbe82a..c5019a7 100644 --- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/temperature-humidity-record.vue +++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/temperature-humidity-record.vue @@ -4,19 +4,21 @@ <el-col :span="12"> <div class="header"> <div>璇曢獙鍖哄煙</div> - <div> - 鍚嶇О锛� - <el-input v-model="search.testAreaName" clearable size="small" style="width: 120px"></el-input> - <el-button size="small" type="primary" @click="initData">鏌ヨ</el-button> - <el-button size="small" type="primary" @click="clickAdd">鏂� 澧�</el-button> + <div style="display: flex;"> + <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;"> + <span style="width: 48px;font-size: 14px;font-weight: 700;color: #606266;">鍚嶇О</span> + <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="search.testAreaName" + @keyup.enter.native="initData"></el-input> + </div> + <div style="line-height: 30px;"> + <el-button size="mini" type="primary" @click="initData">鏌ヨ</el-button> + <el-button size="mini" type="primary" @click="clickAdd">鏂� 澧�</el-button> + </div> </div> </div> - <el-table - :data="tableData" - height="calc(100vh - 18em)" - highlight-current-row - style="width: 100%" - @row-click="clickRow"> + <el-table :data="tableData" height="calc(100vh - 18em)" highlight-current-row style="width: 100%" + :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border + @row-click="clickRow"> <el-table-column label="搴忓彿" type="index" width="60" align="center"></el-table-column> <el-table-column label="鏈堝害鏃堕棿" min-width="180" prop="monthDate"></el-table-column> <el-table-column label="璇曢獙鍖哄煙鍚嶇О" min-width="180" prop="testAreaName"></el-table-column> @@ -30,34 +32,34 @@ <el-table-column fixed="right" label="鎿嶄綔" min-width="180" align="center"> <template v-slot="scope"> <el-button size="small" type="text" @click="downLoadPost(scope.row)">瀵煎嚭</el-button> - <el-button size="small" type="text" @click="edit(scope.row)">缂栬緫</el-button> - <el-button :disabled="scope.row.isAffirm === '1'" size="small" type="text" @click="openApprovalDialog(scope.row)">纭</el-button> +<!-- <el-button size="small" type="text" @click="edit(scope.row)">缂栬緫</el-button>--> + <el-button :disabled="scope.row.isAffirm === '1'" size="small" type="text" + @click="openApprovalDialog(scope.row)">纭</el-button> <el-button size="small" type="text" @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 :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" background + :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 v-if="saveRow.monthDate" size="small" type="primary" @click="dialogVisible1 = true">鏂� 澧�</el-button> + <el-button v-if="saveRow.monthDate" size="small" type="primary" @click="dialogVisible1 = true">鏂� + 澧�</el-button> </div> </div> - <el-table - :data="tableData1" - height="calc(100vh - 18em)" - style="width: 100%"> + <el-table :data="tableData1" height="calc(100vh - 18em)" style="width: 100%" + :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border> <el-table-column label="搴忓彿" type="index" width="60" align="center"></el-table-column> <el-table-column label="鏃ユ湡" min-width="100" prop="recordDate"></el-table-column> <el-table-column align="center" label="涓婂崍" min-width="200"> <template> - <el-table-column label="鏃堕棿" min-width="110" prop="morningTestTime" show-overflow-tooltip></el-table-column> + <el-table-column label="鏃堕棿" min-width="110" prop="morningTestTime" + show-overflow-tooltip></el-table-column> <el-table-column label="娓╁害" min-width="80" prop="morningTemp" show-overflow-tooltip></el-table-column> <el-table-column label="婀垮害" min-width="80" prop="morningHum" show-overflow-tooltip></el-table-column> </template> @@ -79,37 +81,27 @@ </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 :current-page="1" :page-size="search1.size" :page-sizes="[10, 20, 30, 50, 100]" background + :total="search1.total" layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange1" + @current-change="handleCurrentChange1"> </el-pagination> </el-col> </el-row> - <el-dialog - :visible.sync="dialogVisible" - title="鎻愮ず" - width="50%"> + <el-dialog :visible.sync="dialogVisible" title="鎻愮ず" width="50%"> <div style="height: 20vh;"> <el-form ref="form" :model="form" label-width="80px"> <el-row> <el-col :span="24"> <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ユ湀搴︽椂闂�', trigger: 'blur' }]" label="鏈堝害鏃堕棿" - prop="monthDate"> - <el-date-picker - v-model="form.monthDate" - format="yyyy-MM" - placeholder="閫夋嫨鏈堜唤" - size="small" - style="width: 100%" - type="month" - value-format="yyyy-MM"> + prop="monthDate"> + <el-date-picker v-model="form.monthDate" format="yyyy-MM" placeholder="閫夋嫨鏈堜唤" size="small" + style="width: 100%" type="month" value-format="yyyy-MM"> </el-date-picker> </el-form-item> </el-col> <el-col :span="24"> <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ヨ瘯楠屽尯鍩�', trigger: 'blur' }]" label="璇曢獙鍖哄煙" - prop="testAreaName"> + prop="testAreaName"> <el-input v-model="form.testAreaName"></el-input> </el-form-item> </el-col> @@ -117,40 +109,25 @@ </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> - <el-dialog - :visible.sync="dialogVisible1" - title="鎻愮ず" - width="50%" - @open="openDialog"> + <el-dialog :visible.sync="dialogVisible1" title="鎻愮ず" width="50%" @open="openDialog"> <div style="height: 40vh;"> <el-form ref="form1" :model="form1" label-width="120px"> <el-row> <el-col :span="24"> <el-form-item label="鏃ユ湡"> - <el-date-picker - v-model="form1.recordDate" - format="yyyy-MM-dd" - placeholder="璇烽�夋嫨鏃ユ湡" - size="small" - style="width: 50%" - type="date" - value-format="yyyy-MM-dd"> + <el-date-picker v-model="form1.recordDate" format="yyyy-MM-dd" placeholder="璇烽�夋嫨鏃ユ湡" size="small" + style="width: 50%" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="涓婂崍鏃堕棿"> - <el-time-picker - v-model="form1.morningTestTime" - size="small" - value-format="HH:mm:ss" - format="HH:mm:ss" - style="width: 100%" - placeholder="璇烽�夋嫨鏃堕棿"> + <el-time-picker v-model="form1.morningTestTime" size="small" value-format="HH:mm:ss" format="HH:mm:ss" + style="width: 100%" placeholder="璇烽�夋嫨鏃堕棿"> </el-time-picker> </el-form-item> </el-col> @@ -166,8 +143,8 @@ </el-col> <el-col :span="12"> <el-form-item label="涓婂崍璁板綍鍛�"> - <el-select v-model="form1.morningRecorderId" clearable filterable placeholder="璇烽�夋嫨" - size="small" style="width: 100%;"> + <el-select v-model="form1.morningRecorderId" 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> @@ -175,13 +152,8 @@ </el-col> <el-col :span="12"> <el-form-item label="涓嬪崍鏃堕棿"> - <el-time-picker - v-model="form1.afternoonTime" - size="small" - value-format="HH:mm:ss" - format="HH:mm:ss" - style="width: 100%" - placeholder="璇烽�夋嫨鏃堕棿"> + <el-time-picker v-model="form1.afternoonTime" size="small" value-format="HH:mm:ss" format="HH:mm:ss" + style="width: 100%" placeholder="璇烽�夋嫨鏃堕棿"> </el-time-picker> </el-form-item> </el-col> @@ -197,8 +169,8 @@ </el-col> <el-col :span="12"> <el-form-item label="涓嬪崍璁板綍鍛�"> - <el-select v-model="form1.afternoonRecorderId" clearable filterable placeholder="璇烽�夋嫨" - size="small" style="width: 100%;"> + <el-select v-model="form1.afternoonRecorderId" 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> @@ -206,11 +178,7 @@ </el-col> <el-col :span="24"> <el-form-item label="澶囨敞"> - <el-input - v-model="form1.note" - :rows="2" - placeholder="璇疯緭鍏ュ唴瀹�" - type="textarea"> + <el-input v-model="form1.note" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" type="textarea"> </el-input> </el-form-item> </el-col> @@ -218,9 +186,9 @@ </el-form> </div> <span slot="footer" class="dialog-footer"> - <el-button @click="dialogVisible1 = false">鍙� 娑�</el-button> - <el-button type="primary" :loading="submitLoading" @click="addPowerSupplyStability1">纭� 瀹�</el-button> - </span> + <el-button @click="dialogVisible1 = false">鍙� 娑�</el-button> + <el-button type="primary" :loading="submitLoading" @click="addPowerSupplyStability1">纭� 瀹�</el-button> + </span> </el-dialog> <el-dialog :visible.sync="approvalDialog" title="纭" width="30%" @close="subjoin = ''"> <span> @@ -295,11 +263,11 @@ } }, methods: { - openApprovalDialog (row) { + openApprovalDialog(row) { this.approvalDialog = true this.approvalRow = row }, - handleApproval () { + handleApproval() { this.approvalLoading = true const params = { dateId: this.approvalRow.dateId, @@ -364,10 +332,11 @@ }, clickRow(row) { this.saveRow = row + this.search1.current = 1 this.initData1(row.dateId) }, edit(row) { - this.form = {...row} + this.form = { ...row } this.dialogVisible = true }, deleteRowFun(row) { @@ -376,23 +345,22 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - deleteFeTempHumDate({dateId:row.dateId}).then(res => { + deleteFeTempHumDate({ dateId: row.dateId }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�') this.initData() }) }) }, edit1(row) { - this.form1 = {...row} + this.form1 = { ...row } this.dialogVisible1 = true }, // 瀵煎嚭 downLoadPost(row) { - exportTemperatureAndHumidityRecords({dateId:row.dateId}).then(res => { + exportTemperatureAndHumidityRecords({ dateId: row.dateId }).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('瀵煎嚭鎴愬姛') }) }, deleteRowFun1(row) { @@ -401,7 +369,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - deleteFeTempHumRecord({tempHumId:row.tempHumId}).then(res => { + deleteFeTempHumRecord({ tempHumId: row.tempHumId }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�') this.initData1(this.saveRow.dateId) }) @@ -410,8 +378,9 @@ initData() { getFeTempHumDate({ ...this.search, - ...this.search}).then(res => { - if (res.code === 200){ + ...this.search + }).then(res => { + if (res.code === 200) { this.tableData = res.data.records; this.search.total = res.data.total; if (res.data.records.length === 0) { @@ -423,12 +392,12 @@ }) }, initData1(dateId) { - let form = {dateId: dateId} + let form = { dateId: dateId } getFeTempHumRecordPage({ ...this.search1, ...form }).then(res => { - if (res.code === 200){ + if (res.code === 200) { this.tableData1 = res.data.records; this.search1.total = res.data.total; } @@ -444,11 +413,11 @@ }, handleSizeChange1(val) { this.search1.size = val; - this.initData1(); + this.initData1(this.saveRow.dateId); }, handleCurrentChange1(val) { this.search1.current = val; - this.initData1(); + this.initData1(this.saveRow.dateId); }, clickAdd() { this.dialogVisible = true -- Gitblit v1.9.3