From 2f8a257efd2b64dc40666b0d332edb7824a9768d Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期日, 27 四月 2025 09:58:29 +0800 Subject: [PATCH] remove all semicolons --- src/views/system/dict/data.vue | 148 ++++++++++++++++++++++++------------------------ 1 files changed, 74 insertions(+), 74 deletions(-) diff --git a/src/views/system/dict/data.vue b/src/views/system/dict/data.vue index eff8acc..f4e2c6f 100644 --- a/src/views/system/dict/data.vue +++ b/src/views/system/dict/data.vue @@ -177,24 +177,24 @@ <script setup name="Data"> import useDictStore from '@/store/modules/dict' -import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type"; -import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data"; +import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type" +import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data" -const { proxy } = getCurrentInstance(); -const { sys_normal_disable } = proxy.useDict("sys_normal_disable"); +const { proxy } = getCurrentInstance() +const { sys_normal_disable } = proxy.useDict("sys_normal_disable") -const dataList = ref([]); -const open = ref(false); -const loading = ref(true); -const showSearch = ref(true); -const ids = ref([]); -const single = ref(true); -const multiple = ref(true); -const total = ref(0); -const title = ref(""); -const defaultDictType = ref(""); -const typeOptions = ref([]); -const route = useRoute(); +const dataList = ref([]) +const open = ref(false) +const loading = ref(true) +const showSearch = ref(true) +const ids = ref([]) +const single = ref(true) +const multiple = ref(true) +const total = ref(0) +const title = ref("") +const defaultDictType = ref("") +const typeOptions = ref([]) +const route = useRoute() // 鏁版嵁鏍囩鍥炴樉鏍峰紡 const listClassOptions = ref([ { value: "default", label: "榛樿" }, @@ -203,7 +203,7 @@ { value: "info", label: "淇℃伅" }, { value: "warning", label: "璀﹀憡" }, { value: "danger", label: "鍗遍櫓" } -]); +]) const data = reactive({ form: {}, @@ -219,40 +219,40 @@ dictValue: [{ required: true, message: "鏁版嵁閿�间笉鑳戒负绌�", trigger: "blur" }], dictSort: [{ required: true, message: "鏁版嵁椤哄簭涓嶈兘涓虹┖", trigger: "blur" }] } -}); +}) -const { queryParams, form, rules } = toRefs(data); +const { queryParams, form, rules } = toRefs(data) /** 鏌ヨ瀛楀吀绫诲瀷璇︾粏 */ function getTypes(dictId) { getType(dictId).then(response => { - queryParams.value.dictType = response.data.dictType; - defaultDictType.value = response.data.dictType; - getList(); - }); + queryParams.value.dictType = response.data.dictType + defaultDictType.value = response.data.dictType + getList() + }) } /** 鏌ヨ瀛楀吀绫诲瀷鍒楄〃 */ function getTypeList() { getDictOptionselect().then(response => { - typeOptions.value = response.data; - }); + typeOptions.value = response.data + }) } /** 鏌ヨ瀛楀吀鏁版嵁鍒楄〃 */ function getList() { - loading.value = true; + loading.value = true listData(queryParams.value).then(response => { - dataList.value = response.rows; - total.value = response.total; - loading.value = false; - }); + dataList.value = response.rows + total.value = response.total + loading.value = false + }) } /** 鍙栨秷鎸夐挳 */ function cancel() { - open.value = false; - reset(); + open.value = false + reset() } /** 琛ㄥ崟閲嶇疆 */ @@ -266,53 +266,53 @@ dictSort: 0, status: "0", remark: undefined - }; - proxy.resetForm("dataRef"); + } + proxy.resetForm("dataRef") } /** 鎼滅储鎸夐挳鎿嶄綔 */ function handleQuery() { - queryParams.value.pageNum = 1; - getList(); + queryParams.value.pageNum = 1 + getList() } /** 杩斿洖鎸夐挳鎿嶄綔 */ function handleClose() { - const obj = { path: "/system/dict" }; - proxy.$tab.closeOpenPage(obj); + const obj = { path: "/system/dict" } + proxy.$tab.closeOpenPage(obj) } /** 閲嶇疆鎸夐挳鎿嶄綔 */ function resetQuery() { - proxy.resetForm("queryRef"); - queryParams.value.dictType = defaultDictType.value; - handleQuery(); + proxy.resetForm("queryRef") + queryParams.value.dictType = defaultDictType.value + handleQuery() } /** 鏂板鎸夐挳鎿嶄綔 */ function handleAdd() { - reset(); - open.value = true; - title.value = "娣诲姞瀛楀吀鏁版嵁"; - form.value.dictType = queryParams.value.dictType; + reset() + open.value = true + title.value = "娣诲姞瀛楀吀鏁版嵁" + form.value.dictType = queryParams.value.dictType } /** 澶氶�夋閫変腑鏁版嵁 */ function handleSelectionChange(selection) { - ids.value = selection.map(item => item.dictCode); - single.value = selection.length != 1; - multiple.value = !selection.length; + ids.value = selection.map(item => item.dictCode) + single.value = selection.length != 1 + multiple.value = !selection.length } /** 淇敼鎸夐挳鎿嶄綔 */ function handleUpdate(row) { - reset(); - const dictCode = row.dictCode || ids.value; + reset() + const dictCode = row.dictCode || ids.value getData(dictCode).then(response => { - form.value = response.data; - open.value = true; - title.value = "淇敼瀛楀吀鏁版嵁"; - }); + form.value = response.data + open.value = true + title.value = "淇敼瀛楀吀鏁版嵁" + }) } /** 鎻愪氦鎸夐挳 */ @@ -321,42 +321,42 @@ if (valid) { if (form.value.dictCode != undefined) { updateData(form.value).then(response => { - useDictStore().removeDict(queryParams.value.dictType); - proxy.$modal.msgSuccess("淇敼鎴愬姛"); - open.value = false; - getList(); - }); + useDictStore().removeDict(queryParams.value.dictType) + proxy.$modal.msgSuccess("淇敼鎴愬姛") + open.value = false + getList() + }) } else { addData(form.value).then(response => { - useDictStore().removeDict(queryParams.value.dictType); - proxy.$modal.msgSuccess("鏂板鎴愬姛"); - open.value = false; - getList(); - }); + useDictStore().removeDict(queryParams.value.dictType) + proxy.$modal.msgSuccess("鏂板鎴愬姛") + open.value = false + getList() + }) } } - }); + }) } /** 鍒犻櫎鎸夐挳鎿嶄綔 */ function handleDelete(row) { - const dictCodes = row.dictCode || ids.value; + const dictCodes = row.dictCode || ids.value proxy.$modal.confirm('鏄惁纭鍒犻櫎瀛楀吀缂栫爜涓�"' + dictCodes + '"鐨勬暟鎹」锛�').then(function() { - return delData(dictCodes); + return delData(dictCodes) }).then(() => { - getList(); - proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - useDictStore().removeDict(queryParams.value.dictType); - }).catch(() => {}); + getList() + proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛") + useDictStore().removeDict(queryParams.value.dictType) + }).catch(() => {}) } /** 瀵煎嚭鎸夐挳鎿嶄綔 */ function handleExport() { proxy.download("system/dict/data/export", { ...queryParams.value - }, `dict_data_${new Date().getTime()}.xlsx`); + }, `dict_data_${new Date().getTime()}.xlsx`) } -getTypes(route.params && route.params.dictId); -getTypeList(); +getTypes(route.params && route.params.dictId) +getTypeList() </script> -- Gitblit v1.9.3