新增商品拼团
This commit is contained in:
@@ -52,16 +52,13 @@ async function roleTemplateListAjax() {
|
||||
el.cehcked = false
|
||||
});
|
||||
list.value = res
|
||||
|
||||
if (list.value.length > 0) {
|
||||
visible.value = true
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
function show() {
|
||||
visible.value = true
|
||||
roleTemplateListAjax()
|
||||
}
|
||||
|
||||
|
||||
@@ -172,6 +172,7 @@ import menuSelect from "./components/menus.vue";
|
||||
import RoleApi, { SysRole, addRequest, getListRequest } from "@/api/account/role";
|
||||
import MenuAPI, { type RouteVO, CashMenu } from "@/api/account/menu";
|
||||
import roleTemplateDialog from "./components/roleTemplateDialog.vue";
|
||||
import { roleTemplateList } from '@/api/account/roleTemplate'
|
||||
|
||||
const roleTemplateDialogRef = ref(null)
|
||||
|
||||
@@ -242,11 +243,18 @@ function handlePlatformTypeChange(e: string | number | boolean | undefined) {
|
||||
function handleQuery() {
|
||||
loading.value = true;
|
||||
RoleApi.getList(queryParams)
|
||||
.then((data) => {
|
||||
.then(async (data) => {
|
||||
roleList.value = data.records;
|
||||
total.value = data.totalRow;
|
||||
|
||||
if (data.records.length == 0) {
|
||||
console.log('data===', data);
|
||||
|
||||
const res = await roleTemplateList({ isEnable: 1 })
|
||||
|
||||
console.log('roleTemplateList===', res);
|
||||
|
||||
|
||||
if (data.records.length == 0 && res.length > 0) {
|
||||
roleTemplateDialogRef.value.show()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user