From 893efaff3c2523976993063543dfedf4a5b412f3 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 13 三月 2025 14:27:42 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/center-lims-before-ruoyi into dev
---
src/views/CNAS/resourceDemand/device/component/record.vue | 70 ++++++++--------------------------
1 files changed, 17 insertions(+), 53 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/record.vue b/src/views/CNAS/resourceDemand/device/component/record.vue
index d4eec0c..6e05311 100644
--- a/src/views/CNAS/resourceDemand/device/component/record.vue
+++ b/src/views/CNAS/resourceDemand/device/component/record.vue
@@ -112,7 +112,7 @@
type="textarea"></el-input>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <el-col :span="24">
<el-form-item :rules="[{ required: true, message: '璇疯緭鍏ヤ娇鐢ㄦ棩鏈�', trigger: 'blur' }]" label="浣跨敤鏃ユ湡:"
prop="useDateList">
@@ -125,24 +125,13 @@
start-placeholder="寮�濮嬫棩鏈�"
end-placeholder="缁撴潫鏃ユ湡">
</el-date-picker>
- <!-- <el-date-picker
- v-model="form.useDateList" :disabled="isShow" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd HH:mm:ss"
- size="small"
- start-placeholder="寮�濮嬫棩鏈�"
- style="width:100%"
- type="datetimerange"
- value-format="yyyy-MM-dd HH:mm:ss">
- </el-date-picker> -->
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ヤ娇鐢ㄤ汉', trigger: 'change' }]" label="浣跨敤浜�:"
+ <el-form-item :rules="[{ required: true, message: '璇疯緭鍏ヤ娇鐢ㄤ汉', trigger: 'blur' }]"
+ label="浣跨敤浜�:"
prop="usePerson">
<el-input v-model="form.usePerson" :disabled="isShow" size="small" style="width:100%"></el-input>
- <!-- <el-select v-model="form.usePerson" placeholder="璇烽�夋嫨" :disabled="isShow" size="small" style="width:100%">
- <el-option v-for="item in responsiblePersonList" :key="item.name" :label="item.name" :value="item.id">
- </el-option>
- </el-select> -->
</el-form-item>
</el-col>
<el-col :span="24">
@@ -162,11 +151,9 @@
<script>
import {
deviceRecordPage,
- exportUseRecord,
selectDeviceByCode,
saveDeviceRecord,
- updateDeviceRecord,
- deleteDeviceRecord,
+ deleteDeviceRecord, deviceRecordExport,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/system/user";
export default {
@@ -224,7 +211,6 @@
remark: '',
},
dialogVisible: false,
- operationType: '',
formParamList: [],
}
},
@@ -264,25 +250,20 @@
}
})
},
- // 鎵撳紑瀵煎嚭寮规閫夋嫨缂栧埗浜恒�佹壒鍑嗕汉
- openHandleOut() {
- this.ratifyDialog = true
- },
//瀵煎嚭
handleDown() {
this.outLoading = true
- exportUseRecord({
+ deviceRecordExport({
deviceId: this.clickNodeVal.value,
exportDate: this.exportDate
}).then(res => {
this.outLoading = false
const blob = new Blob([res], { type: 'application/octet-stream' });
- this.$download.saveAs(blob, '璁惧浣跨敤璁板綍.doc')
+ this.$download.saveAs(blob, '璁惧浣跨敤璁板綍.xlsx')
})
},
//鏂板缓
openAdd() {
- this.operationType = 'add'
this.getUserList()
selectDeviceByCode({ id: this.clickNodeVal.value }).then(res => {
this.form.deviceName = res.data.deviceName
@@ -292,12 +273,6 @@
})
});
},
- usePersonName(value) {
- const index = this.userList.findIndex(item => item.id === value)
- if (index > -1) {
- this.form.usePerson = this.userList[index].name
- }
- },
//纭娣诲姞璁板綍
saveRecord() {
this.$refs.form.validate((valid) => {
@@ -305,33 +280,22 @@
this.form.useStartDate = this.form.useDateList[0]
this.form.useEndDate = this.form.useDateList[1]
this.form.deviceId = this.clickNodeVal.value
- if (this.operationType === 'add') {
- saveDeviceRecord(this.form).then(res => {
- if (res.code == 200) {
- this.$message.success('鏂板鎴愬姛')
- this.getTableList(this.clickNodeVal.value)
- this.dialogVisible = false
- }
- })
- this.dialogVisible = false;
- } else {
- updateDeviceRecord(this.form).then(res => {
- if (res.code == 200) {
- this.$message.success('淇敼鎴愬姛')
- this.getTableList(this.clickNodeVal.value)
- this.dialogVisible = false
- }
- })
- this.dialogVisible = false;
- }
+ saveDeviceRecord(this.form).then(res => {
+ if (res.code == 200) {
+ this.$message.success('鏂板鎴愬姛')
+ this.getTableList(this.clickNodeVal.value)
+ this.dialogVisible = false
+ }
+ })
+ this.dialogVisible = false;
}
});
},
//鏌ョ湅璇︽儏
- showDetailsDialog(type, row) {
- this.operationType = type;
+ showDetailsDialog(row) {
console.log(row)
this.dialogVisible = true;
+ this.isShow = true;
this.getUserList()
this.form = row;
let list = []
@@ -459,7 +423,7 @@
}
.search_label {
- width: 140px;
+ width: 74px;
font-size: 14px;
text-align: right;
margin-right: 10px;
--
Gitblit v1.9.3