Commit e1bbdb73 by linjinhong

修改物流列表获取形式

parent 3742f158
......@@ -3,7 +3,7 @@
## CustomizeForm 属性 (Props)
| 参数 | 说明 | 类型 | 默认值 | 必填 |
| :-----------: | :--------------------------------------------: | :---------------------------: | :-------: | :--: |
| :-----------: | :------------------------------------------: | :---------------------------: | :-------: | :--: |
| config | 表单配置项 | IFormConfig[] | [] | ✓ |
| modelValue | 表单数据对象 | Record<string, unknown> | {} | ✕ |
| labelWidth | 表单标签宽度 | string \|number | 100 | ✕ |
......@@ -11,7 +11,7 @@
| size | 组件尺寸 | 'large'\| 'default'\| 'small' | 'default' | ✕ |
| inline | 是否行内布局 | boolean | false | ✕ |
| labelPosition | 标签位置 | 'left'\| 'right'\| 'top' | 'right' | ✕ |
| ... | 其余属性与 element-plus 文档中 form Props 相同 | ... | ... | ... |
| ... | 其余属性与 element-plus 文档中 Form API 相同 | ... | ... | ... |
- **CustomizeForm 说明**:
- CustomizeForm 属性 (Props) 可自行添加,添加属性与 element-plus 文档中 form Props 相同
......@@ -34,6 +34,7 @@
| isIncludeProp | 是否包含在 prop 属性中, 需搭配 refashConfig()方法使用 | boolean | - |
| fixed | 固定位置 | string | - |
- attrs 中 element-plus 文档中 FormItem API 相同
- 可参考文件 src\views\logistics\declarationRule.vue
---
......@@ -52,10 +53,12 @@
- form 表格如需动态渲染则需要传入计算属性 config
```tsx **config 示例**
const editForm = ref({})
const config = [
//含有title属性的对象独占一行,目前最好只做标题使用,也可以用render自定义内容但是可能有bug待优化
{
title: '个人信息',
render: () => VNode,
},
{
prop: 'name',
......
......@@ -31,6 +31,8 @@
| attrs | 控件属性配置 | Record<string, unknown> | - |
| render | 自定义渲染函数 | () => VNode | - |
- attrs 中 element-plus 文档中 FormItem API 相同
---
### 控件类型 (EComponenetType)
......
......@@ -13,7 +13,7 @@
- **Table 表格说明**:
- table 表格如需动态渲染则需要传入计算属性 config
- Table 属性 (Props) 可自行添加
- Table 属性 (Props) 可自行添加,添加属性与 vxetable 文档中 api Props 相同
- 可参考文件 src\views\logistics\logisticsMethod.vue
```tsx **config 示例**
......@@ -100,4 +100,4 @@ interface RenderFunctions {
| getSelectEvent | 获取选中行数据 | 无 |
| selectRowEvent | 设置高亮行 | row: any |
> **可用方法说明**: 可自行添加
- **说明**: 可新增方法自行添加
......@@ -494,6 +494,7 @@ onMounted(() => {
* @description: 更改状态
*/
async function changeStatus(data: LogisticsMethod) {
loading.value = true
try {
const params = {
id: data.id,
......@@ -696,7 +697,7 @@ function deleteCol(index: number) {
*/
async function getAllList() {
try {
const res = await Promise.all([
const res = await Promise.allSettled([
getWarehouseList(),
getRuleList(),
getPlatformList(),
......@@ -705,13 +706,13 @@ async function getAllList() {
res.forEach((item, index) => {
if (item.code === 200) {
if (index == 0) {
warehouseList.value = item.data
warehouseList.value = item.data || []
} else if (index == 1) {
ruleNameList.value = item.data || []
} else if (index == 2) {
platformList.value = item.data
platformList.value = item.data || []
} else if (index == 3) {
logisticsCompanyList.value = item.data
logisticsCompanyList.value = item.data || []
}
}
})
......
......@@ -347,7 +347,7 @@ function setCellStyle() {
*/
async function getAllList() {
try {
const res = await Promise.all([getlogisticsWayAllList(), getList()])
const res = await Promise.allSettled([getlogisticsWayAllList(), getList()])
searchConfig.value[0].attrs!.options = [...(res[0]?.data || [])]
} catch (error) {
console.log(error)
......
......@@ -627,7 +627,7 @@ function handleCheckboxRecords(value: never[]) {
const logisticsWayList = ref([])
async function getAllList() {
try {
const res = await Promise.all([getlogisticsWayAllList(), getList()])
const res = await Promise.allSettled([getlogisticsWayAllList(), getList()])
console.log(545, res)
logisticsWayList.value = res[0]?.data || []
} catch (error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment