@@ -79,6 +79,8 @@ const deleteBatchUser = () => {
7979 })
8080}
8181const deleteHandler = (row : any ) => {
82+ if (row .type === ' system' ) return
83+
8284 ElMessageBox .confirm (t (' embedded.delete' , { msg: row .name }), {
8385 confirmButtonType: ' danger' ,
8486 confirmButtonText: t (' dashboard.delete' ),
@@ -145,7 +147,10 @@ const search = ($event: any = {}) => {
145147 .listPage (pageInfo .currentPage , pageInfo .pageSize , data )
146148 .then ((res ) => {
147149 toggleRowLoading .value = true
148- fieldList .value = res .items
150+ fieldList .value = res .items .map ((ele : any ) => ({
151+ ... ele ,
152+ value: ele .type === ' system' ? t (' variables.built_in' ) : ele .value ,
153+ }))
149154 pageInfo .total = res .total
150155 searchLoading .value = false
151156 nextTick (() => {
@@ -234,6 +239,7 @@ const saveHandler = () => {
234239const editHandler = (row : any ) => {
235240 pageForm .value .id = null
236241 if (row ) {
242+ if (row .type === ' system' ) return
237243 const { id, name, var_type, value } = row
238244 pageForm .value .id = id
239245 pageForm .value .name = name
@@ -340,7 +346,12 @@ const handleCurrentChange = (val: number) => {
340346 :content =" $t('datasource.edit')"
341347 placement =" top"
342348 >
343- <el-icon class =" action-btn" size =" 16" @click =" editHandler(scope.row)" >
349+ <el-icon
350+ class =" action-btn"
351+ :class =" scope.row.type === 'system' && 'not-allow'"
352+ size =" 16"
353+ @click =" editHandler(scope.row)"
354+ >
344355 <IconOpeEdit ></IconOpeEdit >
345356 </el-icon >
346357 </el-tooltip >
@@ -350,7 +361,12 @@ const handleCurrentChange = (val: number) => {
350361 :content =" $t('dashboard.delete')"
351362 placement =" top"
352363 >
353- <el-icon class =" action-btn" size =" 16" @click =" deleteHandler(scope.row)" >
364+ <el-icon
365+ class =" action-btn"
366+ :class =" scope.row.type === 'system' && 'not-allow'"
367+ size =" 16"
368+ @click =" deleteHandler(scope.row)"
369+ >
354370 <IconOpeDelete ></IconOpeDelete >
355371 </el-icon >
356372 </el-tooltip >
@@ -643,6 +659,7 @@ const handleCurrentChange = (val: number) => {
643659
644660 & .not-allow {
645661 cursor : not-allowed ;
662+ color : #bbbfc4 ;
646663 }
647664 }
648665 .ed-icon + .ed-icon {
0 commit comments