From 3bb3488abec439ea977329505633b50ff56bce43 Mon Sep 17 00:00:00 2001 From: 唐耀东 <18861537@qq.com> Date: 星期五, 13 五月 2022 17:20:16 +0800 Subject: [PATCH] 提交代码 --- src/views/construction/ipc/index.vue | 38 ++++++++++++++++++++++++++++++-------- 1 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/views/construction/ipc/index.vue b/src/views/construction/ipc/index.vue index 0b9ad00..fe7c503 100644 --- a/src/views/construction/ipc/index.vue +++ b/src/views/construction/ipc/index.vue @@ -88,6 +88,13 @@ <el-button size="mini" type="text" + icon="el-icon-view" + @click="handleInfo(scope.row)" + >鏌ョ湅 + </el-button> + <el-button + size="mini" + type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['oa:ipc:edit']" @@ -117,7 +124,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,8 +190,8 @@ </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> @@ -286,7 +293,8 @@ {required: true, message: "鏂藉伐鎵规涓嶈兘涓虹┖", trigger: "blur"} ], passageway: [] - } + }, + disabled: false }; }, computed: { @@ -367,19 +375,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璁惧"; }); }, /** 鎻愪氦鎸夐挳 */ -- Gitblit v1.9.1