|
@@ -185,6 +185,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup name="Data">
|
|
<script setup name="Data">
|
|
|
|
+import useDictStore from '@/store/modules/dict'
|
|
import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type";
|
|
import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type";
|
|
import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
|
|
import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
|
|
|
|
|
|
@@ -319,12 +320,14 @@ function submitForm() {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (form.value.dictCode != undefined) {
|
|
if (form.value.dictCode != undefined) {
|
|
updateData(form.value).then(response => {
|
|
updateData(form.value).then(response => {
|
|
|
|
+ useDictStore().removeDict(queryParams.value.dictType);
|
|
proxy.$modal.msgSuccess("修改成功");
|
|
proxy.$modal.msgSuccess("修改成功");
|
|
open.value = false;
|
|
open.value = false;
|
|
getList();
|
|
getList();
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
addData(form.value).then(response => {
|
|
addData(form.value).then(response => {
|
|
|
|
+ useDictStore().removeDict(queryParams.value.dictType);
|
|
proxy.$modal.msgSuccess("新增成功");
|
|
proxy.$modal.msgSuccess("新增成功");
|
|
open.value = false;
|
|
open.value = false;
|
|
getList();
|
|
getList();
|
|
@@ -341,6 +344,7 @@ function handleDelete(row) {
|
|
}).then(() => {
|
|
}).then(() => {
|
|
getList();
|
|
getList();
|
|
proxy.$modal.msgSuccess("删除成功");
|
|
proxy.$modal.msgSuccess("删除成功");
|
|
|
|
+ useDictStore().removeDict(queryParams.value.dictType);
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
}
|
|
}
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|