|
...
|
...
|
@@ -34,6 +34,10 @@ interface comprehensiveType { |
|
|
|
}
|
|
|
|
let params = router.getParams() as routerParams
|
|
|
|
let reportId: number | undefined = params?.reportId
|
|
|
|
let personId = preferencesUtil.get('XF_PERSON_ID', 0)
|
|
|
|
let companyId: number = preferencesUtil.get('XF_COMPANY_ID', 0) as number
|
|
|
|
let roleName = preferencesUtil.get('XF_ROLE_NAME', '')
|
|
|
|
|
|
|
|
|
|
|
|
// 查看原始记录编号是否存在
|
|
|
|
let queryReportNo = async (reportNo: string) => {
|
|
...
|
...
|
@@ -59,7 +63,10 @@ function searchByIndexOf(keyWord: string, list: equipmentType[]){ |
|
|
|
|
|
|
|
// 提取的富文本内容分别赋值
|
|
|
|
function multiply(range: string, facility: string, existingProblem: string,cumulativeIssues:string, correctedProblems: string, ...other: string[]){
|
|
|
|
let otherValue: string = other.length > 1 ? other?.slice(1).join('、') : other[0].slice(3)
|
|
|
|
let otherValue: string = ''
|
|
|
|
if(Array.isArray(other)) {
|
|
|
|
otherValue = other.length > 1 ? other?.slice(1).join('、') : other[0].slice(3)
|
|
|
|
}
|
|
|
|
let newObj:comprehensiveType = {
|
|
|
|
range: range.split(':')[1],
|
|
|
|
facility: facility.split(':')[1],
|
|
...
|
...
|
@@ -68,20 +75,42 @@ function multiply(range: string, facility: string, existingProblem: string,cumul |
|
|
|
correctedProblems: correctedProblems.split(':')[1],
|
|
|
|
other: otherValue
|
|
|
|
}
|
|
|
|
return newObj
|
|
|
|
return newObj
|
|
|
|
}
|
|
|
|
|
|
|
|
// 提取富文本中的内容解析后导出
|
|
|
|
function extractRichText(str: string): comprehensiveType{
|
|
|
|
let richText = str.replace(/<.*?>/g, '?')
|
|
|
|
let arrValue: string[] = richText.split('?').filter(item => item !== '')
|
|
|
|
let otherArr: string[] = []
|
|
|
|
if(arrValue.length > 5){
|
|
|
|
for (let index = 5; index < arrValue.length; index++) {
|
|
|
|
otherArr.push(arrValue[index])
|
|
|
|
function extractRichText(str: string | null): comprehensiveType{
|
|
|
|
if(str === null) {
|
|
|
|
return {
|
|
|
|
range: '',
|
|
|
|
facility: '',
|
|
|
|
existingProblem: '',
|
|
|
|
cumulativeIssues: '',
|
|
|
|
correctedProblems: '',
|
|
|
|
other: '',
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
let richText = str.replace(/<.*?>/g, '?')
|
|
|
|
let arrValue: string[] = richText.split('?').filter(item => item !== '')
|
|
|
|
let otherArr: string[] = []
|
|
|
|
if(arrValue.length > 5){
|
|
|
|
for (let index = 5; index < arrValue.length; index++) {
|
|
|
|
otherArr.push(arrValue[index])
|
|
|
|
}
|
|
|
|
return multiply(arrValue[0], arrValue[1], arrValue[2], arrValue[3], arrValue[4], ...otherArr)
|
|
|
|
} else if(arrValue.length === 5) {
|
|
|
|
return multiply(arrValue[0], arrValue[1], arrValue[2], arrValue[3], arrValue[4], '其他:')
|
|
|
|
} else {
|
|
|
|
return {
|
|
|
|
range: '',
|
|
|
|
facility: '',
|
|
|
|
existingProblem: '',
|
|
|
|
cumulativeIssues: '',
|
|
|
|
correctedProblems: '',
|
|
|
|
other: str.replace(/<.*?>/g, ''),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return multiply(arrValue[0], arrValue[1], arrValue[2], arrValue[3], arrValue[4], ...otherArr)
|
|
|
|
}
|
|
|
|
|
|
|
|
// 提交修改时合并富文本内容
|
|
...
|
...
|
@@ -101,6 +130,11 @@ function mergeRichText(comprehensive: comprehensiveType): string{ |
|
|
|
.border({width: 1, color: '#eee'}).backgroundColor(Color.Transparent)
|
|
|
|
.placeholderColor('#999').borderRadius(4).placeholderFont({size: 14})
|
|
|
|
}
|
|
|
|
@Extend(TextArea) function TextAreaReview () {
|
|
|
|
.width('100%').fontSize(14).fontColor('#999').lineHeight(20)
|
|
|
|
.border({width: 1, color: '#eee'}).backgroundColor(Color.Transparent)
|
|
|
|
.placeholderColor('#999').borderRadius(4).placeholderFont({size: 14})
|
|
|
|
}
|
|
|
|
|
|
|
|
@Entry
|
|
|
|
@Component
|
|
...
|
...
|
@@ -108,8 +142,6 @@ struct AddRecords { |
|
|
|
@Builder indicatorBuilder(icon: ResourceStr) {
|
|
|
|
Image(icon)
|
|
|
|
}
|
|
|
|
personId = preferencesUtil.get('XF_PERSON_ID', 0)
|
|
|
|
flag: boolean = true
|
|
|
|
// 添加维保记录类型参数
|
|
|
|
@State addForm: addParamsType = {
|
|
|
|
reportName: '',
|
|
...
|
...
|
@@ -161,59 +193,6 @@ struct AddRecords { |
|
|
|
@State initEquipmentList: equipmentType[] = []
|
|
|
|
@State errorMsg: string = ''
|
|
|
|
@State text: string = "请选择维保记录类型"
|
|
|
|
async aboutToAppear() {
|
|
|
|
// reportId等于undefined为编辑状态
|
|
|
|
this.isEdit = reportId !== undefined
|
|
|
|
this.addForm.city = this.pickerValue[1]
|
|
|
|
this.addForm.county = this.pickerValue[2]
|
|
|
|
if(reportId){
|
|
|
|
this.addForm.reportId = reportId
|
|
|
|
const res: AxiosResponse<reportDetailTest> = await getReportDetail(reportId)
|
|
|
|
let result: reportDetailData = res.data.data
|
|
|
|
this.addForm.reportName = result.reportName
|
|
|
|
this.addForm.applyCompanyName = result.applyCompanyName
|
|
|
|
this.addForm.reportNo = result.reportNo
|
|
|
|
this.addForm.reportType = result.reportType
|
|
|
|
this.addForm.maintenanceTime = result.maintenanceTime
|
|
|
|
this.addForm.maintenanceEndTime = result.maintenanceEndTime
|
|
|
|
this.addForm.equipmentList = result.equipment.split(',')
|
|
|
|
this.addForm.fireFacilities = result.fireFacilities
|
|
|
|
this.addForm.maintenancePeople = result.maintenancePeople
|
|
|
|
this.addForm.result = result.result.replace(/<.*?>/g, '')
|
|
|
|
this.addForm.state = result.state
|
|
|
|
this.addForm.technicalDirectorId = result.technicalDirectorId
|
|
|
|
this.addForm.maintenancePeopleList = result.technicalDirectorId?.split(',')
|
|
|
|
this.addForm.city = result.city
|
|
|
|
this.addForm.county = result.county
|
|
|
|
this.addForm.approvePersonId = result.approvePersonId as number
|
|
|
|
this.addForm.projectList = result.projectList.map(item => {
|
|
|
|
return { projectId: item.projectId } as projectType
|
|
|
|
})
|
|
|
|
this.fireFacilitiesList = this.addForm.fireFacilities.split('、')
|
|
|
|
this.viewEquipmentList = result.equipment.split(',')
|
|
|
|
this.PeopleList = result.technicalDirectorId?.split(',') || []
|
|
|
|
this.pickerValue = ['广西壮族自治区', result.city as string, result.county as string]
|
|
|
|
this.comprehensiveReview = extractRichText(result.result)
|
|
|
|
}
|
|
|
|
// 获取项目的类型列表
|
|
|
|
getMaintenanceType().then((res: AxiosResponse<quarterTest>) => {
|
|
|
|
this.recordsType = res.data.data
|
|
|
|
})
|
|
|
|
// 获取消防设施
|
|
|
|
getLatestProjectList(this.addForm.reportType as string).then((res: AxiosResponse<LatestProjectTest>) => {
|
|
|
|
this.latestProjectList = res.data.data
|
|
|
|
})
|
|
|
|
const companyId: number = preferencesUtil.get('XF_COMPANY_ID', 0) as number
|
|
|
|
this.addForm.companyId = companyId
|
|
|
|
// 获取仪器设备
|
|
|
|
getEquipmentList({pageNum: 1, pageSize: 500, companyId: companyId }).then((res: AxiosResponse<equipmentTest>) => {
|
|
|
|
this.equipmentList = res.data.rows
|
|
|
|
this.initEquipmentList = res.data.rows
|
|
|
|
})
|
|
|
|
getCompanyPersonList({pageNum: 1, pageSize: 200, companyId: companyId, state: '2' }).then((res: AxiosResponse<companyPersonTest>) => {
|
|
|
|
this.companyPersonList = res.data.rows
|
|
|
|
})
|
|
|
|
}
|
|
|
|
// 搜索框实例
|
|
|
|
searchController: SearchController = new SearchController()
|
|
|
|
|
|
...
|
...
|
@@ -241,60 +220,114 @@ struct AddRecords { |
|
|
|
autoCancel: false
|
|
|
|
})
|
|
|
|
|
|
|
|
// 初始化数据
|
|
|
|
initData = () => {
|
|
|
|
// 获取项目的类型列表
|
|
|
|
getMaintenanceType().then((res: AxiosResponse<quarterTest>) => {
|
|
|
|
this.recordsType = res.data.data
|
|
|
|
})
|
|
|
|
// 获取消防设施
|
|
|
|
getLatestProjectList(this.addForm.reportType as string).then((res: AxiosResponse<LatestProjectTest>) => {
|
|
|
|
this.latestProjectList = res.data.data
|
|
|
|
})
|
|
|
|
this.addForm.companyId = companyId
|
|
|
|
// 获取仪器设备
|
|
|
|
getEquipmentList({pageNum: 1, pageSize: 500, companyId: companyId }).then((res: AxiosResponse<equipmentTest>) => {
|
|
|
|
this.equipmentList = res.data.rows
|
|
|
|
this.initEquipmentList = res.data.rows
|
|
|
|
})
|
|
|
|
getCompanyPersonList({pageNum: 1, pageSize: 200, companyId: companyId, state: '2' }).then((res: AxiosResponse<companyPersonTest>) => {
|
|
|
|
this.companyPersonList = res.data.rows
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 获取维保记录类型
|
|
|
|
getReportType = async (dictValue: string) => {
|
|
|
|
this.loadingController.open()
|
|
|
|
this.addForm.reportType = dictValue
|
|
|
|
if(this.flag) {
|
|
|
|
this.addForm.projectList = []
|
|
|
|
this.fireFacilitiesList = []
|
|
|
|
this.addForm.fireFacilities = ''
|
|
|
|
this.flag = false
|
|
|
|
let result: AxiosResponse<LatestProjectTest> = await getLatestProjectList(dictValue)
|
|
|
|
this.latestProjectList = result.data.data
|
|
|
|
this.flag = true
|
|
|
|
}
|
|
|
|
this.addForm.projectList = []
|
|
|
|
this.fireFacilitiesList = []
|
|
|
|
this.addForm.fireFacilities = ''
|
|
|
|
let result: AxiosResponse<LatestProjectTest> = await getLatestProjectList(dictValue)
|
|
|
|
this.latestProjectList = result.data.data
|
|
|
|
this.loadingController.close()
|
|
|
|
}
|
|
|
|
// 添加记录方法
|
|
|
|
addReport = async () => {
|
|
|
|
this.loadingController.open()
|
|
|
|
this.addForm.maintenanceDate = [this.addForm.maintenanceTime as string, this.addForm.maintenanceEndTime as string]
|
|
|
|
await addRecords(this.addForm)
|
|
|
|
this.loadingController.close()
|
|
|
|
promptAction.showToast({ message: '添加成功' })
|
|
|
|
router.back()
|
|
|
|
}
|
|
|
|
|
|
|
|
// 更新记录方法
|
|
|
|
uploadReport = async () => {
|
|
|
|
this.loadingController.open()
|
|
|
|
await updateRecords(this.addForm)
|
|
|
|
this.loadingController.close()
|
|
|
|
promptAction.showToast({ message: '更新成功' })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 提交表单
|
|
|
|
submitForm = async () => {
|
|
|
|
if(this.addForm.reportName == '') {
|
|
|
|
return promptAction.showToast({message: '项目名称为必填项'})
|
|
|
|
} else if(this.addForm.reportNo == '') {
|
|
|
|
return promptAction.showToast({message: '项目编号为必填项'})
|
|
|
|
} else if(this.addForm.applyCompanyName == ''){
|
|
|
|
return promptAction.showToast({message: '消防设施管理单位为必填项'})
|
|
|
|
} else if(this.addForm.maintenanceTime == '请选择起始日期' || this.addForm.maintenanceEndTime == '请选择结束日期'){
|
|
|
|
return promptAction.showToast({message: '维保日期为必填项'})
|
|
|
|
} else if(this.addForm.fireFacilities == ''){
|
|
|
|
return promptAction.showToast({message: '至少选择一下消防设施'})
|
|
|
|
} else if(this.addForm.maintenancePeople == ''){
|
|
|
|
return promptAction.showToast({message: '请选择维保人员'})
|
|
|
|
this.addForm.result = mergeRichText(this.comprehensiveReview)
|
|
|
|
if(this.addForm.reportName === '' || this.addForm.reportNo === '' || this.addForm.applyCompanyName === '' || this.addForm.maintenanceTime === '请选择起始日期' || this.addForm.maintenanceEndTime === '请选择结束日期' || this.addForm.fireFacilities === '' || this.addForm.maintenancePeople === '') {
|
|
|
|
return promptAction.showToast({message: '* 号为必填项'})
|
|
|
|
}
|
|
|
|
if(this.comprehensiveReview.range === '' || this.comprehensiveReview.existingProblem === '' || this.comprehensiveReview.cumulativeIssues === '' || this.comprehensiveReview.correctedProblems === ''){
|
|
|
|
return promptAction.showToast({message: '综合评述带 * 号必填'})
|
|
|
|
}
|
|
|
|
if(this.errorMsg !== '') {
|
|
|
|
return promptAction.showToast({message: '校验失败'})
|
|
|
|
return promptAction.showToast({message: '校验失败,编号已被使用'})
|
|
|
|
}
|
|
|
|
if(!this.addForm.maintenancePeopleList?.includes(this.personId.toString())){
|
|
|
|
if(roleName === 'person' && !this.addForm.maintenancePeopleList?.includes(personId.toString())){
|
|
|
|
return promptAction.showToast({message: '本人必须在维护人员中'})
|
|
|
|
}
|
|
|
|
this.addForm.result = mergeRichText(this.comprehensiveReview)
|
|
|
|
if(this.isEdit){
|
|
|
|
this.loadingController.open()
|
|
|
|
await updateRecords(this.addForm)
|
|
|
|
this.loadingController.close()
|
|
|
|
promptAction.showToast({
|
|
|
|
message: '更新成功'
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
this.loadingController.open()
|
|
|
|
this.addForm.maintenanceDate = [this.addForm.maintenanceTime as string, this.addForm.maintenanceEndTime as string]
|
|
|
|
await addRecords(this.addForm)
|
|
|
|
this.loadingController.close()
|
|
|
|
promptAction.showToast({
|
|
|
|
message: '添加成功'
|
|
|
|
this.isEdit ? await this.uploadReport() : await this.addReport()
|
|
|
|
}
|
|
|
|
|
|
|
|
// 页面加载时调用
|
|
|
|
async aboutToAppear() {
|
|
|
|
this.initData()
|
|
|
|
// reportId不等于undefined为编辑状态
|
|
|
|
this.isEdit = reportId !== undefined
|
|
|
|
this.addForm.city = this.pickerValue[1]
|
|
|
|
this.addForm.county = this.pickerValue[2]
|
|
|
|
if(reportId){
|
|
|
|
this.addForm.reportId = reportId
|
|
|
|
const res: AxiosResponse<reportDetailTest> = await getReportDetail(reportId)
|
|
|
|
let result: reportDetailData = res.data.data
|
|
|
|
this.addForm.reportName = result.reportName
|
|
|
|
this.addForm.applyCompanyName = result.applyCompanyName
|
|
|
|
this.addForm.reportNo = result.reportNo
|
|
|
|
this.addForm.reportType = result.reportType
|
|
|
|
this.addForm.maintenanceTime = result.maintenanceTime
|
|
|
|
this.addForm.maintenanceEndTime = result.maintenanceEndTime
|
|
|
|
this.addForm.equipmentList = result.equipment?.split(',')
|
|
|
|
this.addForm.fireFacilities = result.fireFacilities
|
|
|
|
this.addForm.maintenancePeople = result.maintenancePeople
|
|
|
|
this.addForm.result = result.result?.replace(/<.*?>/g, '')
|
|
|
|
this.fireFacilitiesList = result.fireFacilities?.split('、') || []
|
|
|
|
this.addForm.state = result.state
|
|
|
|
this.addForm.technicalDirectorId = result.technicalDirectorId || ''
|
|
|
|
this.addForm.maintenancePeopleList = result.technicalDirectorId?.split(',') || []
|
|
|
|
this.addForm.city = result.city || '南宁市'
|
|
|
|
this.addForm.county = result.county || '青秀区'
|
|
|
|
this.addForm.approvePersonId = result.approvePersonId as number
|
|
|
|
this.addForm.projectList = result.projectList.map(item => {
|
|
|
|
return { projectId: item.projectId } as projectType
|
|
|
|
})
|
|
|
|
router.back()
|
|
|
|
this.viewEquipmentList = result.equipment?.split(',') || []
|
|
|
|
this.PeopleList = result.technicalDirectorId?.split(',') || []
|
|
|
|
this.pickerValue = ['广西壮族自治区', result.city as string || '南宁市', result.county as string || '青秀区']
|
|
|
|
this.comprehensiveReview = extractRichText(result.result)
|
|
|
|
// 获取消防设施
|
|
|
|
let LatestRes: AxiosResponse<LatestProjectTest> = await getLatestProjectList(this.addForm.reportType as string)
|
|
|
|
this.latestProjectList = LatestRes.data.data
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
Column(){
|
|
|
|
NavHeader({title: '添加原始记录'})
|
|
...
|
...
|
@@ -345,7 +378,7 @@ struct AddRecords { |
|
|
|
Image($r('app.media.require')).width(20)
|
|
|
|
Text('维保起始日期')
|
|
|
|
}.width(120)
|
|
|
|
Text(this.addForm.maintenanceTime).padding({top: 8, bottom: 8, left: 16, right: 16})
|
|
|
|
Text(this.addForm.maintenanceTime || '请选择日期').padding({top: 8, bottom: 8, left: 16, right: 16})
|
|
|
|
.backgroundColor('#fff').layoutWeight(1).fontColor('#000').onClick(() => {
|
|
|
|
CalendarPickerDialog.show({
|
|
|
|
onAccept: (value) => {
|
|
...
|
...
|
@@ -359,7 +392,7 @@ struct AddRecords { |
|
|
|
Image($r('app.media.require')).width(20)
|
|
|
|
Text('维保结束日期')
|
|
|
|
}.width(120)
|
|
|
|
Text(this.addForm.maintenanceEndTime).padding({top: 8, bottom: 8, left: 16, right: 16})
|
|
|
|
Text(this.addForm.maintenanceEndTime || '请选择日期').padding({top: 8, bottom: 8, left: 16, right: 16})
|
|
|
|
.backgroundColor('#fff').layoutWeight(1).fontColor('#000').onClick(() => {
|
|
|
|
CalendarPickerDialog.show({
|
|
|
|
onAccept: (value) => {
|
|
...
|
...
|
@@ -368,6 +401,17 @@ struct AddRecords { |
|
|
|
})
|
|
|
|
})
|
|
|
|
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
|
|
|
|
Row(){
|
|
|
|
Row(){
|
|
|
|
Image($r('app.media.require')).width(20)
|
|
|
|
Text('项目区域')
|
|
|
|
}.width(90)
|
|
|
|
Text(this.pickerValue.join(' ')).layoutWeight(1).padding({top: 8, bottom: 8, left: 16, right: 16})
|
|
|
|
.backgroundColor('#fff').textOverflow({overflow: TextOverflow.Ellipsis}).maxLines(2)
|
|
|
|
.onClick(() => {
|
|
|
|
this.areaController?.open()
|
|
|
|
})
|
|
|
|
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
|
|
|
|
Column({space: 10}){
|
|
|
|
Row(){
|
|
|
|
Image($r('app.media.require')).width(20)
|
|
...
|
...
|
@@ -422,7 +466,10 @@ struct AddRecords { |
|
|
|
.shape(CheckBoxShape.ROUNDED_SQUARE)
|
|
|
|
.onChange((value: boolean) => {
|
|
|
|
if(value){
|
|
|
|
this.addForm.maintenancePeopleList?.push(children.personId.toString())
|
|
|
|
// 如果选择的人员列表中不存在此人员列表中,则添加
|
|
|
|
if(!this.addForm.maintenancePeopleList?.includes(children.personId.toString())){
|
|
|
|
this.addForm.maintenancePeopleList?.push(children.personId.toString())
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
this.addForm.maintenancePeopleList = this.addForm.maintenancePeopleList?.filter((item: string) => item !== children.personId.toString())
|
|
|
|
}
|
|
...
|
...
|
@@ -450,17 +497,6 @@ struct AddRecords { |
|
|
|
TextInput({placeholder: '请输入消防设施管理单位', text: $$this.addForm.applyCompanyName})
|
|
|
|
.backgroundColor('#fff')
|
|
|
|
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10})
|
|
|
|
Row(){
|
|
|
|
Row(){
|
|
|
|
Image($r('app.media.require')).width(20)
|
|
|
|
Text('项目区域')
|
|
|
|
}.width(90)
|
|
|
|
Text(this.pickerValue.join(' ')).layoutWeight(1).padding({top: 8, bottom: 8, left: 16, right: 16})
|
|
|
|
.backgroundColor('#fff').textOverflow({overflow: TextOverflow.Ellipsis}).maxLines(2)
|
|
|
|
.onClick(() => {
|
|
|
|
this.areaController?.open()
|
|
|
|
})
|
|
|
|
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
|
|
|
|
Column(){
|
|
|
|
Row(){
|
|
|
|
Image($r('app.media.require')).width(20)
|
|
...
|
...
|
@@ -511,10 +547,11 @@ struct AddRecords { |
|
|
|
Row(){
|
|
|
|
Checkbox({ name: children.projectName, group: 'checkboxGroup' })
|
|
|
|
.selectedColor('#1890ff')
|
|
|
|
.select(this.fireFacilitiesList.includes(children.projectName))
|
|
|
|
.select(this.fireFacilitiesList?.includes(children.projectName))
|
|
|
|
.shape(CheckBoxShape.ROUNDED_SQUARE)
|
|
|
|
.onChange((value) => {
|
|
|
|
if(value){
|
|
|
|
if(this.addForm.projectList?.some((item) => item.projectId === children.projectId)) return
|
|
|
|
this.addForm.projectList?.push({ projectId: children.projectId })
|
|
|
|
} else {
|
|
|
|
this.addForm.projectList = this.addForm.projectList?.filter((item) => item.projectId !== children.projectId)
|
|
...
|
...
|
@@ -582,7 +619,7 @@ struct AddRecords { |
|
|
|
Row(){
|
|
|
|
Checkbox({ name: children.equipmentName, group: 'checkboxGroup2' })
|
|
|
|
.selectedColor('#1890ff')
|
|
|
|
.select(this.viewEquipmentList.includes(children.equipmentName))
|
|
|
|
.select(this.viewEquipmentList?.includes(children.equipmentName))
|
|
|
|
.shape(CheckBoxShape.ROUNDED_SQUARE)
|
|
|
|
.mark({
|
|
|
|
strokeColor:Color.White,
|
|
...
|
...
|
@@ -606,29 +643,44 @@ struct AddRecords { |
|
|
|
}.padding({left: 10})
|
|
|
|
Column({space: 10}){
|
|
|
|
Column({space: 10}){
|
|
|
|
Text('本月维保范围').TitleReview()
|
|
|
|
Row({space: 5}){
|
|
|
|
Image($r('app.media.require')).width(20)
|
|
|
|
Text('本月维保范围').TitleReview()
|
|
|
|
}.width('100%')
|
|
|
|
TextInput({placeholder: '请输入本月维保范围(填写楼层)', text: $$this.comprehensiveReview.range}).TextInputReview()
|
|
|
|
}.width('100%').alignItems(HorizontalAlign.Start)
|
|
|
|
Column({space: 10}){
|
|
|
|
Text('消防设施包含').TitleReview()
|
|
|
|
Text(this.comprehensiveReview.facility || '勾选主要消防设施').width('100%').height(40).fontSize(14).padding({top: 8, bottom: 8, left: 16, right: 16})
|
|
|
|
Row({space: 5}){
|
|
|
|
Image($r('app.media.require')).width(20)
|
|
|
|
Text('消防设施包含').TitleReview()
|
|
|
|
}.width('100%')
|
|
|
|
Text(this.comprehensiveReview.facility || '勾选主要消防设施').width('100%').height('auto').fontSize(14).padding({top: 8, bottom: 8, left: 16, right: 16})
|
|
|
|
.border({width: 1, color: '#eee'}).borderRadius(4).fontColor('#999').textAlign(TextAlign.Start)
|
|
|
|
}.width('100%').alignItems(HorizontalAlign.Start)
|
|
|
|
Column({space: 10}){
|
|
|
|
Text('存在问题').TitleReview()
|
|
|
|
TextInput({placeholder: '请输入存在问题', text: this.comprehensiveReview.existingProblem}).TextInputReview()
|
|
|
|
Row({space: 5}){
|
|
|
|
Image($r('app.media.require')).width(20)
|
|
|
|
Text('存在问题').TitleReview()
|
|
|
|
}.width('100%')
|
|
|
|
TextArea({ placeholder: '请输入存在问题', text: $$this.comprehensiveReview.existingProblem }).TextAreaReview()
|
|
|
|
}.width('100%').alignItems(HorizontalAlign.Start)
|
|
|
|
Column({space: 10}){
|
|
|
|
Text('累计问题').TitleReview()
|
|
|
|
TextInput({placeholder: '请输入累计问题', text: $$this.comprehensiveReview.cumulativeIssues}).TextInputReview()
|
|
|
|
Row({space: 5}){
|
|
|
|
Image($r('app.media.require')).width(20)
|
|
|
|
Text('累计问题').TitleReview()
|
|
|
|
}.width('100%')
|
|
|
|
TextArea({ placeholder: '请输入累计问题', text: $$this.comprehensiveReview.cumulativeIssues }).TextAreaReview()
|
|
|
|
}.width('100%').alignItems(HorizontalAlign.Start)
|
|
|
|
Column({space: 10}){
|
|
|
|
Text('已整改问题').TitleReview()
|
|
|
|
TextInput({placeholder: '请输入已整改问题', text: $$this.comprehensiveReview.correctedProblems}).TextInputReview()
|
|
|
|
Row({space: 5}){
|
|
|
|
Image($r('app.media.require')).width(20)
|
|
|
|
Text('已整改问题').TitleReview()
|
|
|
|
}.width('100%')
|
|
|
|
TextArea({ placeholder: '请输入已整改问题', text: $$this.comprehensiveReview.correctedProblems }).TextAreaReview()
|
|
|
|
}.width('100%').alignItems(HorizontalAlign.Start)
|
|
|
|
Column({space: 10}){
|
|
|
|
Text('其他').TitleReview()
|
|
|
|
TextInput({placeholder: '其他内容', text: $$this.comprehensiveReview.other}).TextInputReview()
|
|
|
|
TextArea({ placeholder: '请输入其他内容', text: $$this.comprehensiveReview.other }).TextAreaReview()
|
|
|
|
}.width('100%').alignItems(HorizontalAlign.Start)
|
|
|
|
}
|
|
|
|
}.width('100%').alignItems(HorizontalAlign.Start).margin({top: 20}).padding({bottom: 30})
|
|
...
|
...
|
@@ -645,6 +697,7 @@ struct AddRecords { |
|
|
|
}.width('100%').height('100%').backgroundColor('#f2f3f7')
|
|
|
|
}
|
|
|
|
|
|
|
|
// 退出动画
|
|
|
|
pageTransition() {
|
|
|
|
// 该页面退出动画时长为1200ms,尽量与另一页面的进入动画时长匹配
|
|
|
|
PageTransitionExit({ duration: 500 })
|
...
|
...
|
|