From a5e6e7061cbef6912f294dcfd2cb88f472f8ca6f Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期二, 19 九月 2023 14:26:40 +0800
Subject: [PATCH] 企业端
---
company_admin/src/components/business/OperaCategoryWindow.vue | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/company_admin/src/components/business/OperaCategoryWindow.vue b/company_admin/src/components/business/OperaCategoryWindow.vue
index 7b28532..decc097 100644
--- a/company_admin/src/components/business/OperaCategoryWindow.vue
+++ b/company_admin/src/components/business/OperaCategoryWindow.vue
@@ -9,7 +9,7 @@
<h3 style="margin: 20px 0 10px 0;">鍩烘湰淇℃伅</h3>
<el-form :model="form" ref="form" :rules="rules">
<el-form-item label="绫诲埆鏉ユ簮" prop="type">
- <el-radio-group v-model="form.type" @change="changeRadio">
+ <el-radio-group v-model="form.type" :disabled="form.id ? true : false" @change="changeRadio">
<el-radio :label="1">浠庡钩鍙板簱閫夋嫨</el-radio>
<el-radio :label="0">浼佷笟鑷缓</el-radio>
</el-radio-group>
@@ -65,6 +65,7 @@
v-model="scope.row.isselect"
active-color="#13ce66"
inactive-color="#ff4949"
+ @change="changeIsselect($event, scope.row)"
:active-value="1"
:inactive-value="0">
</el-switch>
@@ -187,6 +188,18 @@
})
},
methods: {
+ changeIsselect(e, item) {
+ let num = 0
+ this.form.tableData.forEach(row => {
+ if (row.isselect === 1) {
+ num += 1
+ }
+ })
+ if (num > 2) {
+ item.isselect = 0
+ this.$message.warning({ message: '鍙兘璁剧疆涓や釜閫夐」' })
+ }
+ },
addItem() {
this.form.tableData.push({ name: '', isselect: 0, isshow: 1 })
},
--
Gitblit v1.9.3