修改并优化了一些功能及bug

This commit is contained in:
王利强
2026-05-14 13:45:46 +08:00
parent 805747d1d9
commit 2322fcf39a
51 changed files with 802 additions and 346 deletions

View File

@@ -61,6 +61,7 @@ const _sfc_main = {
const submitData = {
name: formData.name,
color: formData.color
// enterpriseId: userInfo.deptId
};
let res;
if (isEdit.value) {
@@ -78,7 +79,7 @@ const _sfc_main = {
loadAreaList();
}
} catch (err) {
common_vendor.index.__f__("error", "at pages/area/management.vue:144", "提交失败:", err);
common_vendor.index.__f__("error", "at pages/area/management.vue:152", "提交失败:", err);
common_vendor.index.showToast({ title: "操作失败", icon: "none" });
} finally {
submitting.value = false;
@@ -98,7 +99,7 @@ const _sfc_main = {
loadAreaList();
}
} catch (err) {
common_vendor.index.__f__("error", "at pages/area/management.vue:166", "删除失败:", err);
common_vendor.index.__f__("error", "at pages/area/management.vue:174", "删除失败:", err);
common_vendor.index.showToast({ title: "删除失败", icon: "none" });
}
}

View File

@@ -1 +1 @@
<view class="{{['padding', 'page', 'data-v-847f15e8', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{h}}"><view wx:if="{{a}}" class="area-list data-v-847f15e8"><view wx:for="{{b}}" wx:for-item="item" wx:key="f" class="padding bg-white radius margin-bottom data-v-847f15e8"><view class="flex justify-between data-v-847f15e8"><view class="data-v-847f15e8"><view class="text-bold text-black data-v-847f15e8">{{item.a}}</view><view class="margin-top flex align-center data-v-847f15e8"><text class="data-v-847f15e8">颜色:</text><view class="color-dot data-v-847f15e8" style="{{'background-color:' + item.b}}"></view><text class="margin-left-xs data-v-847f15e8">{{item.c}}</text></view></view><view class="data-v-847f15e8"><button class="bg-blue cu-btn data-v-847f15e8" bindtap="{{item.d}}">编辑</button><button class="bg-red cu-btn margin-left data-v-847f15e8" bindtap="{{item.e}}">删除</button></view></view></view></view><view wx:else class="empty-state data-v-847f15e8"><text class="text-gray data-v-847f15e8">暂无区域数据</text></view><button class="add-btn cuIcon-add bg-blue round data-v-847f15e8" bindtap="{{c}}">新增公司区域</button><area-form-popup wx:if="{{g}}" class="data-v-847f15e8" virtualHostClass="data-v-847f15e8" bindsubmit="{{d}}" bindclose="{{e}}" u-i="847f15e8-0" bind:__l="__l" bindupdateVisible="{{f}}" u-p="{{g}}"/></view>
<view class="{{['padding', 'page', 'data-v-847f15e8', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{h}}"><view wx:if="{{a}}" class="area-list data-v-847f15e8"><view wx:for="{{b}}" wx:for-item="item" wx:key="f" class="padding bg-white radius margin-bottom data-v-847f15e8"><view class="flex justify-between data-v-847f15e8"><view class="data-v-847f15e8"><view class="text-bold text-black data-v-847f15e8">{{item.a}}</view><view class="margin-top flex align-center data-v-847f15e8"><text class="data-v-847f15e8">颜色:</text><view class="color-dot data-v-847f15e8" style="{{'background-color:' + item.b}}"></view><text class="margin-left-xs data-v-847f15e8">{{item.c}}</text></view></view><view class="data-v-847f15e8"><button class="bg-blue cu-btn data-v-847f15e8" bindtap="{{item.d}}">编辑</button><button class="bg-red cu-btn margin-left data-v-847f15e8" bindtap="{{item.e}}">删除</button></view></view></view></view><view wx:else class="empty-state data-v-847f15e8"><text class="text-gray data-v-847f15e8">暂无区域数据</text></view><button class="add-btn bg-blue round data-v-847f15e8" bindtap="{{c}}">新增公司区域</button><area-form-popup wx:if="{{g}}" class="data-v-847f15e8" virtualHostClass="data-v-847f15e8" bindsubmit="{{d}}" bindclose="{{e}}" u-i="847f15e8-0" bind:__l="__l" bindupdateVisible="{{f}}" u-p="{{g}}"/></view>