diff --git a/package.json b/package.json index 8cdba10..912d6af 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,10 @@ "axios": "^0.27.2", "countup.js": "^2.1.0", "echarts": "5.2.2", + "el-tree-transfer": "^2.4.7", "element-china-area-data": "^6.0.2", "element-plus": "^2.3.2", + "element-tree-transfer-pro": "^1.0.5", "file-saver": "2.0.5", "fuse.js": "6.4.6", "highlight.js": "^11.5.1", diff --git a/src/api/business/Custom/Regions/region.js b/src/api/business/Custom/Regions/region.js index 02b7420..b817324 100644 --- a/src/api/business/Custom/Regions/region.js +++ b/src/api/business/Custom/Regions/region.js @@ -12,6 +12,18 @@ export function regionTreeList(query) { }) } +/** +* 省市区数据表树形查询列表(二级) +* @param {查询条件} data +*/ +export function getSecondRegionTreeList(query) { + return request({ + url: '/business/Region/getSecondRegionTreeList', + method: 'get', + params: query + }) +} + // 省市区数据表新增或修改 export function addOrUpdateRegion(data) { return request({ diff --git a/src/api/business/LogisticsManage/Deliverys/delivery.js b/src/api/business/LogisticsManage/Deliverys/delivery.js index 5fe854b..e3a109b 100644 --- a/src/api/business/LogisticsManage/Deliverys/delivery.js +++ b/src/api/business/LogisticsManage/Deliverys/delivery.js @@ -18,6 +18,17 @@ export function deliveryList(query) { }) } + +// 获取配送模板的配送区域和运费列表 +export function getDeliveryRuleList(query) { + return request({ + url: '/business/Delivery/getDeliveryRuleList', + method: 'get', + params: query + }) +} + + // 配送模板新增或修改 export function addOrUpdateDelivery(data) { return request({ diff --git a/src/assets/styles/login.scss b/src/assets/styles/login.scss index c323eb3..daad040 100644 --- a/src/assets/styles/login.scss +++ b/src/assets/styles/login.scss @@ -16,6 +16,7 @@ width: 835px; height: 776px; z-index: 99; + animation: ani 1.5s; } .login-img-box img{ @@ -23,6 +24,15 @@ height: 100%; } +@keyframes ani { + 0%{ + opacity: 0; + } + 100%{ + opacity: 1; + } +} + @media (max-width:1200px) { .login-img-box{ display: none; diff --git a/src/components/TreeTransfer/index.vue b/src/components/TreeTransfer/index.vue new file mode 100644 index 0000000..e3e8c1d --- /dev/null +++ b/src/components/TreeTransfer/index.vue @@ -0,0 +1,226 @@ + + + + + \ No newline at end of file diff --git a/src/utils/deepCopy.js b/src/utils/deepCopy.js new file mode 100644 index 0000000..5113ba0 --- /dev/null +++ b/src/utils/deepCopy.js @@ -0,0 +1,32 @@ +/** + * 实现深克隆---对象/数组 + * @param { Array / Object } target 需要复制的数组或对象 + */ +export const deepCopy = (target) => { + // 判断拷贝的数据类型 + let result + let targetType = _checkedType(target) + if (targetType === 'Object') { + result = {} + } else if (targetType === 'Array') { + result = [] + } else { + return target + } + // 遍历目标数据 + for (let i in target) { + let value = target[i] + // 判断目标结构里的每一值是否存在对象/数组 + if (_checkedType(value) === 'Object' || _checkedType(value) === 'Array') { + result[i] = deepCopy(value) + } else { + result[i] = value + } + } + return result +} + +// 定义检测数据类型的功能函数 +const _checkedType = (target) => { + return Object.prototype.toString.call(target).slice(8, -1) +} diff --git a/src/views/business/LogisticsManage/Deliverys/components/AddDialog.vue b/src/views/business/LogisticsManage/Deliverys/components/AddDialog.vue index 1f5c42c..cd40a36 100644 --- a/src/views/business/LogisticsManage/Deliverys/components/AddDialog.vue +++ b/src/views/business/LogisticsManage/Deliverys/components/AddDialog.vue @@ -7,12 +7,12 @@ * @LastEditTime: (2023-06-16) -->