| | |
| | | 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(); |
| | | |
| | |
| | | |
| | | /** 删除按钮操作 */ |
| | | 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() |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | /** 关闭弹窗 */ |
| | |
| | | :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> |
| | |
| | | |
| | | > |
| | | </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)">修改 |
| | |
| | | </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> |