Commit 718f72118a5bd562e89496bdcf6339d74c9d1985
Merge branch 'local_devbranch_byft' into 'main_dev'
fix: DEFECT-1768 新增租户后的产品界面置底和查询出来的界面也置底显示,图二为正常显示 See merge request yunteng/thingskit-front!1018
Showing
4 changed files
with
35 additions
and
17 deletions
| @@ -96,6 +96,10 @@ | @@ -96,6 +96,10 @@ | ||
| 96 | top: '48%', | 96 | top: '48%', |
| 97 | z: 10, | 97 | z: 10, |
| 98 | style: { | 98 | style: { |
| 99 | + width: 35, | ||
| 100 | + textAlign: 'left', | ||
| 101 | + overflow: 'truncate', | ||
| 102 | + textVerticalAlign: 'middle', | ||
| 99 | fill: '#1a1a1a', | 103 | fill: '#1a1a1a', |
| 100 | text: value + '个', | 104 | text: value + '个', |
| 101 | font: '0.85rem Microsoft YaHei', | 105 | font: '0.85rem Microsoft YaHei', |
| @@ -312,7 +312,7 @@ export const step1Schemas: FormSchema[] = [ | @@ -312,7 +312,7 @@ export const step1Schemas: FormSchema[] = [ | ||
| 312 | { | 312 | { |
| 313 | field: 'organizationId', | 313 | field: 'organizationId', |
| 314 | label: '所属组织', | 314 | label: '所属组织', |
| 315 | - component: 'Input', | 315 | + component: 'Select', |
| 316 | required: true, | 316 | required: true, |
| 317 | slot: 'addOrg', | 317 | slot: 'addOrg', |
| 318 | }, | 318 | }, |
| @@ -168,17 +168,27 @@ | @@ -168,17 +168,27 @@ | ||
| 168 | const devicePic = ref(''); | 168 | const devicePic = ref(''); |
| 169 | const loading = ref(false); | 169 | const loading = ref(false); |
| 170 | 170 | ||
| 171 | - const [register, { validate, resetFields, setFieldsValue, getFieldsValue, updateSchema }] = | ||
| 172 | - useForm({ | ||
| 173 | - labelWidth: 140, | ||
| 174 | - schemas: step1Schemas, | ||
| 175 | - actionColOptions: { | ||
| 176 | - span: 14, | ||
| 177 | - }, | ||
| 178 | - labelAlign: 'right', | ||
| 179 | - showResetButton: false, | ||
| 180 | - showSubmitButton: false, | ||
| 181 | - }); | 171 | + const [ |
| 172 | + register, | ||
| 173 | + { | ||
| 174 | + validate, | ||
| 175 | + resetFields, | ||
| 176 | + setFieldsValue, | ||
| 177 | + getFieldsValue, | ||
| 178 | + updateSchema, | ||
| 179 | + clearValidate, | ||
| 180 | + validateFields, | ||
| 181 | + }, | ||
| 182 | + ] = useForm({ | ||
| 183 | + labelWidth: 140, | ||
| 184 | + schemas: step1Schemas, | ||
| 185 | + actionColOptions: { | ||
| 186 | + span: 14, | ||
| 187 | + }, | ||
| 188 | + labelAlign: 'right', | ||
| 189 | + showResetButton: false, | ||
| 190 | + showSubmitButton: false, | ||
| 191 | + }); | ||
| 182 | async function nextStep() { | 192 | async function nextStep() { |
| 183 | try { | 193 | try { |
| 184 | let values = await validate(); | 194 | let values = await validate(); |
| @@ -447,11 +457,11 @@ | @@ -447,11 +457,11 @@ | ||
| 447 | }); | 457 | }); |
| 448 | } | 458 | } |
| 449 | 459 | ||
| 450 | - const handleTreeOrg = () => { | ||
| 451 | - // const clearGatewayId = { | ||
| 452 | - // gatewayId: '', | ||
| 453 | - // }; | ||
| 454 | - // setFieldsValue(clearGatewayId); | 460 | + const handleTreeOrg = (option: string) => { |
| 461 | + if (option) clearValidate('organizationId'); | ||
| 462 | + else { | ||
| 463 | + validateFields(['organizationId']); | ||
| 464 | + } | ||
| 455 | }; | 465 | }; |
| 456 | 466 | ||
| 457 | return { | 467 | return { |