fix: source和entity setting界面添加内置标识,不允许删除修改
This commit is contained in:
@@ -150,3 +150,7 @@ body {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-table .table-disabled-row {
|
||||
--el-table-tr-bg-color: var(--el-fill-color-light);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
@header-dragend="dragend"
|
||||
@sort-change="tableDataSort"
|
||||
@selection-change="selectionChange"
|
||||
:row-class-name="tableRowClassName"
|
||||
>
|
||||
<el-table-column
|
||||
:resizable="false"
|
||||
@@ -116,7 +117,7 @@ export default {
|
||||
dateFormatByAppearance,
|
||||
// 禁止勾选buildIn为1的项,即禁止修改、删除admin的账号
|
||||
checkSelectable (row) {
|
||||
return row.buildIn !== 1
|
||||
return row.isBuiltIn !== 1
|
||||
},
|
||||
handleListTypes (data) {
|
||||
let str = ''
|
||||
@@ -132,6 +133,11 @@ export default {
|
||||
str = str.slice(0, -1)
|
||||
}
|
||||
return str
|
||||
},
|
||||
tableRowClassName (row) {
|
||||
if (row.row.isBuiltIn === 1) {
|
||||
return 'table-disabled-row'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
@header-dragend="dragend"
|
||||
@sort-change="tableDataSort"
|
||||
@selection-change="selectionChange"
|
||||
:row-class-name="tableRowClassName"
|
||||
>
|
||||
<el-table-column
|
||||
:resizable="false"
|
||||
@@ -200,7 +201,7 @@ export default {
|
||||
},
|
||||
// 禁止勾选buildIn为1的项,即禁止修改、删除admin的账号
|
||||
checkSelectable (row) {
|
||||
return row.buildIn !== 1
|
||||
return row.isBuiltIn !== 1
|
||||
},
|
||||
fileChange (files, fileList) {
|
||||
if (this.fileList.length > 0 && this.fileList[0].status === 'success') {
|
||||
@@ -263,6 +264,11 @@ export default {
|
||||
}
|
||||
this.uploadLoading = false
|
||||
this.$message.error(this.$t('tip.uploadFailed', { msg: errorMsg }))
|
||||
},
|
||||
tableRowClassName (row) {
|
||||
if (row.row.isBuiltIn === 1) {
|
||||
return 'table-disabled-row'
|
||||
}
|
||||
}
|
||||
},
|
||||
setup () {
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
<button class="business-button business-button--light tag__btn" @click="cancel">
|
||||
<span>{{ $t('overall.cancel') }}</span>
|
||||
</button>
|
||||
<button style="position: relative;" class="business-button tag__btn" @click="saveEntity">
|
||||
<button style="position: relative;" class="business-button tag__btn" :disabled="editObj.isBuiltIn>0" @click="saveEntity">
|
||||
<!-- <loading :loading="blockOperation.save"></loading>-->
|
||||
<span>{{ $t('overall.save') }}</span>
|
||||
</button>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<span>{{ $t('overall.cancel') }}</span>
|
||||
</button>
|
||||
<button style="position: relative;" :class="{'disabled': blockOperation.save}"
|
||||
:disabled="sourceObj.usage>0" class="business-button tag__btn" @click="saveSource">
|
||||
:disabled="sourceObj.usage>0 || sourceObj.isBuiltIn>0" class="business-button tag__btn" @click="saveSource">
|
||||
<loading :loading="blockOperation.save"></loading>
|
||||
<span>{{ $t('overall.save') }}</span>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user