diff --git a/src/store/modules/permission/dept/dept.js b/src/store/modules/permission/dept/dept.js
index d1dcc33..1f9604f 100644
--- a/src/store/modules/permission/dept/dept.js
+++ b/src/store/modules/permission/dept/dept.js
@@ -32,8 +32,8 @@ const mutations = {
setOpts: (state, data) => (state.opts = data),
};
const actions = {
- search: async ({ state, commit }) => {
- let res = await api.search(state.condition);
+ search: async ({ state, commit }, condition) => {
+ let res = await api.search(condition || state.condition);
commit('setList', res || []);
if (!res) {
ElMessage.error('查询失败');
diff --git a/src/views/permission/dept/index.vue b/src/views/permission/dept/index.vue
index 88e82f3..709d0fe 100644
--- a/src/views/permission/dept/index.vue
+++ b/src/views/permission/dept/index.vue
@@ -111,52 +111,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 取消
- 确定
-
-
+
@@ -228,6 +183,7 @@
+
+
diff --git a/src/views/permission/role/index.vue b/src/views/permission/role/index.vue
index e868c6d..3966113 100644
--- a/src/views/permission/role/index.vue
+++ b/src/views/permission/role/index.vue
@@ -131,7 +131,7 @@
{
+ formState.submitting = true;
if (checked || childChecked) {
- formState.form.departmentList.push(data);
+ formState.form.departmentList.push(data.id);
} else {
formState.form.departmentList.splice(formState.form.departmentList.indexOf(data.id), 1);
}
@@ -290,15 +291,29 @@
roleIds: [formState.form.id],
}
: { departmentId: data.id, isDeleteDepartmentOfEmployeeRole: true, roleId: formState.form.id };
- store.dispatch('role/updateDept', params);
+ await store.dispatch('role/updateDept', params);
nextTick(() => {
try {
unref(refsForm3).validate();
} catch (e) {
console.info(e);
}
+ unref(refsTree3).setCheckedKeys(formState.form.departmentList);
+ formState.submitting = false;
});
};
+ watch(
+ () => formState.currentTab,
+ (value) => {
+ if (value === '3') {
+ nextTick(() => {
+ if (!formState.form.departmentList.length) {
+ handleCheckDept({ id: 2 }, true, false);
+ }
+ });
+ }
+ }
+ );
const handleDetail = async () => {
formState.submitting = true;
if (formState.currentTab === '1' && formState.form.id) {
@@ -330,16 +345,18 @@
Object.assign(
formState.form,
_.cloneDeep(
- row || {
- id: null,
- systemId: null,
- roleName: null,
- roleDesc: null,
- isEnable: true,
- menuIds: [],
- permissionIds: [],
- departmentList: [2],
- }
+ row
+ ? { ...row, departmentList: row.departmentList.map((item) => item.id) }
+ : {
+ id: null,
+ systemId: null,
+ roleName: null,
+ roleDesc: null,
+ isEnable: true,
+ menuIds: [],
+ permissionIds: [],
+ departmentList: [],
+ }
)
);
};
diff --git a/src/views/sales/order/detail.vue b/src/views/sales/order/detail.vue
index 437e4bd..ef35c79 100644
--- a/src/views/sales/order/detail.vue
+++ b/src/views/sales/order/detail.vue
@@ -237,7 +237,7 @@
router.push({
name: 'CustomerManagement',
query: {
- account: state.form.userPhone,
+ phone: state.form.userPhone,
},
});
};
diff --git a/src/views/system/customer/index.vue b/src/views/system/customer/index.vue
index 3a87b9f..e59e3d1 100644
--- a/src/views/system/customer/index.vue
+++ b/src/views/system/customer/index.vue
@@ -12,8 +12,8 @@
>
-
-
+
+
@@ -47,7 +47,7 @@
}
const state = reactive({
condition: {
- account: null,
+ phone: null,
nickname: null,
dateRange: [],
},
@@ -61,14 +61,14 @@
);
const handleReset = () => {
state.condition = {
- account: null,
+ phone: null,
nickname: null,
dateRange: [],
};
};
const handleSearch = async () => {
- if (route.query.account && !state.condition.account) {
- state.condition.account = route.query.account;
+ if (route.query.phone && !state.condition.phone) {
+ state.condition.phone = route.query.phone;
store.commit('customer/setCondition', _.cloneDeep(state.condition));
}
loading.value = true;
diff --git a/src/views/system/notify/index.vue b/src/views/system/notify/index.vue
index d90dd5a..30aba4a 100644
--- a/src/views/system/notify/index.vue
+++ b/src/views/system/notify/index.vue
@@ -157,7 +157,7 @@
},
{
label: '发布人员',
- prop: 'createUser',
+ prop: 'createUserName',
width: 160,
},
{