Browse Source

feat: 告警是启用状态时候不可以进行修改和删除

yanglzh 1 year ago
parent
commit
a2924add5c
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/views/iot/alarm/setting/index.vue

+ 2 - 3
src/views/iot/alarm/setting/index.vue

@@ -59,7 +59,7 @@
 						</div>
 					</div>
 					<div class="card-tools">
-						<el-button type="primary" text bg @click="onOpenEdit(item)" v-auth="'edit'">
+						<el-button type="primary" :disabled="item.status === 1" text bg @click="onOpenEdit(item)" v-auth="'edit'">
 							<el-icon>
 								<ele-Edit />
 							</el-icon>
@@ -80,7 +80,7 @@
 							禁用
 						</el-button>
 
-						<el-button type="info" text bg @click="onRowDel(item)" v-auth="'del'">
+						<el-button type="info" :disabled="item.status === 1" text bg @click="onRowDel(item)" v-auth="'del'">
 							<el-icon>
 								<ele-Delete />
 							</el-icon>
@@ -236,7 +236,6 @@ export default defineComponent({
 });
 </script>
 <style scoped lang="scss">
-
 .el-button.is-text:not(.is-disabled).is-has-bg {
 	background-color: var(--next-border-color-light);
 }