Commit b6a96b8e authored by Chen_9g's avatar Chen_9g

update: 字典优化,0.0.7

parent a4707321
...@@ -31,9 +31,9 @@ export function deleteDict(id) { ...@@ -31,9 +31,9 @@ export function deleteDict(id) {
method: 'DELETE', method: 'DELETE',
}); });
} }
export function viewDict(id) { export function viewDict(id, groupId) {
return request({ return request({
url: Api.viewDictUrl + id, url: Api.viewDictUrl + id + '/' + groupId,
method: 'GET', method: 'GET',
}); });
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
let isIdDisabled = true; let isIdDisabled = true;
try { try {
if (data && data.id) { if (data && data.id) {
const billData = (await viewDict(data.id)).data; const billData = (await viewDict(data.id, data.groupId)).data;
billData.code = billData.id; billData.code = billData.id;
await setProps({ conentLoading: false }); await setProps({ conentLoading: false });
setFieldsValue(billData, true); setFieldsValue(billData, true);
......
...@@ -95,7 +95,7 @@ export default defineComponent({ ...@@ -95,7 +95,7 @@ export default defineComponent({
}) })
}; };
function handleChangeStatus(record: any) { function handleChangeStatus(record: any) {
changeEnable({ id: record.id, isEnable: record.isEnable === 1 ? 0 : 1 }).then((res: Result<any>) => { changeEnable({ id: `${record.id}|${record.groupId}`, isEnable: record.isEnable === 1 ? 0 : 1 }).then((res: Result<any>) => {
handleSuccess(); handleSuccess();
ElMessage.success(res.msg); ElMessage.success(res.msg);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment