Commit 2e175768 by huangqy

页面渲染的bug解决

parent 3ba11392
......@@ -61,11 +61,6 @@ export struct WzInPage {
this.getWzcrkList()
}
ininData() {
this.checkedList = []
this.getWzcrkList()
}
async getWzcrkList(qzh?: number, wczt?: string) {
Logger.info('出入库传入参数>>:', JSON.stringify(this.searchData))
this.dataSource = []
......@@ -75,10 +70,7 @@ export struct WzInPage {
res.forEach(element => {
this.dataSource.push(new WzinClass(element))
});
// for (let index = 0; index < res.length; index++) {
// const element = res[index];
// this.dataSource.push(new WzinClass(element))
// }
Logger.info('数量是' + JSON.stringify(this.dataSource))
}
@Builder container() {
......@@ -111,6 +103,7 @@ export struct WzInPage {
cancel: this.onCancel,
confirm: this.onSubmit,
checkedList: $checkedList,
dataSource: $dataSource,
container: this.container
}),
autoCancel: true,
......@@ -127,13 +120,13 @@ export struct WzInPage {
this.checkedList.forEach(async (element) => {
let num = await wzcrkModel.updateWzcrkWczt(element, this.radioChecked ? '已完成' : '未完成')
if (num) {// 如果更新成功就减少
this.dataSource = this.dataSource.filter(i => i.guid != element)
Logger.info("删除的数据是:" + JSON.stringify(this.dataSource))
this.dataSource.splice(this.dataSource.findIndex(i => i.guid == element), 1)
}
})
} catch (e) {
} finally {
this.checkedList = []
}
}
......
import { UniListItem } from '@ohos/system/src/main/ets/model/UniInitList';
import { WzinClass } from '../../pages/metailmange/WzInPage/Wzin.data';
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderColor('#0fa983')
......@@ -31,7 +32,7 @@ interface FormData {
@CustomDialog
@Component
export struct SetStatusDialog {
@Link dataSource: WzinClass[]
@Link checkedList: Array<string>
controller: CustomDialogController
cancel: () => void
......@@ -39,6 +40,7 @@ export struct SetStatusDialog {
@BuilderParam container: () => void
build() {
Column() {
Flex({ alignItems: ItemAlign.Start }) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论