web
7 天以前 e8acf56b807be105702321a0be2119963fa69e03
src/views/system/dict/index.vue
@@ -2,6 +2,7 @@
import {sysDictType, sysDictData} from "@/api/system/dict";
import {onMounted} from "vue";
import setPostParams from "@/utils/searchParams.js";
import {ElMessage} from "element-plus";
const {proxy} = getCurrentInstance();
@@ -145,11 +146,12 @@
/** 删除按钮操作 */
function handleDelete(row) {
    proxy.$modal.confirm('确认删除"' + row.dictName + '?')
        .then(async () => {
            console.log("无删除功能");
        }).catch(() => {
    });
    proxy.$modal.confirm('确认删除"' + row.dictName + '?').then(() => {
        sysDictType().remove(row.id).then(() => {
            ElMessage.success('删除成功')
            getList()
        })
    })
}
/** 关闭弹窗 */
@@ -342,7 +344,7 @@
                :key="index"
                align="center"
            ></el-table-column>
            <el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                <template #default="scope">
                    <el-button link type="primary" icon="Edit" @click="handleDetail(scope.row)">查看字典数据</el-button>
                    <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>
@@ -405,7 +407,7 @@
                >
                </el-table-column>
                <el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
                <el-table-column label="操作" width="auto" align="center" class-name="small-padding fixed-width">
                    <template #default="scope">
                        <el-button link :type="dataForm.dictValue == scope.row.dictValue ? 'warning' : 'primary'"
                                   icon="Edit" @click="handleUpdateData(scope.row)">修改
@@ -416,7 +418,7 @@
                </el-table-column>
            </el-table>
            <el-form title="添加数据" v-show="isHandle" class="dataForm-box" ref="postDataRef" :rules="dataRules"
                     :model="dataForm" inline label-width="100px">
                     :model="dataForm" inline label-width="6.25rem">
                <el-form-item prop="dictType">
                    <span>{{ dataForm.dictType }}</span>
                </el-form-item>