From 0efb10e3999d1bcb7cc65008b067836ddd71c82c Mon Sep 17 00:00:00 2001
From: 唐耀东 <18861537@qq.com>
Date: 星期一, 07 二月 2022 17:47:35 +0800
Subject: [PATCH] 设备、外设单元修改
---
src/views/device/equipment/index.vue | 23 ++++++++++-------------
src/views/device/peripheralUnit/index.vue | 20 ++++++++++++++------
2 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/src/views/device/equipment/index.vue b/src/views/device/equipment/index.vue
index 8e56435..6800024 100644
--- a/src/views/device/equipment/index.vue
+++ b/src/views/device/equipment/index.vue
@@ -139,11 +139,7 @@
{{formatZero(scope.row.serialNumber, 4)}}
</template>
</el-table-column>
- <el-table-column label="璁惧绫诲瀷" min-width="120" align="center" prop="type">
- <template slot-scope="scope">
- <dict-tag :options="dict.type.DICT101" :value="scope.row.type"/>
- </template>
- </el-table-column>
+ <el-table-column label="璁惧绫诲瀷" min-width="120" align="center" prop="type_dictText"/>
<el-table-column label="纭欢搴忓垪鐮�" min-width="120" align="center" prop="sequenceCode" show-overflow-tooltip/>
<el-table-column label="杞欢鐗堟湰" align="center" min-width="120" prop="edition" show-overflow-tooltip/>
<el-table-column label="瀛︽牎鍚嶇О" align="center" prop="schoolId_dictText" show-overflow-tooltip/>
@@ -194,7 +190,7 @@
<!-- 娣诲姞鎴栦慨鏀规櫤鎺ц澶囧璇濇 -->
<Dialog :title="title" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
- <el-form-item label="搴忓垪鍙�11" prop="serialNumber">
+ <el-form-item label="搴忓垪鍙�" prop="serialNumber">
<el-input v-model="form.serialNumber" :disabled="disabled" placeholder="璇疯緭鍏ュ簭鍒楀彿"/>
</el-form-item>
<el-form-item label="璁惧绫诲瀷" prop="type">
@@ -339,12 +335,12 @@
hostId: [
{required: true, message: "涓绘満ID涓嶈兘涓虹┖", trigger: "blur"}
],
- networkId: [
- {required: true, message: "尾缃戠粶ID涓嶈兘涓虹┖", trigger: "blur"}
- ],
- frequencyBand: [
- {required: true, message: "尾宸ヤ綔棰戞涓嶈兘涓虹┖", trigger: "blur"}
- ],
+ // networkId: [
+ // {required: true, message: "尾缃戠粶ID涓嶈兘涓虹┖", trigger: "blur"}
+ // ],
+ // frequencyBand: [
+ // {required: true, message: "尾宸ヤ綔棰戞涓嶈兘涓虹┖", trigger: "blur"}
+ // ],
batchId: [
{required: true, message: "鐢熶骇鎵规涓嶈兘涓虹┖", trigger: "blur"}
],
@@ -361,7 +357,7 @@
},
created() {
this.getList();
- this.getSchool()
+ //this.getSchool()
this.getBatch()
},
methods: {
@@ -370,6 +366,7 @@
this.loading = true;
listEquipment(this.queryParams).then(response => {
this.equipmentList = response.rows;
+ console.log(this.equipmentList);
this.total = response.total;
this.loading = false;
});
diff --git a/src/views/device/peripheralUnit/index.vue b/src/views/device/peripheralUnit/index.vue
index d6a5142..0de5611 100644
--- a/src/views/device/peripheralUnit/index.vue
+++ b/src/views/device/peripheralUnit/index.vue
@@ -227,7 +227,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
- <el-button :loading="buttonLoading" type="primary" @click="submitForm">纭� 瀹�</el-button>
+ <el-button :loading="buttonLoading" type="primary" @click="submitForm" :disabled="disabled">纭� 瀹�</el-button>
<el-button @click="cancel">鍙� 娑�</el-button>
</div>
</Dialog>
@@ -236,7 +236,7 @@
<Dialog :title="title" :visible.sync="uploadFlag" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="闄勪欢">
- <fileUpload v-model="form.filePath" limit="1"/>
+ <fileUpload v-model="form.filePath" :limit="1"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -358,12 +358,12 @@
},
created() {
this.getList();
- this.getManufacturerList();
+
},
methods: {
getManufacturerList() {
listManufacturer().then(res => {
- this.manufacturerList = res.data
+ this.manufacturerList = res.data;
})
},
/** 鏌ヨ澶栬鍗曞厓鍒楄〃 */
@@ -373,6 +373,7 @@
this.peripheralUnitList = response.rows;
this.total = response.total;
this.loading = false;
+ this.getManufacturerList();
});
},
// 鍙栨秷鎸夐挳
@@ -440,7 +441,7 @@
this.loading = false;
this.form = response.data;
this.open = true;
- this.title = "淇敼澶栬鍗曞厓";
+ this.title = "鏌ョ湅澶栬鍗曞厓";
});
},
/** 淇敼鎸夐挳鎿嶄綔 */
@@ -448,11 +449,12 @@
this.loading = true;
this.disabled = false
this.reset();
- this.getManufacturerList();
+ //this.getManufacturerList();
const id = row.id || this.ids
getPeripheralUnit(id).then(response => {
this.loading = false;
this.form = response.data;
+ this.form.manufacturer = parseInt(this.form.manufacturer);
this.open = true;
this.title = "淇敼澶栬鍗曞厓";
});
@@ -461,6 +463,12 @@
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
+ if(this.uploadFlag){
+ if(!this.form.filePath){
+ this.$modal.msgWarning("璇烽�夋嫨涓婁紶闄勪欢");
+ return;
+ }
+ }
this.buttonLoading = true;
if (this.form.id != null) {
updatePeripheralUnit(this.form).then(response => {
--
Gitblit v1.9.1