|
|
@ -5,14 +5,14 @@ import { |
|
|
|
getDictTypeForm, |
|
|
|
getDictTypeForm, |
|
|
|
addDictType, |
|
|
|
addDictType, |
|
|
|
updateDictType, |
|
|
|
updateDictType, |
|
|
|
deleteDictTypes |
|
|
|
deleteDictTypes, |
|
|
|
} from "@/api/dict"; |
|
|
|
} from "@/api/dict"; |
|
|
|
|
|
|
|
|
|
|
|
import { DictTypePageVO, DictTypeQuery, DictTypeForm } from "@/api/dict/types"; |
|
|
|
import { DictTypePageVO, DictTypeQuery, DictTypeForm } from "@/api/dict/types"; |
|
|
|
|
|
|
|
|
|
|
|
defineOptions({ |
|
|
|
defineOptions({ |
|
|
|
name: "DictType", |
|
|
|
name: "DictType", |
|
|
|
inheritAttrs: false |
|
|
|
inheritAttrs: false, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const queryFormRef = ref(ElForm); |
|
|
|
const queryFormRef = ref(ElForm); |
|
|
@ -24,23 +24,23 @@ const total = ref(0); |
|
|
|
|
|
|
|
|
|
|
|
const queryParams = reactive<DictTypeQuery>({ |
|
|
|
const queryParams = reactive<DictTypeQuery>({ |
|
|
|
pageNum: 1, |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 10 |
|
|
|
pageSize: 10, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const dictTypeList = ref<DictTypePageVO[]>(); |
|
|
|
const dictTypeList = ref<DictTypePageVO[]>(); |
|
|
|
|
|
|
|
|
|
|
|
const dialog = reactive({ |
|
|
|
const dialog = reactive({ |
|
|
|
title: "", |
|
|
|
title: "", |
|
|
|
visible: false |
|
|
|
visible: false, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const formData = reactive<DictTypeForm>({ |
|
|
|
const formData = reactive<DictTypeForm>({ |
|
|
|
status: 1 |
|
|
|
status: 1, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const rules = reactive({ |
|
|
|
const rules = reactive({ |
|
|
|
name: [{ required: true, message: "请输入字典类型名称", trigger: "blur" }], |
|
|
|
name: [{ required: true, message: "请输入字典类型名称", trigger: "blur" }], |
|
|
|
code: [{ required: true, message: "请输入字典类型编码", trigger: "blur" }] |
|
|
|
code: [{ required: true, message: "请输入字典类型编码", trigger: "blur" }], |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
/** 查询 */ |
|
|
|
/** 查询 */ |
|
|
@ -140,7 +140,7 @@ function handleDelete(dictTypeId?: number) { |
|
|
|
ElMessageBox.confirm("确认删除已选中的数据项?", "警告", { |
|
|
|
ElMessageBox.confirm("确认删除已选中的数据项?", "警告", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
type: "warning", |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
deleteDictTypes(dictTypeIds).then(() => { |
|
|
|
deleteDictTypes(dictTypeIds).then(() => { |
|
|
|
ElMessage.success("删除成功"); |
|
|
|
ElMessage.success("删除成功"); |
|
|
@ -151,7 +151,7 @@ function handleDelete(dictTypeId?: number) { |
|
|
|
|
|
|
|
|
|
|
|
const dictDataDialog = reactive({ |
|
|
|
const dictDataDialog = reactive({ |
|
|
|
title: "", |
|
|
|
title: "", |
|
|
|
visible: false |
|
|
|
visible: false, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const selectedDictType = reactive({ typeCode: "", typeName: "" }); // 当前选中的字典类型 |
|
|
|
const selectedDictType = reactive({ typeCode: "", typeName: "" }); // 当前选中的字典类型 |
|
|
@ -188,12 +188,10 @@ onMounted(() => { |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="primary" @click="handleQuery()" |
|
|
|
<el-button type="primary" @click="handleQuery()"> |
|
|
|
> |
|
|
|
|
|
|
|
<i-ep-search /> |
|
|
|
<i-ep-search /> |
|
|
|
搜索 |
|
|
|
搜索 |
|
|
|
</el-button |
|
|
|
</el-button> |
|
|
|
> |
|
|
|
|
|
|
|
<el-button @click="resetQuery()"> |
|
|
|
<el-button @click="resetQuery()"> |
|
|
|
<i-ep-refresh /> |
|
|
|
<i-ep-refresh /> |
|
|
|
重置 |
|
|
|
重置 |
|
|
@ -212,8 +210,7 @@ onMounted(() => { |
|
|
|
> |
|
|
|
> |
|
|
|
<i-ep-plus /> |
|
|
|
<i-ep-plus /> |
|
|
|
新增类型 |
|
|
|
新增类型 |
|
|
|
</el-button |
|
|
|
</el-button> |
|
|
|
> |
|
|
|
|
|
|
|
<el-button |
|
|
|
<el-button |
|
|
|
type="danger" |
|
|
|
type="danger" |
|
|
|
:disabled="ids.length === 0" |
|
|
|
:disabled="ids.length === 0" |
|
|
@ -221,8 +218,7 @@ onMounted(() => { |
|
|
|
> |
|
|
|
> |
|
|
|
<i-ep-delete /> |
|
|
|
<i-ep-delete /> |
|
|
|
删除 |
|
|
|
删除 |
|
|
|
</el-button |
|
|
|
</el-button> |
|
|
|
> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<div class="any-table"> |
|
|
|
<div class="any-table"> |
|
|
|
<el-table |
|
|
|
<el-table |
|
|
@ -252,8 +248,7 @@ onMounted(() => { |
|
|
|
> |
|
|
|
> |
|
|
|
<i-ep-Collection /> |
|
|
|
<i-ep-Collection /> |
|
|
|
字典数据 |
|
|
|
字典数据 |
|
|
|
</el-button |
|
|
|
</el-button> |
|
|
|
> |
|
|
|
|
|
|
|
<el-button |
|
|
|
<el-button |
|
|
|
v-hasPerm="['sys:dict_type:edit']" |
|
|
|
v-hasPerm="['sys:dict_type:edit']" |
|
|
|
type="primary" |
|
|
|
type="primary" |
|
|
@ -263,8 +258,7 @@ onMounted(() => { |
|
|
|
> |
|
|
|
> |
|
|
|
<i-ep-edit /> |
|
|
|
<i-ep-edit /> |
|
|
|
编辑 |
|
|
|
编辑 |
|
|
|
</el-button |
|
|
|
</el-button> |
|
|
|
> |
|
|
|
|
|
|
|
<el-button |
|
|
|
<el-button |
|
|
|
v-hasPerm="['sys:dict_type:delete']" |
|
|
|
v-hasPerm="['sys:dict_type:delete']" |
|
|
|
type="primary" |
|
|
|
type="primary" |
|
|
@ -274,8 +268,7 @@ onMounted(() => { |
|
|
|
> |
|
|
|
> |
|
|
|
<i-ep-delete /> |
|
|
|
<i-ep-delete /> |
|
|
|
删除 |
|
|
|
删除 |
|
|
|
</el-button |
|
|
|
</el-button> |
|
|
|
> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
@ -346,4 +339,8 @@ onMounted(() => { |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
|
|
|
|
:deep(.el-card__body) { |
|
|
|
|
|
|
|
padding: 10px 0 0 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|