From 03abaa317408167c3840fac31aeb86874b8a220d Mon Sep 17 00:00:00 2001 From: wxh <458319019@qq.com> Date: Tue, 30 Jul 2024 09:53:45 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20=E4=BA=BA=E5=91=98=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ant-vue/src/api/index.ts | 6 ++ ant-vue/src/components/select/DeptSelect.vue | 48 ++++++++++------ ant-vue/src/i18n/en.ts | 2 +- ant-vue/src/i18n/zh-CHS.ts | 2 +- ant-vue/src/plugins/vxe-table.ts | 4 +- ant-vue/src/views/dept/index.vue | 7 ++- ant-vue/src/views/product/index.vue | 4 +- ant-vue/src/views/role/index.vue | 7 ++- ant-vue/src/views/user/index.vue | 59 +++++++++++++++++--- 9 files changed, 105 insertions(+), 34 deletions(-) diff --git a/ant-vue/src/api/index.ts b/ant-vue/src/api/index.ts index 105aa30..60d6fed 100644 --- a/ant-vue/src/api/index.ts +++ b/ant-vue/src/api/index.ts @@ -261,9 +261,15 @@ export async function UserDelete(id: any) { export async function UserBindRole(data: any) { return await axios.post(`${url}/User/BindRole`, data); } +export async function UserBindDept(data: any) { + return await axios.post(`${url}/User/BindDept`, data); +} export async function UserQueryBindRole(params: any) { return await axios.get(`${url}/User/QueryBindRole?user_id=${params}`, ); } +export async function UserQueryBindDept(params: any) { + return await axios.get(`${url}/User/QueryBindDept?user_id=${params}`, ); +} //产品 export async function ProductPage(params: any) { diff --git a/ant-vue/src/components/select/DeptSelect.vue b/ant-vue/src/components/select/DeptSelect.vue index 147d6a3..1653ebf 100644 --- a/ant-vue/src/components/select/DeptSelect.vue +++ b/ant-vue/src/components/select/DeptSelect.vue @@ -1,15 +1,15 @@ + + \ No newline at end of file diff --git a/ant-vue/src/views/user/index.vue b/ant-vue/src/views/user/index.vue index b150798..17a8be0 100644 --- a/ant-vue/src/views/user/index.vue +++ b/ant-vue/src/views/user/index.vue @@ -34,7 +34,7 @@ {{$t('message.edit')}} {{$t('message.assigningRoles')}} - 分配部门 + {{$t('message.assigningDept')}} {{$t('message.delete')}} -- Gitee From 8db0c968702bc382b7b066cc5b451898b41a7f18 Mon Sep 17 00:00:00 2001 From: wxh <458319019@qq.com> Date: Tue, 30 Jul 2024 10:32:46 +0800 Subject: [PATCH 3/6] fix: sa --- ant-vue/src/views/production-plans/index.vue | 259 ++++++++++++++++++- 1 file changed, 255 insertions(+), 4 deletions(-) diff --git a/ant-vue/src/views/production-plans/index.vue b/ant-vue/src/views/production-plans/index.vue index b49d94c..cb73a6d 100644 --- a/ant-vue/src/views/production-plans/index.vue +++ b/ant-vue/src/views/production-plans/index.vue @@ -1,7 +1,258 @@ - + \ No newline at end of file -- Gitee From ada3a89272d95f4607737effaab8336af88f61a4 Mon Sep 17 00:00:00 2001 From: wxh <458319019@qq.com> Date: Wed, 31 Jul 2024 14:21:56 +0800 Subject: [PATCH 4/6] =?UTF-8?q?fix:=20=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ant-vue/src/api/index.ts | 7 +- ant-vue/src/components/select/Product.vue | 12 +- ant-vue/src/views/production-plans/index.vue | 118 ++++++++++++------- 3 files changed, 93 insertions(+), 44 deletions(-) diff --git a/ant-vue/src/api/index.ts b/ant-vue/src/api/index.ts index b9beebf..faf8743 100644 --- a/ant-vue/src/api/index.ts +++ b/ant-vue/src/api/index.ts @@ -306,8 +306,11 @@ export async function ProductionPlanCreate(data: any) { return await axios.post(`${url}/ProductionPlan/create`, data); } export async function ProductionPlanUpdate(data: any) { - return await axios.post(`${url}/ProductionPlan/change_state`, data); + return await axios.post(`${url}/ProductionPlan/update`, data); } export async function ProductionPlanDelete(id: any) { - return await axios.post(`${url}/SimCard/delete/${id}`); + return await axios.post(`${url}/ProductionPlan/delete/${id}`); +} +export async function ProductionPlanDetail(id: any) { + return await axios.get(`${url}/ProductionPlan/${id}`); } \ No newline at end of file diff --git a/ant-vue/src/components/select/Product.vue b/ant-vue/src/components/select/Product.vue index e86b602..308220f 100644 --- a/ant-vue/src/components/select/Product.vue +++ b/ant-vue/src/components/select/Product.vue @@ -14,7 +14,7 @@ const { t } = useI18n(); const page = ref(1); const pageSelect = ref(1); const options = ref([]); -const value = ref(props.modelValue); +const value = ref(); const valueResult = ref(""); const valueSearch = ref(""); const showOpen = ref(false); @@ -24,7 +24,7 @@ const List = async () => { const { data } = await ProductPage({ name: "", page: page.value, page_size: 100 }); const listArr = data.data.data.map((item: any) => ({ value: item.ID, label: item.name })); options.value = options.value.concat(listArr); - if (Number(props.modelValue) && !options.value.map((it) => it.value).includes(Number(props.modelValue))) { + if (Number(props.modelValue) && !options.value.map((it: any) => it.value).includes(Number(props.modelValue))) { page.value++; await List(); } else { @@ -40,6 +40,12 @@ const List = async () => { valueResult.value = value.value; }; +watch(()=>props.modelValue,(newValue)=>{ + console.log(newValue) + if(newValue) { + value.value = newValue + } +}) const select = async (ValueClick: any) => { if (ValueClick === -11) { value.value = valueResult.value; @@ -98,6 +104,8 @@ watch(value, async (newValue) => { page.value = 1; valueSearch.value = ""; await List(); + }else { + emits("update:modelValue", newValue); } }); diff --git a/ant-vue/src/views/production-plans/index.vue b/ant-vue/src/views/production-plans/index.vue index cb73a6d..a17f82d 100644 --- a/ant-vue/src/views/production-plans/index.vue +++ b/ant-vue/src/views/production-plans/index.vue @@ -13,16 +13,13 @@