From 32c5fc95afbb2241d80b986e385e17ee553c258c Mon Sep 17 00:00:00 2001
From: 唐耀东 <18861537@qq.com>
Date: 星期五, 13 五月 2022 22:04:32 +0800
Subject: [PATCH] 提交代码
---
src/views/construction/ipc/index.vue | 66 +++++++++++++++++++++++++-------
1 files changed, 51 insertions(+), 15 deletions(-)
diff --git a/src/views/construction/ipc/index.vue b/src/views/construction/ipc/index.vue
index 0b9ad00..82937e9 100644
--- a/src/views/construction/ipc/index.vue
+++ b/src/views/construction/ipc/index.vue
@@ -75,7 +75,11 @@
<el-table-column label="IP" align="center" prop="ip"/>
<el-table-column label="绔彛" align="center" prop="port"/>
<el-table-column label="鐧诲綍璐︽埛" align="center" prop="loginAccount"/>
- <el-table-column label="NVR" align="center" prop="nvrId_dictText"/>
+ <el-table-column label="NVR" align="center" prop="nvrId_dictText">
+ <template slot-scope="scope">
+ <el-link type="primary" @click="nvrClick(scope.row)">{{scope.row.nvrId_dictText}}</el-link>
+ </template>
+ </el-table-column>
<el-table-column label="閫氶亾" align="center" prop="passageway_dictText"/>
<el-table-column label="瀹夎浣嶇疆" align="center" prop="buildingId_dictText"/>
<el-table-column label="鎵�灞炲崟浣�" align="center" prop="organizationId_dictText"/>
@@ -85,6 +89,13 @@
<!-- <el-table-column label="鐢熶骇鍘傚晢" align="center" prop="manufacturerId_dictText" />-->
<el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-view"
+ @click="handleInfo(scope.row)"
+ >鏌ョ湅
+ </el-button>
<el-button
size="mini"
type="text"
@@ -117,7 +128,7 @@
<!-- 娣诲姞鎴栦慨鏀筰pc璁惧瀵硅瘽妗� -->
<el-dialog :title="title" :visible.sync="open" width="700px" :append-to-body="true" :close-on-click-modal="false"
:destroy-on-close="true">
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px" :disabled="disabled">
<el-row>
<el-col :span="9">
<el-form-item label="MAC" prop="mac">
@@ -183,11 +194,19 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
- <el-button :loading="buttonLoading" type="primary" @click="copy">澶嶅埗涓婁竴鏉′俊鎭�</el-button>
- <el-button :loading="buttonLoading" type="primary" @click="submitForm">纭� 瀹�</el-button>
+ <el-button :loading="buttonLoading" :disabled="disabled" type="primary" @click="copy">澶嶅埗涓婁竴鏉′俊鎭�</el-button>
+ <el-button :loading="buttonLoading" :disabled="disabled" type="primary" @click="submitForm">纭� 瀹�</el-button>
<el-button @click="cancel">鍙� 娑�</el-button>
</div>
</el-dialog>
+
+ <!-- 鏈嶅姟鍣� -->
+ <Dialog title="鏈嶅姟鍣�" :visible.sync="nvrOpen" width="700px" :append-to-body="true" :destroy-on-close="true">
+ <nvr-form v-if="nvrOpen" :nvrId="nvrId"></nvr-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="nvrOpen = false">鍏� 闂�</el-button>
+ </div>
+ </Dialog>
</div>
</template>
@@ -198,6 +217,7 @@
import constructionBatch from "../../components/constructionBatch";
import manufacturer from "../../components/manufacturer";
import nvr from '../../components/nvr'
+import nvrForm from '../../components/nvr/form'
export default {
name: "Ipc",
@@ -207,7 +227,8 @@
organization,
constructionBatch,
manufacturer,
- nvr
+ nvr,
+ nvrForm
},
props: {
schoolId: {
@@ -286,7 +307,10 @@
{required: true, message: "鏂藉伐鎵规涓嶈兘涓虹┖", trigger: "blur"}
],
passageway: []
- }
+ },
+ disabled: false,
+ nvrOpen: false,
+ nvrId: undefined
};
},
computed: {
@@ -367,19 +391,33 @@
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
this.reset();
+ this.disabled = false;
this.open = true;
- this.title = "娣诲姞ipc璁惧";
+ this.title = "娣诲姞IPC璁惧";
},
- /** 淇敼鎸夐挳鎿嶄綔 */
- handleUpdate(row) {
+ handleInfo(row) {
this.loading = true;
+ this.disabled = true;
this.reset();
const id = row.id || this.ids
getIpc(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
- this.title = "淇敼ipc璁惧";
+ this.title = "IPC璁惧璇︽儏";
+ });
+ },
+ /** 淇敼鎸夐挳鎿嶄綔 */
+ handleUpdate(row) {
+ this.loading = true;
+ this.disabled = false;
+ this.reset();
+ const id = row.id || this.ids
+ getIpc(id).then(response => {
+ this.loading = false;
+ this.form = response.data;
+ this.open = true;
+ this.title = "淇敼IPC璁惧";
});
},
/** 鎻愪氦鎸夐挳 */
@@ -449,11 +487,9 @@
this.loading = false;
});
},
- /** 瀵煎嚭鎸夐挳鎿嶄綔 */
- handleExport() {
- this.download('oa/ipc/export', {
- ...this.queryParams
- }, `ipc_${new Date().getTime()}.xlsx`)
+ nvrClick(row) {
+ this.nvrId = row.nvrId;
+ this.nvrOpen = true;
}
}
};
--
Gitblit v1.9.1