作者 xiaoqiu

首次提交

正在显示 54 个修改的文件 包含 4665 行增加0 行删除

要显示太多修改。

为保证性能只显示 54 of 54+ 个文件。

不能预览此文件类型
/node_modules
/oh_modules
/local.properties
/.idea
**/build
/.hvigor
.cxx
/.clangd
/.clang-format
/.clang-tidy
**/.test
/.appanalyzer
\ No newline at end of file
... ...
{
"app": {
"bundleName": "com.example.fireMaintenanceAssistant",
"vendor": "example",
"versionCode": 1000000,
"versionName": "1.0.0",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
}
... ...
{
"string": [
{
"name": "app_name",
"value": "消防维保助手"
}
]
}
... ...
{
"app": {
"products": [
{
"name": "default",
"signingConfig": "default",
"compatibleSdkVersion": "5.0.0(12)",
"runtimeOS": "HarmonyOS",
"buildOption": {
"strictMode": {
"caseSensitiveCheck": true,
"useNormalizedOHMUrl": true
}
}
}
],
"buildModeSet": [
{
"name": "debug"
},
{
"name": "release"
}
],
"signingConfigs": [
{
"name": "default",
"type": "HarmonyOS",
"material": {
"storePassword": "0000001ABFA3098F4A58FE591F6AE225CCEC2D4131BF649B5FC7FE780DD745742DE3ABAB9759886B99E2",
"certpath": "/Users/king/Desktop/harmonyos/keyStoreFile/fireMaintenance/fireMaintenance.cer",
"keyAlias": "fireMaintenance",
"keyPassword": "0000001A018F4E9B269FEF764B4C7E6047DE40E22254B5479AFE815F863B88716EB4C6D67B6CF97C10C4",
"profile": "/Users/king/Desktop/harmonyos/keyStoreFile/fireMaintenance/fireMaintananceRelease.p7b",
"signAlg": "SHA256withECDSA",
"storeFile": "/Users/king/Desktop/harmonyos/keyStoreFile/fireMaintenance/fireMaintenance.p12"
}
}
]
},
"modules": [
{
"name": "entry",
"srcPath": "./entry",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
}
]
}
\ No newline at end of file
... ...
{
"files": [
"**/*.ets"
],
"ignore": [
"**/src/ohosTest/**/*",
"**/src/test/**/*",
"**/src/mock/**/*",
"**/node_modules/**/*",
"**/oh_modules/**/*",
"**/build/**/*",
"**/.preview/**/*"
],
"ruleSet": [
"plugin:@performance/recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
}
}
\ No newline at end of file
... ...
不能预览此文件类型
/node_modules
/oh_modules
/.preview
/build
/.cxx
/.test
\ No newline at end of file
... ...
{
"apiType": "stageMode",
"buildOption": {
},
"buildOptionSet": [
{
"name": "release",
"arkOptions": {
"obfuscation": {
"ruleOptions": {
"enable": false,
"files": [
"./obfuscation-rules.txt"
]
}
}
}
},
],
"targets": [
{
"name": "default"
},
{
"name": "ohosTest",
}
]
}
\ No newline at end of file
... ...
import { hapTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
}
... ...
# Define project specific obfuscation rules here.
# You can include the obfuscation configuration files in the current module's build-profile.json5.
#
# For more details, see
# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
# Obfuscation options:
# -disable-obfuscation: disable all obfuscations
# -enable-property-obfuscation: obfuscate the property names
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
# -compact: remove unnecessary blank spaces and all line feeds
# -remove-log: remove all console.* statements
# -print-namecache: print the name cache that contains the mapping from the old names to new names
# -apply-namecache: reuse the given cache file
# Keep options:
# -keep-property-name: specifies property names that you want to keep
# -keep-global-name: specifies names that you want to keep in the global scope
-enable-property-obfuscation
-enable-toplevel-obfuscation
-enable-filename-obfuscation
-enable-export-obfuscation
\ No newline at end of file
... ...
{
"name": "entry",
"version": "1.0.0",
"description": "Please describe the basic information.",
"main": "",
"author": "",
"license": "",
"dependencies": {}
}
... ...
不能预览此文件类型
不能预览此文件类型
import https from './request'
// 获取上传秘钥参数
export interface cosKeyTest {
msg: string;
code: number;
data: cosKeyData;
}
export interface cosKeyData {
credentials: cosKeyCredentials;
requestId: string;
expiration: string;
startTime: number;
expiredTime: number;
coskey: string;
preSignedUrl: string;
}
export interface cosKeyCredentials {
tmpSecretId: string;
tmpSecretKey: string;
sessionToken: string;
}
// 获取上传秘钥
export const getCosKey = (filename: string) => {
return https<cosKeyTest>({
url: '/system/COS/getTempKey',
method: 'get',
params: {
filename
}
})
}
interface cosParams {
cosKey: string,
relateId: number
}
// 上传视频
export const uploadVideoOrImg = (data: cosParams) => {
return https({
url: '/maintenance/report/uploadVedio',
method: 'post',
headers: {
"Content-Type": 'application/json'
},
data
})
}
\ No newline at end of file
... ...
import https from './request'
export interface noticeTest {
total: number;
rows: noticeRow[];
code: number;
msg: string;
}
export interface noticeDetailTest {
data: noticeRow;
code: number;
msg: string;
}
export interface noticeRow {
createBy?: string;
createTime?: string;
updateBy?: string;
updateTime?: null | string;
remark?: null;
noticeId?: number;
noticeTitle: string;
noticeType: string;
noticeContent: string;
status?: string;
}
export interface noticeParams {
pageNum: number
pageSize: number
noticeTitle?: string
createBy?: string
status?: string
noticeType?: string
}
// 获取公告列表
export const getNoticeList = (data: noticeParams) => {
return https<noticeTest>({
url: '/system/notice/list',
method: 'get',
params: data
})
}
// 获取公告详情
export const getNoticeDetail = (id: number) => {
return https<noticeDetailTest>({
url: `/system/notice/${id}`,
method: 'get',
})
}
\ No newline at end of file
... ...
export interface quarterTest {
msg: string;
code: number;
data: quarterType[];
}
export interface quarterType {
createBy: string;
createTime: string;
updateBy: null;
updateTime: null;
remark: null;
dictCode: number;
dictSort: number;
dictLabel: string;
dictValue: string;
dictType: string;
cssClass: null;
listClass: string;
isDefault: string;
status: string;
default: boolean;
}
... ...
import https from './request'
import { RecordsList, QueryParams, addParamsType, equipmentTest, LatestProjectTest,
companyPersonTest, reportDetailTest, MalfunctionListTest, MalfunctionListRow,
InitTest, realNameTest, orderTest,configTest,
recordTest, orderParams, recordParams, editType
} from './recordsType'
import { quarterTest } from './options/optionsType'
// 获取维保记录列表
export const getRecordsList = (data: QueryParams) => {
return https<RecordsList>({
url: '/maintenance/report/list',
method: 'get',
params: data
})
}
// 新增维保记录
export const addRecords = (data: addParamsType) => {
return https({
url: '/maintenance/report',
method: 'post',
data
})
}
// 修改维保记录
export const updateRecords = (data: addParamsType) => {
return https({
url: '/maintenance/report',
method: 'put',
data
})
}
interface deleteType{
reportId: number,
state: string
}
// 操作维保记录信息
export const deleteRecords = (data: deleteType) => {
return https({
url: '/maintenance/report/updateInfo',
method: 'post',
data
})
}
// 获取仪器设备列表
export const getEquipmentList = (data: QueryParams) => {
return https<equipmentTest>({
url: '/system/equipment/list',
method: 'get',
params: data
})
}
// 获取主要消防措施列表
export const getLatestProjectList = (type: string) => {
return https<LatestProjectTest>({
url: '/maintenance/project/latestProject',
method: 'get',
params: {
type
}
})
}
// 获取记录类型列表
export const getMaintenanceType = () => {
return https<quarterTest>({
url: '/system/dict/data/type/maintenance_system_type',
method: 'get'
})
}
// 获取记录状态列表
export const getMaintenanceState = () => {
return https<quarterTest>({
url: '/system/dict/data/type/report_state',
method: 'get'
})
}
// 获取公司维保人员人员列表
export const getCompanyPersonList = (data: QueryParams) => {
return https<companyPersonTest>({
url: '/system/companyPerson/list',
method: 'get',
params: data
})
}
// 获取维保详情
export const getReportDetail = (reportId: number) => {
return https<reportDetailTest>({
url: `/maintenance/report/view/${reportId}`,
method: 'get'
})
}
export interface downloadUrl {
code: number
data: string
msg: string
}
// 获取图片视频地址链接
export const getDownloadUrl = (cosKey: string, type: number) => {
return https<downloadUrl>({
url: `/system/COS/getDownloadUrl`,
method: 'get',
params: {
cosKey,
type
}
})
}
interface MalfunctionListType{
pageNum: number,
pageSize: number,
reportId: number
}
// 获取消防设施故障处理单
export const getMalfunctionList = (data: MalfunctionListType) => {
return https<MalfunctionListTest>({
url: `/maintenance/malfunction/list`,
method: 'get',
params: data
})
}
// 修改消防设施故障处理单
export const updateMalfunctionList = (data:editType) => {
return https({
url: `/maintenance/malfunction/updateList`,
method: 'post',
data
})
}
// 获取原始记录详情及签名
export const getInitDetail = (reportId: number) => {
return https<InitTest>({
url: `/maintenance/report/view/${reportId}`,
method: 'get'
})
}
// 根据报告编号获取实名信息
export const getSelectByReportNo = (reportNo: string) => {
return https<realNameTest>({
url: `/maintenance/verification/selectByReportNo`,
method: 'get',
params: {
reportNo
}
})
}
// 查询订单记录
export const getOrderList = (data: orderParams) => {
return https<orderTest>({
url: `/system/order/list`,
method: 'get',
params: data
})
}
// 查询消耗记录
export const getRecordList = (data: recordParams) => {
return https<recordTest>({
url: `/system/record/list`,
method: 'get',
params: data
})
}
// 查询支付来源
export const getOrderSource = () => {
return https<quarterTest>({
url: `/system/dict/data/type/pay_source`,
method: 'get'
})
}
// 查询订单状态
export const getOrderState = () => {
return https<quarterTest>({
url: `/system/dict/data/type/orders_state`,
method: 'get'
})
}
// 获取参数详情
export const getConfigDetail = (configId: number) => {
return https<configTest>({
url: `/system/config/${configId}`,
method: 'get'
})
}
// 完成签名
export const successReport = (reportId: number) => {
return https<configTest>({
url: `/maintenance/report/validReport`,
method: 'post',
data: {
reportId
}
})
}
// 退回签名
export const returnSing = (reportId: number) => {
return https<configTest>({
url: `/maintenance/report/backToEdit`,
method: 'post',
data: {
reportId
}
})
}
// 导入月度记录
export const importRecord = (fromReportId: number, toReportId:number) => {
return https({
url: `/maintenance/malfunction/importMalfunction`,
method: 'get',
params: {
fromReportId,
toReportId
}
})
}
\ No newline at end of file
... ...
// 查询支付订单列表
export interface orderParams {
pageNum: number
pageSize: number
orderNo?: string
amount?: number
comboName?: string
companyId: number
companyName?: string
state?: string
source?: string
}
// 查询消费记录订单列表
export interface recordParams {
pageNum: number
pageSize: number
reportName?: string
companyId: number
companyName?: string
createUserId?: number
reportNo?: string
}
// 查询维保列表参数类型
export interface QueryParams {
pageNum: number
pageSize: number
reportName?: string
reportNo?: string
applyCompanyName?: string
companyName?: string
stateQuery?: string
reportType?: string
beginMaintenanceTime?: string
endMaintenanceTime?: string
companyId?: number
technicalDirectorId?: number
state?: string
personId?: number
personName?: string
}
// 原始记录列表类型
export interface RecordsList {
total: number;
rows: Row[];
code: number;
msg: string;
}
// 原始记录类型
export interface Row {
createBy: null;
createTime: null;
updateBy: null;
updateTime: null;
remark: null;
reportId: number;
reportName: string;
reportNo: string;
address: null;
applyCompanyId: null;
applyCompanyName: string;
companyId: number;
companyName: string;
applyPerson: null;
applyDate: null;
buildUse: null;
buildHeight: null;
buildArea: null;
aboveGroundLayers: null;
undeGroundLayers: null;
projectSize: null;
fireFacilities: string;
basis: null;
result: null | string;
requirement: null;
equipment: null | string;
maintenancePeople: null | string;
maintenanceTime: null | string;
technicalDirectorId: string;
technicalDirector: null;
approvePersonId: null;
approvePerson: null;
allowPerson: null;
state: string;
reportType: string;
city: null;
county: null;
projectNature: null;
reportTime: null | string;
contractId: null;
contractName: null;
contractStartTime: null;
contractEndTime: null;
buildType: null;
fireDanger: null;
otherBuildType: null;
regionCode: null;
maintenanceArea: null;
maintenanceEndTime: null | string;
instanceId: null;
processKey: null;
contractImg: null;
proveImg: null;
smallestState: null;
projectArea: null;
maintenancePeopleId: null;
praticeImg: null | string;
reportPeriod: null;
stateQuery: null;
reportFinishTime: null | string;
projectList: null;
signList: null;
firstPartySign: null;
malfunctionList: null;
}
// 添加维保记录参数类型
export interface addParamsType {
aboveGroundLayers?: string | null
address?: string | null
allowPerson?: string | null
applyCompanyId?: number | null
applyCompanyName: string | null
applyDate?: string | null
applyPerson?: string
approvePerson: string
approvePersonId: number
basis?: string | null
buildArea?: number | null
buildHeight?: number | null
buildUse?: string | null
companyId?: number | null
contractId?: number | null
equipment?: string | null
equipmentList?: string[] | null
fireFacilities?: string | null
linkMan?: string | null
linkTel?: string | null
maintenanceDate?: string[] | null
maintenanceEndTime?: string
maintenancePeople?: string
maintenancePeopleList?: string[]
maintenanceTime?: string
projectList?: projectType[]
projectSize?: string | null
reportId?: number | null
reportName?: string | null
reportNo?: string | null
reportTime?: string | null
reportType?: string | null
requirement?: string | null
result?: string | null
safeMan?: string | null
safeSignDate?: string | null
state?: string | null
technicalDirector?: string | null
technicalDirectorId?: string
undeGroundLayers?: string | null
}
export interface projectType{
projectId: number
}
// 维保详情类型
export interface reportDetailTest {
msg: string;
code: number;
data: reportDetailData;
}
export interface reportDetailData {
createBy?: null;
createTime?: null;
updateBy?: null;
updateTime?: null;
remark?: null;
reportId?: number;
reportName: string;
reportNo: string;
address?: null;
applyCompanyId?: null;
applyCompanyName: string;
companyId?: number;
companyName: string;
applyPerson?: null;
applyDate?: null;
buildUse?: null;
buildHeight?: null;
buildArea?: null;
aboveGroundLayers?: null;
undeGroundLayers?: null;
projectSize?: null;
fireFacilities: string;
basis?: null;
result: string;
requirement?: null;
equipment: string;
maintenancePeople: string;
maintenanceTime: string;
technicalDirectorId?: string;
technicalDirector?: null;
approvePersonId?: null;
approvePerson?: null;
allowPerson?: null;
state: string;
reportType: string;
city?: null;
county?: null;
projectNature?: null;
reportTime: string;
contractId?: null;
contractName?: null;
contractStartTime?: null;
contractEndTime?: null;
buildType?: null;
fireDanger?: null;
otherBuildType?: null;
regionCode?: null;
maintenanceArea?: null;
maintenanceEndTime: string;
instanceId?: null;
processKey?: null;
contractImg?: null;
proveImg?: null;
smallestState?: null;
projectArea?: null;
maintenancePeopleId?: null;
praticeImg?: null;
reportPeriod?: null;
stateQuery?: null;
reportFinishTime?: null;
projectList: ProjectList[];
signList?: [];
firstPartySign?: [];
malfunctionList?: [];
equipmentList: string[];
maintenancePeopleList: string[]
}
export interface ProjectList {
createBy: null;
createTime: null;
updateBy: null;
updateTime: string;
remark: null;
relateId: number;
reportId: number;
projectId: number;
projectName: string;
englishName: string;
state: string;
cosKey: null | string;
vedioTIme: null;
vedioState: null;
itemList: ItemList[];
}
export interface ItemList {
relateId: number;
itemId: number;
itemName: string;
itemEnglishName: string;
maintainceContent: string;
editTemplate: string;
viewTemplate: string;
orderNum: number;
rowspan: number;
showItemName: number;
position: string;
num: string;
proportion: string;
state: string;
record: recordType;
}
export interface recordType {
record1?: string
record2?: string
record3?: string
record4?: string
record5?: string
}
// 获取设备仪器类型
export interface equipmentTest {
code: number
msg: string
total: number
rows: equipmentType[]
}
export interface equipmentType {
buyDate: string
certificateNo: string
companyId: number
companyName: string
createBy: string | null
createTime: string
endDate: string
equipmentId: number
equipmentName: string
equipmentPicture: string | null
isCheckEquipment: boolean | null
manufacturer: string
remark: string | null
remarks: string
specifications: string
startDate: string
state: number
updateBy: string | null
updateTime: string | null
verificationReportPicture: string | null
}
// 主要消防措施类型
export interface LatestProjectTest {
msg: string;
code: number;
data: LatestProjectDatum[];
}
export interface LatestProjectDatum {
createBy: string | null;
createTime: string;
updateBy: string | null;
updateTime: string | null;
remark: string | null;
projectId: number;
projectName: string;
type: number;
version: string;
projectOrder: number;
englishName: string | null;
}
// 获取公司在职人员列表
export interface companyPersonTest {
total: number;
rows: companyPersonRow[];
code: number;
msg: string;
}
export interface companyPersonRow {
companyId: number;
companyName: string;
personId: number;
personName: string;
idNo: string;
certificateId: number | null;
certificateName: string;
certificateLevel: string;
memo: string | null;
state: string;
createTime: string;
relateId: number;
personalImg: string;
}
// 消防设施故障处理列表类型
export interface MalfunctionListTest {
total: number;
rows: MalfunctionListRow[];
code: number;
msg: string;
}
export interface MalfunctionListRow {
malfunctionId?: number;
findTime?: null | string;
findPeople?: null;
malfunctionPart: string;
malfunctionDes: string;
isStop?: null;
isRecord?: null;
security: string;
maintenanceTime?: null;
maintenancePeople?: null;
maintenanceMethod: string;
malfunctionConfirm: string;
reportId?: number;
version?: number;
maintenanceComment?: null | string;
applyCompanyComment?: null | string;
remark: null | string;
companyName?: null | string;
applyCompanyName?: string;
}
// 新增、修改、删除类型
export interface editType {
reportId: number;
list: MalfunctionListRow[]
}
// 原始记录详情类型
export interface InitTest {
msg: string;
code: number;
data: InitData;
}
export interface InitData {
createBy?: null;
createTime?: null;
updateBy?: null;
updateTime?: null;
remark?: null;
reportId?: number;
reportName: string;
reportNo: string;
address?: null;
applyCompanyId?: null;
applyCompanyName?: string;
companyId?: number;
companyName?: string;
applyPerson?: null;
applyDate?: null;
buildUse?: null;
buildHeight?: null;
buildArea?: null;
aboveGroundLayers?: null;
undeGroundLayers?: null;
projectSize?: null;
fireFacilities?: string;
basis?: null;
result?: null;
requirement?: null;
equipment?: string;
maintenancePeople?: string;
maintenanceTime?: string;
technicalDirectorId?: string;
technicalDirector?: null;
approvePersonId?: null;
approvePerson?: null;
allowPerson?: null;
state?: string;
reportType?: string;
city?: null;
county?: null;
projectNature?: null;
reportTime?: string;
contractId?: null;
contractName?: null;
contractStartTime?: null;
contractEndTime?: null;
buildType?: null;
fireDanger?: null;
otherBuildType?: null;
regionCode?: null;
maintenanceArea?: null;
maintenanceEndTime?: string;
instanceId?: null;
processKey?: null;
contractImg?: null;
proveImg?: null;
smallestState?: null;
projectArea?: null;
maintenancePeopleId?: null;
praticeImg?: null;
reportPeriod?: null;
stateQuery?: null;
reportFinishTime?: string;
projectList?: ProjectList[];
signList?: InitFirstPartySign[];
firstPartySign?: InitFirstPartySign[];
malfunctionList?: InitMalfunctionList[];
}
export interface InitFirstPartySign {
createBy: null;
createTime: null;
updateBy: null;
updateTime: null;
remark: null;
signId: number;
type: number;
signPic: string;
signHash: string;
signEncrypt: string;
username: string;
reportId: number;
signTime: string;
}
export interface InitMalfunctionList {
malfunctionId: number;
findTime: string;
findPeople: null;
malfunctionPart: string;
malfunctionDes: string;
isStop: null;
isRecord: null;
security: string;
maintenanceTime: null;
maintenancePeople: null;
maintenanceMethod: string;
malfunctionConfirm: string;
reportId: number;
version: number;
maintenanceComment: string;
applyCompanyComment: string;
remark: string;
companyName: null;
applyCompanyName: null;
}
export interface InitProjectList {
createBy: null;
createTime: null;
updateBy: null;
updateTime: string;
remark: null;
relateId: number;
reportId: number;
projectId: number;
projectName: string;
englishName: string;
state: string;
cosKey: string;
vedioTIme: null;
vedioState: null;
itemList: ItemList[];
}
export interface InitItemList {
relateId: number;
itemId: number;
itemName: string;
itemEnglishName: string;
maintainceContent: string;
editTemplate: string;
viewTemplate: string;
orderNum: number;
rowspan: number;
showItemName: number;
position: string;
num: string;
proportion: string;
state: string;
record: Record;
}
export interface Record {
record4: string;
record3: string;
record2: string;
record1: string;
}
// 实名信息类型
export interface realNameTest {
msg: string;
code: number;
data: realNameDatum[];
}
export interface realNameDatum {
reportId: number;
reportName: string;
reportNo: string;
realName: string;
idNo: string;
openId: string;
signTime: string;
}
// 订单列表类型
export interface orderTest {
total: number;
rows: orderRow[];
code: number;
msg: string;
}
export interface orderRow {
orderId: number;
orderNo: string;
amount: number;
comboId: number;
comboName: string;
companyId: number;
companyName: string;
bean: number;
state: number;
invoice: null | string;
source: number;
createTime: string;
expireTime: string;
payInfo: orderPayInfo;
}
export interface orderPayInfo {
"createBy": string
"createTime": string
"updateBy": string
"updateTime": string
"remark": string
"payId": number
"orderId": number
"appId": string,
"nonceStr": string,
"paySign": string,
"signType": string,
"prepayId": string,
"timeStamp": string,
"packageValue": string,
"partnerid": number,
"codeUrl": string
}
// 消耗记录类型
export interface recordTest {
total: number;
rows: recordRow[];
code: number;
msg: string;
}
export interface recordRow {
createBy: null;
createTime: string;
updateBy: null;
updateTime: null;
remark: string;
recordId: number;
reportId: number;
reportNo: string;
reportName: string;
companyId: number;
companyName: string;
createUserId: number;
createUserName: string;
costBean: number;
remainBean: number;
}
// 参数详情类型
export interface configTest {
msg: string;
code: number;
data: configData;
}
export interface configData {
createBy: string;
createTime: string;
updateBy: string;
updateTime: null;
remark: string;
configId: number;
configName: string;
configKey: string;
configValue: string;
configType: string;
}
\ No newline at end of file
... ...
import axios, { AxiosResponse, AxiosError, InternalAxiosRequestConfig } from '@ohos/axios'
import preferencesUtil from '../utils/preferences'
import loginOut from '../utils/loginOut'
import { promptAction } from '@kit.ArkUI';
import { router } from '@kit.ArkUI'
import baseUrl from '../utils/baseUrl'
let https = axios.create({
baseURL: baseUrl,
// baseURL: "https://xfappht.crgx.net",
timeout: 10000,
headers: { 'Content-Type': 'application/json' }
})
// 请求拦截
https.interceptors.request.use(async (config: InternalAxiosRequestConfig) => {
if(!config.headers.unToken){
config.headers.Authorization = preferencesUtil.get('XF_TOKEN', '') as string
}
return config
})
// 相应拦截
https.interceptors.response.use(async (res: AxiosResponse) => {
// 未设置状态码则默认成功状态
const code: number = res.data.code || 200;
// 获取错误信息
const msg: string = res.data.msg
// 二进制数据则直接返回
if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
return res.data
}
if (code === 401) {
promptAction.showToast({
message: '身份验证失败。请重新登录'
})
await loginOut()
router.replaceUrl({
url: 'pages/Login'
})
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
} else if (code === 500) {
promptAction.showToast({
message: msg,
})
return Promise.reject(new Error(msg))
} else if (code === 601) {
promptAction.showToast({
message: msg,
})
return Promise.reject('error')
} else if (code !== 200) {
promptAction.showToast({
message: msg,
})
return Promise.reject('error')
} else {
return res
}
}, (Error: AxiosError) => {
promptAction.showToast({
message: Error.message,
})
return Promise.reject(Error)
})
export default https
\ No newline at end of file
... ...
import { QueryParams } from './recordsType'
import https from './request'
import { loginType, userForm, personTest, personCertificateTest, CertificateTest, personCertificateRow, personData, companyWalletTest, InfoTest, companyTest,
companyData, headerTest, formType, headerRow,comBoTest, addType
} from './userType'
// 用户登录
export const login = (data: userForm) => {
return https<loginType>({
url: '/login',
method: 'post',
data,
headers: {
unToken: true
}
})
}
// 退出登录
export const loginOut = () => {
return https({
url: '/logout',
method: 'post',
headers: {
unToken: true
}
})
}
export interface updateStateParams {
relateId: number
state: string
}
// 离职申请
export const updateState = (data: updateStateParams) => {
return https({
url: '/system/companyPerson/updateState',
method: 'post',
data
})
}
// 获取账号信息
export const getInfo = () => {
return https<InfoTest>({
url: '/getInfo',
method: 'get'
})
}
// 获取个人信息
export const getPersonInfo = () => {
return https<personTest>({
url: '/system/person/currentPerson',
method: 'get'
})
}
// 获取公司管理员信息
export const getCompanyInfo = () => {
return https<companyTest>({
url: '/system/company/currentCompany',
method: 'get'
})
}
// 更新个人信息
export const updateCompanyInfo = (data: companyData) => {
return https({
url: '/system/company',
method: 'put',
data
})
}
// 获取公司管理员获取员工信息
export const getPersonDetail = (personId: number) => {
return https<personTest>({
url: `/system/person/${personId}`,
method: 'get'
})
}
// 更新个人信息
export const updatePersonInfo = (data: personData) => {
return https({
url: '/system/person',
method: 'put',
data
})
}
export interface emailType {
code: number
msg: string
data: string
}
// 获取邮箱验证码
export const getEmailCode = (email: string) => {
return https<emailType>({
url: '/system/forgetPwd/registValidEmail',
method: 'post',
data: email
})
}
export interface certificateParams {
pageNum: number
pageSize: number
personId?: number
companyId?: number
}
// 获取个人证书信息
export const getPersonalCertificate = (data: certificateParams) => {
return https<personCertificateTest>({
url: '/system/personalCertificate/list',
method: 'get',
params: data
})
}
// 修改个人证书信息
export const updatePersonalCertificate = (data: personCertificateRow) => {
return https({
url: '/system/personalCertificate',
method: 'put',
data
})
}
// 添加个人证书信息
export const addPersonalCertificate = (data: personCertificateRow) => {
return https({
url: '/system/personalCertificate',
method: 'post',
data
})
}
// 获取证书列表
export const getCertificateList = (data: certificateParams) => {
return https<CertificateTest>({
url: '/system/certificate/list',
method: 'get',
params: data
})
}
// 获取公司余额信息
export const getCompanyWallet = (data: certificateParams) => {
return https<companyWalletTest>({
url: '/system/wallet/list',
method: 'get',
params: data
})
}
// 用户修改密码
export const updatePassword = (oldPassword: string, newPassword: string) => {
return https<companyWalletTest>({
url: '/system/user/profile/updatePwd',
method: 'put',
params: {
oldPassword,
newPassword
}
})
}
// 用户重置密码
export const resetPassword = (data: formType) => {
return https({
url: '/system/forgetPwd/resetPwd',
method: 'post',
data
})
}
// 获取公司开票信息
export const getHeaderInfo = (data: QueryParams) => {
return https<headerTest>({
url: '/system/header/list',
method: 'get',
params: data
})
}
// 修改新增开票信息
export const addHeaderInfo = (data: headerRow) => {
return https({
url: '/system/header',
method: 'post',
data
})
}
// 修改开票信息
export const updateHeaderInfo = (data: headerRow) => {
return https({
url: '/system/header',
method: 'put',
data
})
}
// 获取充值套餐
export const getComboList = (data: QueryParams) => {
return https<comBoTest>({
url: '/system/combo/list',
method: 'get',
params: data
})
}
export interface beanType {
code: number
msg: string
}
// 获取报告豆比例
export const getBean = () => {
return https<beanType>({
url: '/system/config/configKey/bean.config.proportion',
method: 'get',
})
}
// 获取是否可以上传云存储
export const getCloudDown = () => {
return https<beanType>({
url: '/system/config/configKey/permission.uploadVedio',
method: 'get',
})
}
// 获取是否收费
export const getPay = () => {
return https<beanType>({
url: '/system/config/configKey/permission.charge',
method: 'get',
})
}
export interface queryUserNameType {
code: number
msg: string
data: number
}
// 检查用户名是否被使用
export const queryUsername = (userName: string) => {
return https<queryUserNameType>({
url: '/system/user/checkUserName',
method: 'get',
params: {
userName
}
})
}
export interface queryIdNoType {
code: number
msg: string
row: [],
total: number
}
// 检查身份证号是否被使用
export const queryIdNo = (idNo: string) => {
return https<queryIdNoType>({
url: '/system/person/list',
method: 'get',
params: {
pageNum: 1,
pageSize: 1,
idNo
}
})
}
// 注册个人用户
export const userRegister = (data: personData) => {
return https({
url: '/system/person/register',
method: 'post',
data
})
}
// 注册企业用户
export const companyRegister = (data: companyData) => {
return https({
url: '/system/company/register',
method: 'post',
data
})
}
// 公司新增员工
export const companyAdd = (data: addType) => {
return https<beanType>({
url: '/system/companyPerson',
method: 'post',
data
})
}
... ...
export interface requestType {
msg: string,
code: number
}
// 登录成功参数类型
export interface loginType extends requestType {
token: string
}
export interface userForm {
username: string,
password: string,
rememberMe?: boolean
}
// 用户个人信息参数类型
export interface personTest extends requestType {
data: personData;
}
export interface personData {
createBy?: string;
createTime?: string;
updateBy?: string;
updateTime?: string;
remark?: string;
personId: number;
personName: string;
email: string;
gender: string;
birthDate: string;
idNo: string;
phone: string;
personalImg: string;
idImgFront: string;
idImgBack: string;
address: string;
userId: number;
username: string;
state: string;
companyId: number;
code?: string
password?: string
}
// 公司个人信息类型
export interface companyTest {
msg: string;
code: number;
data: companyData;
}
export interface companyData {
createBy?: null;
createTime?: null;
updateBy?: null;
updateTime?: string;
remark?: null;
companyId: number;
companyName: string;
province: string;
city: string;
county: string;
address: string;
legalPerson?: null;
lpTel?: null;
linkMan: string;
lmTel: string;
companyTel: null;
fax?: null;
postCode: null;
email: string;
website?: null;
floorage?: number;
siteVoucher?: string;
businessLicenseNo: string;
businessStartTime: null;
businessEndTime: null;
businessLicensePic: string;
businessScope?: null;
peopleNum?: number;
companyIntroduce?: null;
registeredCapital?: null;
compangyPic: string;
memo?: null;
state?: string;
companyType?: string;
isShow?: null;
isValidVedio?: null;
userId: number;
username: string;
level: null;
regionCode: null;
levelModifyDate: null;
endTime: string;
password?: string
}
// 个人证书信息
export interface personCertificateTest {
total: number;
rows: personCertificateRow[];
code: number;
msg: string;
}
export interface personCertificateRow {
createBy?: null;
createTime?: null;
updateBy?: null;
updateTime?: null;
remark?: string | null;
relateId?: number;
certificateName: string;
certificateLevel: string;
personId?: number;
personName?: string;
certificateId?: number;
certificateNo?: string;
validStartTime?: null;
validEndTime?: null;
issueDate?: string;
certificateImg?: string;
memo?: null;
state?: string;
}
// 证书列表
export interface CertificateTest {
total: number;
rows: CertificateRow[];
code: number;
msg: string;
}
export interface CertificateRow {
createBy: null;
createTime: null;
updateBy: null;
updateTime: null;
remark: null;
certificateId: number;
certificateType: string;
certificateName: string;
certificateLevel: string;
}
// 公司余额斗列表
export interface companyWalletTest {
total: number;
rows: companyWalletRow[];
code: number;
msg: string;
}
export interface companyWalletRow {
createBy: null;
createTime: null;
updateBy: null;
updateTime: null;
remark: null;
walletId: number;
companyId: number;
bean: number
}
// 账号信息类型
export interface InfoTest {
msg: string;
code: number;
permissions: string[];
roles: string[];
user: InfoUser;
}
export interface InfoUser {
createBy: string;
createTime: string;
updateBy: null;
updateTime: null;
remark: null;
userId: number;
deptId: null;
userName: string;
nickName: string;
email: string;
phonenumber: string;
sex: string;
avatar: string;
password: string;
status: string;
delFlag: string;
loginIp: string;
loginDate: string;
dept: null;
roles: InfoRole[];
roleIds: null;
postIds: null;
roleId: null;
openId: string;
admin: boolean;
}
export interface InfoRole {
createBy: null;
createTime: null;
updateBy: null;
updateTime: null;
remark: null;
roleId: number;
roleName: string;
roleKey: string;
roleSort: number;
dataScope: string;
menuCheckStrictly: boolean;
deptCheckStrictly: boolean;
status: string;
delFlag: null;
flag: boolean;
menuIds: null;
deptIds: null;
permissions: string[];
admin: boolean;
}
// 开票信息类型
export interface headerTest {
total: number;
rows: headerRow[];
code: number;
msg: string;
}
export interface headerRow {
headerId?: number;
account: string;
bank: string;
address: string;
phone: string;
companyId: string;
companyName: string;
businessLicenseNo: string;
}
// 套餐类型
export interface comBoTest {
total: number;
rows: comBoRow[];
code: number;
msg: string;
}
export interface comBoRow {
createBy: null;
createTime: null;
updateBy: null;
updateTime: null;
remark: null;
comboId: number;
comboName: string;
comboPrice: number;
bean: number;
comboOrder: number;
state: string;
}
// 重置密码参数
export interface formType {
againPassword: string
code: string
email: string
password: string
type: number
username?: string
}
// 新增员工参数
export interface addType {
idNo: string,
personName: string,
relateId?: null
}
\ No newline at end of file
... ...
import { useCascadeAreaData } from '../utils/getArea'
@Component
export default struct AreaPicker {
@State cascade: TextCascadePickerRangeContent[] = useCascadeAreaData() //省市区列表数据
@Link value: string[] //选中值例如:['北京市','北京市','东城区']
private onChange: (value: string[], index: number[]) => void = () => {
} //选择改变回调函数
build() {
TextPicker({ range: this.cascade, value: this.value })
.canLoop(false)
.textStyle({
font: {
size: '14fp'
}
})
.selectedTextStyle({
font: {
size: '16fp'
}
})
.onChange((value: string | string[], index: number | number[]) => {
this.onChange(value as string[], index as number[])
this.value = value as string[]
})
}
}
... ...
import { router } from '@kit.ArkUI'
import { AxiosResponse } from '@ohos/axios'
import { getNoticeList, noticeTest, noticeParams, noticeRow } from '../api/notice'
import { getCompanyPersonList } from '../api/originalRecords'
import { companyPersonTest, companyPersonRow } from '../api/recordsType'
import preferencesUtils from '../utils/preferences'
import baseUrl from '../utils/baseUrl'
@Component
export default struct HomePage {
@State searchValue: string = ''
@State params: noticeParams = {
pageNum: 1,
pageSize: 10
}
@State noticeList: noticeRow[] = []
@State noticeTitleList: string[] = []
@State personList: companyPersonRow[] = []
roleName = preferencesUtils.get('XF_ROLE_NAME', '')
async aboutToAppear() {
getNoticeList(this.params).then((res: AxiosResponse<noticeTest>) => {
this.noticeList = res.data.rows
this.noticeTitleList = res.data.rows.map((item: noticeRow) => item.noticeTitle)
})
if(this.roleName == 'company') {
let companyId = preferencesUtils.get('XF_COMPANY_ID', '')
const personRes: AxiosResponse<companyPersonTest> = await getCompanyPersonList({pageNum: 1, pageSize: 10, companyId: Number(companyId), state: '2' })
this.personList = personRes.data.rows
}
}
build() {
Scroll(){
Column(){
Search({value: $$this.searchValue, placeholder: '请输入原始记录名称'}).backgroundColor('#fff')
.searchButton('搜索')
.onSubmit((value) => {
router.pushUrl({
url: 'pages/MaintenanceRecords',
params: {
reportName: value
}
})
})
Column(){
Text('维保原始记录').fontSize(18).lineHeight(24).fontColor('#fff').fontWeight(600)
Text('查看所有维保记录').fontSize(10).lineHeight(13).fontColor('#CACBFD').margin({bottom: 18, top: 2})
Row(){
Text('立即查看').fontSize(12).fontColor('#36278D').lineHeight(16)
Image($r('app.media.right_1')).width(16).margin({left: 5})
}.width(80).height(20).backgroundColor(Color.White).borderRadius(10).justifyContent(FlexAlign.Center)
}.width('100%').height(100).backgroundImage($r('app.media.bg_1'))
.backgroundImageSize({width: '100%', height: 100}).margin({top: 15}).alignItems(HorizontalAlign.Start)
.padding({top: 10, left: 20}).onClick(() => {
router.pushUrl({
url: 'pages/MaintenanceRecords'
})
})
Column(){
Text('操作手册').fontSize(18).lineHeight(24).fontColor('#fff').fontWeight(600)
Text('查看APP操作手册').fontSize(10).lineHeight(13).fontColor('#B5E9E6').margin({bottom: 18, top: 2})
Row(){
Text('立即查看').fontSize(12).fontColor('#1D8F90').lineHeight(16)
Image($r('app.media.right_2')).width(16).margin({left: 5})
}.width(80).height(20).backgroundColor(Color.White).borderRadius(10).justifyContent(FlexAlign.Center)
}.width('100%').height(100).backgroundImage($r('app.media.bg_2'))
.backgroundImageSize({width: '100%', height: 100}).margin({top: 15}).alignItems(HorizontalAlign.Start)
.padding({top: 10, left: 20}).onClick(() => {
router.pushUrl({
url: 'pages/OperationManual'
})
})
// 通知栏
Row(){
Row(){
Image($r('app.media.notice')).width(16).margin({right: 5})
Text('公告').fontSize(13).fontColor('3d3d3d')
}.width(75).backgroundColor('#F0FAFF').height(30).borderRadius(15).justifyContent(FlexAlign.Center)
Text(this.noticeTitleList.join(' '))
.fontColor('#3d3d3d').fontSize(12).layoutWeight(1).textOverflow({overflow: TextOverflow.MARQUEE})
}.width('100%').height(30).backgroundColor('#fff').borderRadius(15).margin({top: 15})
// 企业人员
Column(){
Row(){
Row(){
Text().width(4).height(20).backgroundColor('#6D9DFF').margin({right: 10})
Text('企业人员').fontSize(16).lineHeight(21).fontColor('#3d3d3d').fontWeight(600)
}
Row(){
Text('更多').fontSize(12).fontColor('#999').margin({right: 3})
Image($r('app.media.two_right')).width('12')
}.onClick(() => {
router.pushUrl({
url: 'pages/PersonList'
})
})
}.justifyContent(FlexAlign.SpaceBetween).width('100%')
Column(){
ForEach(this.personList, (item: companyPersonRow, index: number) => {
Row(){
Row({space: 10}){
Image(baseUrl + item.personalImg).width(60).height(60).borderRadius(10)
Column(){
Text(item.personName).fontSize(14).fontWeight(600).lineHeight(19).margin({bottom: 5})
.fontColor('#3d3d3d').textOverflow({overflow: TextOverflow.Ellipsis}).maxLines(1)
Text(item.createTime).fontColor('#999').fontSize(12).lineHeight(16)
}.alignItems(HorizontalAlign.Start)
}.layoutWeight(1)
Image($r('app.media.right_3')).width(12)
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: this.personList.length == index + 1 ? 0 : 1}, color: '#eee'}).padding({top: 15, bottom: 15})
.onClick(() => {
router.pushUrl({
url: 'pages/PersonDetail',
params: {
personId: item.personId
}
})
})
})
}.margin({top: 15})
}.width('100%').padding(15).borderRadius(10).backgroundColor('#fff').margin({top: 15})
.visibility(this.roleName == 'company' ? Visibility.Visible : Visibility.None)
// 通知公告
Column(){
Row(){
Row(){
Text().width(4).height(20).backgroundColor('#6D9DFF').margin({right: 10})
Text('通知公告').fontSize(16).lineHeight(21).fontColor('#3d3d3d').fontWeight(600)
}
Row(){
Text('更多').fontSize(12).fontColor('#999').margin({right: 3})
Image($r('app.media.two_right')).width('12')
}.onClick(() => {
router.pushUrl({
url: 'pages/NoticeList'
})
})
}.justifyContent(FlexAlign.SpaceBetween).width('100%')
Column(){
ForEach(this.noticeList, (item: noticeRow, index: number) => {
Row(){
Column(){
Text(item.noticeTitle).fontSize(14).fontWeight(600).lineHeight(19).margin({bottom: 5})
.fontColor('#3d3d3d').textOverflow({overflow: TextOverflow.Ellipsis}).maxLines(1)
Text(item.createTime).fontColor('#999').fontSize(12).lineHeight(16)
}.alignItems(HorizontalAlign.Start).layoutWeight(1)
Image($r('app.media.right_3')).width(12)
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: this.noticeList.length == index + 1 ? 0 : 1}, color: '#eee'}).padding({top: 15, bottom: 15})
.onClick(() => {
router.pushUrl({
url: 'pages/NoticeDetail',
params: {
id: item.noticeId
}
})
})
})
}.margin({top: 15})
}.width('100%').padding(15).borderRadius(10).backgroundColor('#fff').margin({top: 15})
}.width('100%')
.padding({left: 15, right: 15, bottom: 30})
}.height('100%').scrollBar(BarState.Off).linearGradient({colors: [['#E1EEFF', 0], ['#F2F3F7', 0.3]]})
}
}
\ No newline at end of file
... ...
@Component
struct InputVerify{
@Link textValue: string
@Prop errorInfo: string
build() {
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('姓名')
}.width(80)
TextInput({placeholder: '请输入姓名', text: this.textValue})
.backgroundColor('#fff').layoutWeight(1)
.showError(this.errorInfo).onChange(() => {
if(this.textValue.length == 0) {
this.errorInfo = '此处不能为空'
} else {
}
})
}.border({width: {bottom: 1}, color: '#eee'})
}
}
\ No newline at end of file
... ...
import { router } from '@kit.ArkUI'
import preferencesUtil from '../utils/preferences'
import loginOut from '../utils/loginOut'
import { personData, personCertificateRow, companyWalletTest, companyWalletRow, companyData } from '../api/userType'
import baseUrl from '../utils/baseUrl'
import { getCompanyPersonList } from '../api/originalRecords'
import { companyPersonTest, companyPersonRow } from '../api/recordsType'
import { getCompanyWallet, updateState } from '../api/user'
import { AxiosResponse } from '@ohos/axios'
import { promptAction } from '@kit.ArkUI'
import LoadingDialog from '../dialog/LoadingDialog'
import updatePasswordDialog from '../dialog/updatePasswordDialog'
@Extend(Text)
function textExtend() {
.fontSize(14).lineHeight(19).fontColor('#3d3d3d')
}
@Extend(Text)
function textRight() {
.fontSize(14).lineHeight(19).fontColor('#999')
}
let getTextInfo = (state: string | null) => {
if(state == '0') {
return '已离职'
} else if(state == '1') {
return '确认从业'
} else if(state == '2') {
return '确认离职'
} else {
return ''
}
}
@Component
export default struct MainPage {
dialogController: CustomDialogController = new CustomDialogController({
builder: updatePasswordDialog(),
cornerRadius: 10
})
loadingController: CustomDialogController = new CustomDialogController({
builder: LoadingDialog(),
customStyle: true,
offset: { dx: 0, dy: 0 },
alignment: DialogAlignment.Center,
autoCancel: false
})
@Link userInfo: personData
@Link companyInfo: companyData
@Link personCertificateInfo: personCertificateRow
@State walletData: companyWalletRow | null = null
@State companyData: companyPersonRow | null = null
@Link isEdit: boolean
roleName = preferencesUtil.get('XF_ROLE_NAME', '')
async aboutToAppear() {
let personId = preferencesUtil.get('XF_PERSON_ID', 0)
let companyId = preferencesUtil.get('XF_COMPANY_ID', 0)
if(this.roleName == 'person' && preferencesUtil.get('XF_PERSON_INFO', '')) {
this.userInfo = JSON.parse(preferencesUtil.get('XF_PERSON_INFO', '') as string)
}
if(this.roleName == 'person' || this.roleName == 'unapprovedPerson') {
// 获取公司人员个人信息
const companyInfo: AxiosResponse<companyPersonTest> = await getCompanyPersonList({pageNum: 1, pageSize: 10, personId: Number(personId)})
this.companyData = companyInfo.data.rows[0]
}
// 获取公司钱包信息
const walletInfo: AxiosResponse<companyWalletTest> = await getCompanyWallet({pageNum: 1, pageSize: 10, companyId: Number(companyId)})
this.walletData = walletInfo.data.rows[0]
}
build() {
Stack(){
Column(){
Row(){
Image((baseUrl + this.userInfo?.personalImg) || $r('app.media.userAvatar')).width(80).height(80).borderRadius(40).margin({right: 10})
Text(this.userInfo?.personName).fontSize(16).lineHeight(21).fontWeight(600).fontColor('#fff')
}.width('100%').padding({left: 15,right: 15}).margin({top: 44})
.visibility(this.roleName == 'person' || this.roleName == 'unapprovedPerson' ? Visibility.Visible: Visibility.None)
Row(){
Row(){
Image((baseUrl + this.companyInfo?.businessLicensePic) || $r('app.media.userAvatar')).width(60).height(60).borderRadius(30).margin({right: 10})
Text(this.companyInfo?.companyName).fontSize(14).lineHeight(21).fontWeight(600).fontColor('#fff')
}.layoutWeight(1).justifyContent(FlexAlign.Start)
Column({space: 4}){
Image($r('app.media.wallet')).width(30)
Text(this.walletData?.bean.toString() + '(豆)').fontSize(12).fontColor('#fff')
}.width(80).onClick(() => {
router.pushUrl({
url: "pages/MyWallet"
})
})
}.width('100%').padding({left: 10,right: 10}).margin({top: 44})
.visibility(this.roleName == 'company' ? Visibility.Visible: Visibility.None)
}.width('100%').height(256).padding({left: 15,right: 15})
.linearGradient({angle: 63 ,colors: [['#1B65FD', 0], ['#6D9DFF', 0.5]]})
List(){
// 公司基本信息
ListItem(){
Column(){
Row(){
Text('基本信息').fontWeight(600).textExtend()
Row(){
Text('编辑').fontSize(12).fontColor('#999')
Image($r('app.media.right_4')).width(12).margin({left: 4})
}.onClick(() => {
router.pushUrl({
url: 'pages/EditCompanyInfo'
})
})
}.padding(10).border({width: {bottom: 2}, color: '#eee'})
.justifyContent(FlexAlign.SpaceBetween).width('100%')
Column(){
Row(){
Row(){
Image($r('app.media.username')).width(16).margin({right: 5})
Text('用户名').textExtend()
}
Text(this.companyInfo?.username).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
Row(){
Row(){
Image($r('app.media.enterprise')).width(16).margin({right: 5})
Text('企业名称').textExtend()
}
Text(this.companyInfo?.companyName).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
Row(){
Row(){
Image($r('app.media.business_license')).width(16).margin({right: 5})
Text('营业执照编号').textExtend()
}
Text(this.companyInfo?.businessLicenseNo).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
Row(){
Row(){
Image($r('app.media.idcard')).width(16).margin({right: 5})
Text('联系人').textExtend()
}
Text(this.companyInfo?.linkMan).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
Row(){
Row(){
Image($r('app.media.phone')).width(16).margin({right: 5})
Text('联系人手机号').textExtend()
}
Text(this.companyInfo?.lmTel).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
Row(){
Row(){
Image($r('app.media.email')).width(16).margin({right: 5})
Text('电子邮箱').textExtend()
}
Text(this.companyInfo?.email).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.padding({top: 15, bottom: 15})
.border({width: {bottom: 1}, color: '#eee'})
}.padding({left: 10, right: 10})
}.width('100%').backgroundColor('#fff').borderRadius(10).clip(true)
}.visibility(this.roleName == 'company' ? Visibility.Visible: Visibility.None).margin({bottom: 10})
// 个人基本信息
ListItem(){
Column(){
Row(){
Text('基本信息').fontWeight(600).textExtend()
Row(){
Text('编辑').fontSize(12).fontColor('#999')
Image($r('app.media.right_4')).width(12).margin({left: 4})
}.onClick(() => {
router.pushUrl({
url: 'pages/EditUser'
})
})
}.padding(10).border({width: {bottom: 2}, color: '#eee'})
.justifyContent(FlexAlign.SpaceBetween).width('100%')
Column(){
Row(){
Row(){
Image($r('app.media.username')).width(16).margin({right: 5})
Text('用户名').textExtend()
}
Text(this.userInfo?.username).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
Row(){
Row(){
Image($r('app.media.idcard')).width(16).margin({right: 5})
Text('身份证号').textExtend()
}
Text(this.userInfo?.idNo).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
Row(){
Row(){
Image($r('app.media.sex')).width(16).margin({right: 5})
Text('性别').textExtend()
}
Text(this.userInfo?.gender == '0' ? '男' : '女').textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
Row(){
Row(){
Image($r('app.media.phone')).width(16).margin({right: 5})
Text('手机号码').textExtend()
}
Text(this.userInfo?.phone).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
Row(){
Row(){
Image($r('app.media.email')).width(16).margin({right: 5})
Text('电子邮箱').textExtend()
}
Text(this.userInfo?.email).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.padding({top: 15, bottom: 15})
.border({width: {bottom: 1}, color: '#eee'})
Row(){
Row(){
Image($r('app.media.brithday')).width(16).margin({right: 5})
Text('出生日期').textExtend()
}
Text(this.userInfo?.birthDate).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.padding({top: 15, bottom: 15})
}.padding({left: 10, right: 10})
}.width('100%').backgroundColor('#fff').borderRadius(10).clip(true)
}.visibility(this.roleName == 'person' || this.roleName == 'unapprovedPerson' ? Visibility.Visible: Visibility.None).margin({bottom: 10})
// 证书信息
ListItem(){
Column(){
Row(){
Row({ space: 5 }){
Text('证书信息').fontWeight(600).textExtend()
}
Row(){
Text(this.isEdit ? '编辑' : '添加').fontSize(12).fontColor('#999')
Image($r('app.media.right_4')).width(12).margin({left: 4})
}.onClick(() => {
router.pushUrl({
url: 'pages/CertificateInfo'
})
})
}.padding(10).border({width: {bottom: 2}, color: '#eee'})
.justifyContent(FlexAlign.SpaceBetween).width('100%')
Column(){
Row(){
Row(){
Image($r('app.media.certificate_type')).width(16).margin({right: 5})
Text('证书类型').textExtend()
}
Text(`${this.personCertificateInfo?.certificateLevel}${this.personCertificateInfo?.certificateName}`).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
Row(){
Row(){
Image($r('app.media.certificate_num')).width(16).margin({right: 5})
Text('证书编号').textExtend()
}
Text(this.personCertificateInfo?.certificateNo).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
Row(){
Row(){
Image($r('app.media.date')).width(16).margin({right: 5})
Text('颁发时间').textExtend()
}
Text(this.personCertificateInfo?.issueDate).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.padding({top: 15, bottom: 15})
}.padding({left: 10, right: 10})
}.width('100%').backgroundColor('#fff').borderRadius(10).clip(true)
}.visibility(this.roleName == 'person' || this.roleName == 'unapprovedPerson' ? Visibility.Visible: Visibility.None).margin({bottom: 10})
// 从业信息
ListItem(){
Column(){
Row(){
Text('从业信息').fontWeight(600).textExtend()
Image($r('app.media.refresh')).width(12)
.onClick(async () => {
this.loadingController.open()
let personId = preferencesUtil.get('XF_PERSON_ID', 0)
const companyInfo: AxiosResponse<companyPersonTest> = await getCompanyPersonList({pageNum: 1, pageSize: 10, personId: Number(personId)})
if(companyInfo.data.rows.length > 0) {
this.companyData = companyInfo.data.rows[0]
}
this.loadingController.close()
})
}.padding(10).border({width: {bottom: 2}, color: '#eee'})
.justifyContent(FlexAlign.Start).width('100%')
Column(){
Row(){
Row(){
Image($r('app.media.enterprise')).width(16).margin({right: 5})
Text('所属公司').textExtend()
}
Text(this.companyData?.companyName).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
Row(){
Row(){
Image($r('app.media.certificate_num')).width(16).margin({right: 5})
Text('报告豆余额').textExtend()
}
Text(`${this.walletData?.bean}`).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
Row(){
Row(){
Image($r('app.media.date')).width(16).margin({right: 5})
Text('添加时间').textExtend()
}
Text(this.companyData?.createTime).textRight()
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15})
}.padding({left: 10, right: 10})
Row(){
Row(){
Image($r('app.media.edit')).width(16).margin({right: 5})
Text('操作').textExtend()
}
Text(getTextInfo(this.companyData?.state || '0')).width(80).height(25)
.backgroundColor(this.companyData?.state == '1' ? '#1890ff' : '#C80000')
.fontSize(14).textAlign(TextAlign.Center).fontColor('#fff').borderRadius(8)
.visibility(this.companyData?.state == '0' ? Visibility.None : Visibility.Visible)
.onClick(() => {
AlertDialog.show({
title: '提示',
message: this.companyData?.state == '2' ? `是否从${this.companyData?.companyName}离职` : `是否在${this.companyData?.companyName}就职`,
alignment: DialogAlignment.Center,
primaryButton: {
value: '取消',
action: () => {
console.info('Callback when the first button is clicked')
}
},
secondaryButton: {
enabled: true,
defaultFocus: true,
style: DialogButtonStyle.HIGHLIGHT,
value: '确认',
action: async () => {
if(this.companyData?.state == '2') {
await updateState({ relateId: this.companyData?.relateId, state: '0' })
promptAction.showToast({
message: '已成功离职',
duration: 2000
})
await loginOut()
router.replaceUrl({
url: 'pages/Login'
})
}else {
await updateState({ relateId: this.companyData?.relateId, state: '2' })
promptAction.showToast({
message: '已恢复职位,请重新登录获取新数据',
duration: 2000
})
await loginOut()
router.replaceUrl({
url: 'pages/Login'
})
}
}
}
})
})
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.padding({top: 15, bottom: 15, left: 10, right: 10})
}.width('100%').backgroundColor('#fff').borderRadius(10).clip(true)
}.visibility(this.roleName == 'person' || this.roleName == 'unapprovedPerson' ? Visibility.Visible: Visibility.None).margin({bottom: 10})
// APP信息
ListItem(){
Column(){
Row(){
Text('APP信息').fontWeight(600).textExtend()
}.padding(10).border({width: {bottom: 2}, color: '#eee'})
.justifyContent(FlexAlign.SpaceBetween).width('100%')
Column(){
Row(){
Row(){
Image($r('app.media.user_agreement')).width(16).margin({right: 5})
Text('用户协议').textExtend()
}
Image($r('app.media.right_4')).width(12).margin({left: 4})
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15}).onClick(() => {
router.pushUrl({
url: 'pages/UserAgreement'
})
})
Row(){
Row(){
Image($r('app.media.privacy')).width(16).margin({right: 5})
Text('隐私政策').textExtend()
}
Image($r('app.media.right_4')).width(12).margin({left: 4})
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.border({width: {bottom: 1}, color: '#eee'})
.padding({top: 15, bottom: 15}).onClick(() => {
router.pushUrl({
url: 'pages/PrivacyPolicy'
})
})
Row(){
Row(){
Image($r('app.media.delete')).width(16).margin({right: 5})
Text('注销协议').textExtend()
}
Image($r('app.media.right_4')).width(12).margin({left: 4})
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
.padding({top: 15, bottom: 15}).onClick(() => {
router.pushUrl({
url: 'pages/CancellationAgreement'
})
})
}.padding({left: 10, right: 10})
}.width('100%').backgroundColor('#fff').borderRadius(10).clip(true)
}.margin({bottom: 10})
// 操作按钮
ListItem(){
Column({space: 10}){
Text('修改密码').width('100%').height(50).backgroundColor('#4ECDBE').borderRadius(10)
.fontSize(16).fontColor(Color.White).fontWeight(600).textAlign(TextAlign.Center)
.onClick(() => {
this.dialogController.open()
})
Text('退出登录').width('100%').height(50).backgroundColor('#6D9DFF').borderRadius(10)
.fontSize(16).fontColor(Color.White).fontWeight(600).textAlign(TextAlign.Center)
.onClick(() => {
AlertDialog.show({
title: '提示',
message: '是否退出登录?',
autoCancel: true,
alignment: DialogAlignment.Center,
gridCount: 4,
offset: { dx: 0, dy: -20 },
buttonDirection: DialogButtonDirection.HORIZONTAL,
buttons: [
{
value: '取消',
action: () => {
console.info('Callback when button1 is clicked')
}
},
{
value: '确认',
action: async () => {
await loginOut()
router.replaceUrl({
url: 'pages/Login'
})
}
}
],
cancel: () => {
console.info('Closed callbacks')
}
})
})
Column(){
Text('http://xfapp.crgx.net').fontSize(10).fontColor('#999').lineHeight(18)
Text('非广西消防救援总队官方出品Copyright@广西世纪创软信息技术有限公司').fontSize(10).fontColor('#999').lineHeight(18)
.maxLines(2).textAlign(TextAlign.Center)
}
}
}
}.margin({left: 15, right: 15, top: 144}).borderRadius(10).scrollBar(BarState.Off).layoutWeight(1)
}.height('100%').backgroundColor('#f3f2f7').alignContent(Alignment.Top).padding({bottom: 20})
}
}
\ No newline at end of file
... ...
import { webview } from '@kit.ArkWeb'
import { HmParseHTML } from "@wuyan/html_parse"
import { InitProjectList, ItemList } from '../api/recordsType'
@Component
export default struct ProjectItem{
@Prop itemInfo: InitProjectList
webviewController: webview.WebviewController = new webview.WebviewController()
build() {
Column(){
// 头部详情
List({space: 10}){
ForEach(this.itemInfo.itemList, (item: ItemList) => {
ListItem(){
Column({space: 5}){
HmParseHTML({
htmlStr: item.itemName, // 富文本内容-必传
baseFontColor: '#000',
baseFontSize: 14
})
Column(){
Text('项目保养内容:').fontColor('#999').fontSize(12)
HmParseHTML({
htmlStr: item.maintainceContent, // 富文本内容-必传
baseFontColor: '#999',
baseFontSize: 12,
})
}.alignItems(HorizontalAlign.Start)
Row({space: 10}){
Text('部位').fontSize(14).fontWeight(700).fontColor('#000').width(100)
Text(item.position).layoutWeight(1).fontSize(12).fontColor('#999').textAlign(TextAlign.Start)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row({space: 10}){
Text('抽查数量:').fontSize(14).fontWeight(700).fontColor('#000').width(100)
Text(item.num).layoutWeight(1).fontSize(12).fontColor('#999').textAlign(TextAlign.Start)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row({space: 10}){
Text('抽查比例 (%):').fontSize(14).fontWeight(700).fontColor('#000').width(100)
Text(item.proportion).layoutWeight(1).fontSize(12).fontColor('#999').textAlign(TextAlign.Start)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Column(){
Text('实测记录').fontSize(14).fontWeight(700).fontColor('#000')
Web({
src: `data:text/html, ${item.viewTemplate.replace(new RegExp('<input', 'g'), '<input style="width: 30px;height: 30px"')}`,
controller: this.webviewController,
renderMode: RenderMode.SYNC_RENDER
}).layoutMode(WebLayoutMode.FIT_CONTENT).defaultFontSize(30)
}.alignItems(HorizontalAlign.Start)
}.alignItems(HorizontalAlign.Start)
}.backgroundColor('#fff').padding(10).borderRadius(4)
})
}.layoutWeight(1).backgroundColor('#f2f3f7')
}.height('100%').width('100%')
}
}
\ No newline at end of file
... ...
import { InitData } from '../api/recordsType'
import { getMaintenanceType } from '../api/originalRecords'
import { InitFirstPartySign } from '../api/recordsType'
import { quarterTest, quarterType } from '../api/options/optionsType'
import { AxiosResponse } from '@ohos/axios'
import { HmParseHTML } from "@wuyan/html_parse"
import baseUrl from '../utils/baseUrl'
@Component
export default struct RecordsHome {
@Prop info: InitData
// 记录类型列表
@State maintenanceTypeList: quarterType[] = []
// 获取类型
getType = (arr: quarterType[], value: string): string => {
const newValue = arr.filter((item: quarterType) => item.dictValue == value)
return newValue[0]?.dictLabel || '月度'
}
// 获取时间范围
getTimeFrame = (startTime: string | null | undefined, endTime: string | null | undefined) => {
if(startTime != null && endTime != null){
return `${startTime} 至 ${endTime}`
} else if(startTime != null) {
return startTime
} else {
return ''
}
}
// 获取签名
getSign = (index: number) => {
if(this.info.signList) {
let signList: InitFirstPartySign[] = this.info.signList
return baseUrl + signList[index]?.signPic
} else {
return ''
}
}
// 获取签名
getFirstSign = (index: number) => {
if(this.info.firstPartySign) {
let firstPartySignList: InitFirstPartySign[] = this.info.firstPartySign
return baseUrl + firstPartySignList[index]?.signPic
} else {
return ''
}
}
aboutToAppear(){
getMaintenanceType().then((res: AxiosResponse<quarterTest>) => {
this.maintenanceTypeList = res.data.data
})
}
build() {
Scroll(){
Column(){
Text(`项目编号:${this.info.reportNo}`).fontSize(12).fontColor('#000').fontWeight(700)
Text('建筑消防设施维护保养记录表').fontSize(16).fontColor('#000').fontWeight(700).width('100%').textAlign(TextAlign.Center).margin({bottom: 10, top: 10})
Text(`(${this.getType(this.maintenanceTypeList, this.info.reportType)})`).fontSize(12).fontColor('#666').padding({top: 10, bottom: 10})
.border({width: {bottom: 1},color: '#eee'})
.width('100%').textAlign(TextAlign.Center)
.margin({bottom: 10})
Row(){
Text('维保项目名称:').fontSize(12).fontColor('#999').width(120)
Text(this.info.reportName).fontSize(12).fontColor('#999')
}.padding({top: 10, bottom: 10}).border({width: {bottom: 1},color: '#eee'}).width('100%')
Row(){
Text('维护委托单位:').fontSize(12).fontColor('#999').width(120)
Text(this.info.applyCompanyName).fontSize(12).fontColor('#999')
}.padding({top: 10, bottom: 10}).border({width: {bottom: 1},color: '#eee'}).width('100%')
Row(){
Text('维护机构:').fontSize(12).fontColor('#999').width(120)
Text(this.info.companyName).fontSize(12).fontColor('#999')
}.padding({top: 10, bottom: 10}).border({width: {bottom: 1},color: '#eee'}).width('100%')
Row(){
Text('维保日期:').fontSize(12).fontColor('#999').width(120)
Text(this.getTimeFrame(this.info?.maintenanceTime, this.info?.maintenanceEndTime)).fontSize(12).fontColor('#999')
}.padding({top: 10, bottom: 10}).border({width: {bottom: 1},color: '#eee'}).width('100%')
Row(){
Text('维护保养人员签字:').fontSize(12).fontColor('#999').width(120)
Image(this.getSign(0)).width(80).height(40).margin({left: 20})
}.padding({top: 10, bottom: 10}).border({width: {bottom: 1},color: '#eee'}).width('100%')
Row(){
Column(){
Text('委托单位见证人签字:').fontSize(12).fontColor('#999').margin({bottom: 4})
Text('(签字人作为委托单位见证人对本消防原始记录表已仔细核对不存在弄虚作假,本电子签名经委托方、受委托方认可具有法律效应)').fontSize(10).fontColor('#999')
}.width(120)
Image(this.getFirstSign(0)).width(80).height(40).margin({left: 20})
}.padding({top: 10, bottom: 10}).border({width: {bottom: 1},color: '#eee'}).width('100%')
Column(){
Text('使用仪器设备及编号:').fontSize(12).fontColor('#999').margin({bottom: 4})
Text(this.info.equipment).fontSize(12).fontColor('#999')
}.padding({top: 10, bottom: 10}).border({width: {bottom: 1},color: '#eee'}).width('100%').alignItems(HorizontalAlign.Start)
Row(){
Text('综合评述:').fontSize(12).fontColor('#999')
HmParseHTML({
htmlStr: this.info?.result || '<p>无</p>',
baseFontSize: 12,
baseFontColor: '#999'
})
}.padding({top: 10, bottom: 10}).border({width: {bottom: 1},color: '#eee'}).width('100%')
Column(){
Text('注:').margin({bottom: 10}).width('100%').textAlign(TextAlign.Start).fontSize(12).fontColor('#000')
Column(){
Text('1.对发现的问题应及时处理,当场不能处置的要填报《消防设施故障处理单》。').fontSize(12).fontColor('#000')
Text('2.表中未包含的消防设施维护保养项目,消防设施维护保养单位可参考表格样式自行制定原始记录表。').fontSize(12).fontColor('#000')
Text('3.如消防技术规范有更新,消防设施维护保养单位可根据最新规范要求自行更新原始记录表。').fontSize(12).fontColor('#000')
}.padding({left: 20})
}.margin({top: 20})
}.width('100%').alignItems(HorizontalAlign.Start).justifyContent(FlexAlign.Start)
.padding({left: 10, right: 10, bottom: 30, top: 30})
}.width('100%').height('100%').scrollBar(BarState.Off).backgroundColor('#fff').borderRadius(10)
}
}
\ No newline at end of file
... ...
let getInfoColor = (index: string | undefined) => {
let colorStr: string = ''
switch (index) {
case '1': colorStr = '#909399';break;
case '2': colorStr = '#1890ff';break;
case '4': colorStr = '#ffba00';break;
case '3': colorStr = '#13ce66';break;
default : colorStr = '#909399'
}
return colorStr
}
let getInfoBgColor = (index: string | undefined) => {
let colorStr: string = ''
switch (index) {
case '1': colorStr = '#f4f4f5';break;
case '2': colorStr = '#e8f4ff';break;
case '4': colorStr = '#fff8e6';break;
case '3': colorStr = '#e7faf0';break;
default : colorStr = '#f4f4f5'
}
return colorStr
}
let getInfoBorderColor = (index: string | undefined) => {
let colorStr: string = ''
switch (index) {
case '1': colorStr = '#e9e9eb';break;
case '2': colorStr = '#d1e9ff';break;
case '4': colorStr = '#fff1cc';break;
case '3': colorStr = '#d0f5e0';break;
default : colorStr = '#f4f4f5'
}
return colorStr
}
let getStateInfoColor = (index: string | undefined) => {
let colorStr: string = ''
switch (index) {
case '4': colorStr = '#909399';break;
case '0': colorStr = '#1890ff';break;
case '5': colorStr = '#ffba00';break;
case '2': colorStr = '#ff4949';break;
case '1': colorStr = '#13ce66';break;
default : colorStr = '#909399'
}
return colorStr
}
let getStateInfoBgColor = (index: string | undefined) => {
let colorStr: string = ''
switch (index) {
case '4': colorStr = '#f4f4f5';break;
case '0': colorStr = '#e8f4ff';break;
case '5': colorStr = '#fff8e6';break;
case '2': colorStr = '#ffeded';break;
case '1': colorStr = '#e7faf0';break;
default : colorStr = '#f4f4f5'
}
return colorStr
}
let getStateInfoBorderColor = (index: string | undefined) => {
let colorStr: string = ''
switch (index) {
case '4': colorStr = '#e9e9eb';break;
case '0': colorStr = '#d1e9ff';break;
case '5': colorStr = '#fff1cc';break;
case '2': colorStr = '#ffdbdb';break;
case '1': colorStr = '#d0f5e0';break;
default : colorStr = '#f4f4f5'
}
return colorStr
}
@Component
export default struct ThemeStaticTest {
@Prop textValue: string
@Prop type: string = '0'
// 获取维保记录类型
MaintenanceType = (index: string | undefined): string => {
let str: string = ''
switch (index) {
case '1': str = '月度';break;
case '2': str = '季度';break;
case '4': str = '半年度';break;
case '3': str = '年度';break;
default : str = ''
}
return str
}
// 获取维保记录状态
MaintenanceState = (index: string | undefined): string => {
let str: string = ''
switch (index) {
case '0': str = '编辑中';break;
case '1': str = '已签发';break;
case '2': str = '已删除';break;
case '3': str = '正常(除”删除“外)';break;
case '4': str = '待维保人员签字';break;
case '5': str = '待甲方签字';break;
default : str = ''
}
return str
}
build() {
if(this.type == '0') {
Text(this.MaintenanceType(this.textValue))
.padding({left: 6, right: 6})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).fontColor(getInfoColor(this.textValue))
.backgroundColor(getInfoBgColor(this.textValue)).borderColor(getInfoBorderColor(this.textValue))
} else if(this.type == '1'){
Text(this.MaintenanceState(this.textValue)).padding({left: 6, right: 6})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).fontColor(getStateInfoColor(this.textValue))
.backgroundColor(getStateInfoBgColor(this.textValue)).borderColor(getStateInfoBorderColor(this.textValue))
}
}
}
\ No newline at end of file
... ...
@Extend(Text) function info () {
.fontColor('#909399').backgroundColor('#f4f4f5')
.borderColor('#e9e9eb')
}
@Extend(Text) function primary () {
.fontColor('#1890ff').backgroundColor('#e8f4ff')
.borderColor('#d1e9ff')
}
@Extend(Text) function warning () {
.fontColor('#ffba00').backgroundColor('#fff8e6')
.borderColor('#fff1cc')
}
@Extend(Text) function success () {
.fontColor('#13ce66').backgroundColor('#e7faf0')
.borderColor('#d0f5e0')
}
@Extend(Text) function danger () {
.fontColor('#ff4949').backgroundColor('#ffeded')
.borderColor('#ffdbdb')
}
@Component
export default struct ThemeTest {
@Prop theme: string
@Prop textValue: string
build() {
if(this.theme == 'info') {
Text(this.textValue).padding({left: 6, right: 6})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).info()
} else if(this.theme == 'primary'){
Text(this.textValue).padding({left: 6, right: 6})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).primary()
} else if(this.theme == 'warning'){
Text(this.textValue).padding({left: 6, right: 6})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).warning()
} else if(this.theme == 'success'){
Text(this.textValue).padding({left: 6, right: 6})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).success()
} else if(this.theme == 'danger'){
Text(this.textValue).padding({left: 6, right: 6})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).danger()
}
}
}
\ No newline at end of file
... ...
import { orderRow } from '../api/recordsType'
import { quarterType } from '../api/options/optionsType'
@Extend(Text) function info () {
.fontColor('#909399').backgroundColor('#f4f4f5')
.borderColor('#e9e9eb')
}
@Extend(Text) function primary () {
.fontColor('#1890ff').backgroundColor('#e8f4ff')
.borderColor('#d1e9ff')
}
@Extend(Text) function warning () {
.fontColor('#ffba00').backgroundColor('#fff8e6')
.borderColor('#fff1cc')
}
@Extend(Text) function success () {
.fontColor('#13ce66').backgroundColor('#e7faf0')
.borderColor('#d0f5e0')
}
@Extend(Text) function danger () {
.fontColor('#ff4949').backgroundColor('#ffeded')
.borderColor('#ffdbdb')
}
interface listClassType {
listClass: string,
dictLabel: string
}
@Component
export default struct orderItem {
@Prop orderInfo: orderRow
@Prop sourceList: quarterType[]
@Prop stateList: quarterType[]
getSource = () => {
let listClassObj: listClassType = { listClass: 'info', dictLabel: '小程序' }
let sourceValue: string = this.orderInfo?.source.toString()
let newArr = this.sourceList.filter((item: quarterType) => item.dictValue == sourceValue)
return newArr[0] || listClassObj
}
getState = () => {
let listClassObj: listClassType = { listClass: 'info', dictLabel: '未支付' }
let stateValue: string = this.orderInfo.state.toString()
let newArr = this.stateList.filter((item: quarterType) => item.dictValue == stateValue)
return newArr[0] || listClassObj
}
build() {
Row(){
Column({space: 5}){
Text(`订单编号:${this.orderInfo?.orderNo}`).fontSize(14).fontColor('#000').fontWeight(600)
Row(){
Text(`套餐:${this.orderInfo?.comboName}`).fontSize(12).fontColor('#999').margin({right: 5})
if(this.getSource().listClass == 'info') {
Text(this.getSource().dictLabel).padding({left: 10, right: 10})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).info()
} else if(this.getSource().listClass == 'primary'){
Text(this.getSource().dictLabel).padding({left: 10, right: 10})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).primary()
} else if(this.getSource().listClass == 'warning'){
Text(this.getSource().dictLabel).padding({left: 10, right: 10})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).warning()
} else if(this.getSource().listClass == 'success'){
Text(this.getSource().dictLabel).padding({left: 10, right: 10})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).success()
} else if(this.getSource().listClass == 'danger'){
Text(this.getSource().dictLabel).padding({left: 10, right: 10})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).danger()
}
}
Row(){
Text(`金额:${this.orderInfo?.amount}`).fontSize(12).fontColor('#999').margin({right: 5})
if(this.getState().listClass == 'info') {
Text(this.getState().dictLabel).padding({left: 10, right: 10})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).info()
} else if(this.getState().listClass == 'primary'){
Text(this.getState().dictLabel).padding({left: 10, right: 10})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).primary()
} else if(this.getState().listClass == 'warning'){
Text(this.getState().dictLabel).padding({left: 10, right: 10})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).warning()
} else if(this.getState().listClass == 'success'){
Text(this.getState().dictLabel).padding({left: 10, right: 10})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).success()
} else if(this.getState().listClass == 'danger'){
Text(this.getState().dictLabel).padding({left: 10, right: 10})
.borderWidth(1).fontSize(12).borderRadius(4).lineHeight(16).danger()
}
}
Text(`时间:${this.orderInfo?.createTime}`).fontSize(12).fontColor('#999')
}.alignItems(HorizontalAlign.Start)
Text(`+${this.orderInfo?.bean}`).fontStyle(14).fontStyle(FontStyle.Italic).fontColor('#1890ff').fontWeight(600)
}.padding({top: 20, bottom: 20, left: 10, right: 10})
.border({width: {bottom: 1}, color: '#eee'}).width('100%')
.justifyContent(FlexAlign.SpaceBetween)
}
}
\ No newline at end of file
... ...
import { companyAdd, beanType } from '../api/user'
import { addType } from '../api/userType'
import { promptAction } from '@kit.ArkUI'
import { AxiosResponse } from '@ohos/axios'
@CustomDialog
export default struct AddPersonDialog {
controller: CustomDialogController = new CustomDialogController({builder: ''})
@State addForm : addType = {
personName: '',
idNo: ''
}
build() {
Column(){
Text('添加人员').margin({top: 20})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('姓名')
}.width(90)
TextInput({placeholder: '请输入姓名', text: $$this.addForm.personName})
.backgroundColor('#fff').layoutWeight(1)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('身份证号')
}.width(90)
TextInput({placeholder: '请输入身份证号', text: $$this.addForm.idNo})
.backgroundColor('#fff').layoutWeight(1)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Text('取消').layoutWeight(1).fontSize(16).height(60).fontColor('#606266')
.textAlign(TextAlign.Center)
.onClick(() => {
this.controller.close()
})
Text('确定').layoutWeight(1).fontSize(16).height(60).fontColor('#1890ff')
.textAlign(TextAlign.Center)
.onClick(async () => {
const res: AxiosResponse<beanType> = await companyAdd(this.addForm)
promptAction.showToast({message: res.data.msg})
this.controller.close()
})
}
}.width('100%').backgroundColor('#fff')
}
}
\ No newline at end of file
... ...
import AreaPicker from '../components/AreaPicker'
@CustomDialog
export default struct AreaPickerDialog {
private dialogController: CustomDialogController //弹窗控制器
@State value: string[] = [] //选中值
//确认关闭选择改变回调
onChange: (value: string[]) => void = () => {
}
private defaultValue: string[] = []; //首次打开选中值
aboutToAppear(): void {
//记录打开时候的默认值
this.defaultValue = this.value
if (Array.isArray(this.value) && this.value.length < 3) {
this.value = ['北京市', '北京市', '东城区']; //设置默认值
}
}
build() {
Column({ space: 50 }) {
//头部确认、取消操作行
Row() {
Text('取消')
.fontColor('#909090')
.onClick(() => {
this.dialogController.close()
})
Text('请选择省市区')
Text('确定')
.fontColor('#0A7EE6')
.onClick(() => {
//和首次打开值对比
if (this.defaultValue.join('') !== this.value.join('')) {
this.onChange(this.value)
}
this.dialogController.close()
})
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
//地区选择器
AreaPicker({ value: this.value })
}
.backgroundColor(Color.White)
.borderRadius(24)
.padding(20)
.width('93%')
}
}
... ...
import { personCertificateRow, CertificateRow } from '../api/userType'
@CustomDialog
export default struct CertificateDialog {
controller: CustomDialogController = new CustomDialogController({builder: ''})
@State select: number = 0
@Prop certificateList: string[] = []
@Link selectValue: string
@Link personCertificateInfo: personCertificateRow
@Link certificateData: CertificateRow[]
build() {
Column({ space: 50 }) {
//头部确认、取消操作行
Row() {
Text('取消')
.fontColor('#909090')
.onClick(() => {
this.selectValue = this.certificateList[0]
this.personCertificateInfo.certificateId = this.certificateData[0].certificateId
this.controller.close()
})
Text('请选择证书类型')
Text('确定')
.fontColor('#0A7EE6')
.onClick(() => {
this.controller.close()
})
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
//证书选择器
TextPicker({ range: this.certificateList, selected: this.select })
.canLoop(false).divider(null)
.width('93%')
.onChange((value: string | string[], index: number | number[]) => {
this.selectValue = value as string
let newArr = this.certificateData.filter((item: CertificateRow) => item.certificateLevel + item.certificateName == value )
this.personCertificateInfo.certificateId = newArr[0]?.certificateId || 1
})
}
.backgroundColor(Color.White)
.borderRadius(24)
.padding(20)
.width('93%')
}
}
\ No newline at end of file
... ...
import { promptAction } from '@kit.ArkUI'
@CustomDialog
export default struct UserCommit{
controller: CustomDialogController = new CustomDialogController({builder: ''})
@State count: number = 3
@State rememberSelect: boolean = false
aboutToAppear(): void {
let timer = setInterval(() => {
this.count--
if(this.count <= 0){
this.count = 0
clearInterval(timer)
}
}, 1000)
}
build() {
Column({space: 10}){
Text('承诺书').fontSize(20).lineHeight(21).fontColor('#606266').fontWeight(600).margin({bottom: 20})
.margin({top: 60})
Text('为规范消防技术服务机构从业活动,保障消防技术服务质量,提高社会整体火灾防控能力,保护群众生命财产安全。本机构承诺如下:').fontSize(12).fontColor('#606266')
Column({space: 10}){
Text('一、严格遵守有关法律、法规和消防技术规范,按照消防技术服务标准开展服务活动。')
.fontSize(12).fontColor('#606266').textIndent(24)
Text('二、从业条件符合《社会消防技术服务机构管理规定》(应急部令第7号)文件要求。').fontSize(12).fontColor('#606266').textIndent(24)
Text('三、所有从业人员均取得相应的职业资格证书。').fontSize(12).fontColor('#606266').textIndent(24)
Text('四、注册消防工程师未同时在2个(含本数)以上消防技术服务机构执业,且未在其他机关、团体、企业、事业单位兼职。').fontSize(12).fontColor('#606266').textIndent(24)
Text('五、在承接业务时,明确每个项目的负责人,且由注册消防工程师担任。').fontSize(12).fontColor('#606266').textIndent(24)
Text('六、营业执照、从业人员、设备配备信息在本机构显著位置公示。').fontSize(12).fontColor('#606266').textIndent(24)
Text('七、加强消防技术服务质量管理,保证消防原始记录真实、准确、完整、规范,不出具虚假消防原始记录。').fontSize(12).fontColor('#606266').textIndent(24)
Text('八、加强从业人员职业道德教育,开展职业技能培训,自觉提升消防技术服务水平。').fontSize(12).fontColor('#606266').textIndent(24)
Text('九、上传至该系统的材料均属实。').fontSize(12).fontColor('#606266').textIndent(24)
Text('本机构自觉接受有关部门的监督管理,严格遵守本承诺,\n' +
'如有违反,愿意承担相应的法律责任。')
.textIndent(24).fontSize(12).fontColor('#606266')
}.alignItems(HorizontalAlign.Start)
Row({space: 5}){
Checkbox({ group: 'password' })
.select(this.rememberSelect)
.selectedColor('#1890ff')
.shape(CheckBoxShape.ROUNDED_SQUARE)
.width(16).height(16)
.mark({
size: 10,
strokeWidth: 5
})
.onChange((value: boolean) => {
this.rememberSelect = value
})
Text('我已阅读《承诺书》,并严格按照承诺书《承诺书》内容执行').fontSize(12).fontColor('#606266')
}.width('100%').justifyContent(FlexAlign.Start)
Text(`请仔细阅读承诺书(${this.count}s后可关闭)`)
.fontSize(14).fontColor('#fff').fontWeight(600).textAlign(TextAlign.Center)
.margin({top: 60}).width('100%').border({width: {top: 1}, color: '#fff'}).padding({top: 10, bottom: 10})
.visibility(this.count > 0 ? Visibility.Visible : Visibility.None).backgroundColor('#1890ff')
.borderRadius(10).opacity(0.5)
Text('前往注册')
.fontSize(14).fontColor('#fff').fontWeight(600).textAlign(TextAlign.Center)
.margin({top: 60}).width('100%').border({width: {top: 1}, color: '#fff'}).padding({top: 10, bottom: 10})
.visibility(this.count == 0 ? Visibility.Visible : Visibility.None).backgroundColor('#1890ff')
.borderRadius(10)
.onClick(() => {
if(!this.rememberSelect){
return promptAction.showToast({message: '请选勾选同意承诺书'})
}
this.controller.close()
})
}.backgroundColor('#fff').width('100%').padding(10).borderRadius(10).height('100%')
}
}
\ No newline at end of file
... ...
import { noticeRow } from '../api/notice'
import { HmParseHTML } from "@wuyan/html_parse"
@CustomDialog
export default struct DialogTip{
controller: CustomDialogController = new CustomDialogController({builder: ''})
cancel: Function = () => {}
confirm: Function = () => {}
@Prop noticeDetail: noticeRow
@State count: number = 5
aboutToAppear(): void {
let timer = setInterval(() => {
this.count--
if(this.count <= 0){
this.count = 0
clearInterval(timer)
}
}, 1000)
}
build() {
Column({space: 10}){
Text('- 温馨提示 -').fontSize(16).lineHeight(21).fontColor('#fff').fontWeight(600).margin({bottom: 20})
HmParseHTML({
htmlStr: this.noticeDetail?.noticeContent || '', // 富文本内容-必传
baseFontColor: '#fff',
baseFontSize: 14
})
Text(`我已知晓(${this.count}s后可关闭)`)
.fontSize(16).lineHeight(21).fontColor('#1890ff').fontWeight(600).textAlign(TextAlign.Center)
.margin({top: 60}).width('100%').border({width: {top: 1}, color: '#fff'}).padding({top: 20, bottom: 20})
.visibility(this.count > 0 ? Visibility.Visible : Visibility.None)
Text('我已知晓')
.fontSize(16).lineHeight(21).fontColor('#1890ff').fontWeight(600).textAlign(TextAlign.Center)
.margin({top: 60}).width('100%').border({width: {top: 1}, color: '#fff'}).padding({top: 20, bottom: 20})
.visibility(this.count == 0 ? Visibility.Visible : Visibility.None)
.onClick(() => {
this.confirm()
this.controller.close()
})
}.backgroundImage($r('app.media.login_back'))
.backgroundImageSize({width: '100%'}).width('100%')
.backgroundImagePosition(Alignment.Center)
.padding({top: 20,left: 13, right: 13})
}
}
\ No newline at end of file
... ...
import { getRecordsList } from '../api/originalRecords'
import { quarterType } from '../api/options/optionsType'
import { QueryParams, RecordsList, Row } from '../api/recordsType'
import { AxiosResponse } from '@ohos/axios'
import preferencesUtil from '../utils/preferences'
@CustomDialog
export default struct FilterDialog {
controller: CustomDialogController = new CustomDialogController({builder: ''})
cancel: Function = () => {}
confirm: Function = () => {}
@Prop typeLists: quarterType[]
@Prop statusLists: quarterType[]
@Link recordsList: Row[]
@Link params: QueryParams
@Link totalAll: number
build() {
Column({space: 10}){
Row(){
Row({space: 10}){
Text().width(3).height(20).backgroundColor('#6D9DFF')
Text('筛选条件').fontSize(14)
}
Image($r('app.media.close')).width(20).onClick(() => this.controller.close())
}.width('100%').justifyContent(FlexAlign.SpaceBetween).margin({bottom: 20})
Column({space: 10}){
Text('消防设施使用管理单位')
TextInput({text: $$this.params.applyCompanyName,placeholder: '请输入管理单位名称'}).backgroundColor('#fff')
.border({width: {bottom: 1}, color: '#eee'}).borderRadius(0)
}.alignItems(HorizontalAlign.Start)
Column({space: 10}){
Text('记录编号')
TextInput({text: $$this.params.reportNo, placeholder: '请输入记录编号'}).backgroundColor('#fff')
.border({width: {bottom: 1}, color: '#eee'}).borderRadius(0)
}.alignItems(HorizontalAlign.Start)
Column({space: 10}){
Text('记录类型')
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Start, wrap: FlexWrap.Wrap }) {
ForEach(this.typeLists, (item: quarterType) => {
Row() {
Radio({ value: item.dictValue, group: 'radioGroup' })
.radioStyle({ checkedBackgroundColor: '#1890ff' })
.height(15)
.width(15)
.onChange(() => {
this.params.reportType = item.dictValue
})
Text(item.dictLabel)
}.margin({right: 5,bottom: 5})
})
}
}.alignItems(HorizontalAlign.Start)
Column({space: 10}){
Text('状态')
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Start, wrap: FlexWrap.Wrap }) {
ForEach(this.statusLists, (item: quarterType) => {
Row() {
Radio({ value: item.dictValue, group: 'radioGroup2' })
.radioStyle({ checkedBackgroundColor: '#1890ff' })
.height(15)
.width(15)
.onChange(() => {
this.params.stateQuery = item.dictValue
console.log(JSON.stringify(this.params))
})
Text(item.dictLabel)
}.margin({right: 5,bottom: 5})
})
}
}.alignItems(HorizontalAlign.Start)
Row(){
Text('开始日期')
Text(this.params.beginMaintenanceTime || '选择开始日期').padding({top: 8, bottom: 8, left: 16, right: 16})
.backgroundColor('#fff').layoutWeight(1).fontColor('#999').onClick(() => {
CalendarPickerDialog.show({
onAccept: (value) => {
this.params.beginMaintenanceTime = JSON.stringify(value).slice(1, 11)
}
})
})
}
Row(){
Text('结束日期')
Text(this.params.endMaintenanceTime || '选择结束日期').padding({top: 8, bottom: 8, left: 16, right: 16})
.backgroundColor('#fff').layoutWeight(1).fontColor('#999').onClick(() => {
CalendarPickerDialog.show({
onAccept: (value) => {
this.params.endMaintenanceTime = JSON.stringify(value).slice(1, 11)
}
})
})
}
Row({space: 20}){
Button('搜索').layoutWeight(1).onClick(() => {
getRecordsList(this.params).then((res: AxiosResponse<RecordsList>) => {
this.recordsList = res.data.rows
this.totalAll = res.data.total
this.controller.close()
})
})
Button('重置').layoutWeight(1).backgroundColor('#fff').fontColor('#666')
.borderColor('#eee').borderWidth(1)
.onClick(() => {
this.params = {
pageSize: 10,
pageNum: 1,
stateQuery: '3'
}
const companyId: number = preferencesUtil.get('XF_COMPANY_ID', 0) as number
const personId: number = preferencesUtil.get('XF_PERSON_ID', 0) as number
this.params.companyId = companyId
this.params.technicalDirectorId = personId
getRecordsList(this.params).then((res: AxiosResponse<RecordsList>) => {
this.recordsList = res.data.rows
this.totalAll = res.data.total
this.controller.close()
})
})
}.margin({top: 20})
}.width('100%').alignItems(HorizontalAlign.Start).padding(20)
}
}
\ No newline at end of file
... ...
import { quarterType } from '../api/options/optionsType'
import { orderParams } from '../api/recordsType'
import preferencesUtils from '../utils/preferences'
let companyId = preferencesUtils.get('XF_COMPANY_ID', '') as number
@CustomDialog
export default struct FilterOrderDialog {
controller: CustomDialogController = new CustomDialogController({builder: ''})
reset: () => void = () => {}
confirm: () => void = () => {}
@Link params: orderParams
@Prop sourceList: quarterType[]
@Prop stateList: quarterType[]
build() {
Column({space: 10}){
Row(){
Row({space: 10}){
Text().width(3).height(20).backgroundColor('#6D9DFF')
Text('筛选条件').fontSize(14)
}
Image($r('app.media.close')).width(20).onClick(() => this.controller.close())
}.width('100%').justifyContent(FlexAlign.SpaceBetween).margin({bottom: 20})
Column({space: 10}){
Text('订单编号')
TextInput({text: $$this.params.orderNo ,placeholder: '请输入订单编号'}).backgroundColor('#fff')
.border({width: {bottom: 1}, color: '#eee'}).borderRadius(0)
}.alignItems(HorizontalAlign.Start)
Column({space: 10}){
Text('金额')
TextInput({text: $$this.params.amount, placeholder: '请输入金额'}).backgroundColor('#fff')
.border({width: {bottom: 1}, color: '#eee'}).borderRadius(0).type(InputType.Number)
}.alignItems(HorizontalAlign.Start)
Column({space: 10}){
Text('套餐')
TextInput({text: $$this.params.comboName,placeholder: '请输入套餐'}).backgroundColor('#fff')
.border({width: {bottom: 1}, color: '#eee'}).borderRadius(0)
}.alignItems(HorizontalAlign.Start)
Column({space: 10}){
Text('公司')
TextInput({text: $$this.params.companyName,placeholder: '请输入公司名称'}).backgroundColor('#fff')
.border({width: {bottom: 1}, color: '#eee'}).borderRadius(0)
}.alignItems(HorizontalAlign.Start)
Column({space: 10}){
Text('状态')
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Start, wrap: FlexWrap.Wrap }) {
ForEach(this.stateList, (item: quarterType) => {
Row() {
Radio({ value: item.dictValue, group: 'radioGroup' })
.radioStyle({ checkedBackgroundColor: '#1890ff' })
.height(15)
.width(15)
.onChange(() => {
this.params.state = item.dictValue
})
Text(item.dictLabel)
}.margin({right: 5,bottom: 5})
})
}
}.alignItems(HorizontalAlign.Start)
Column({space: 10}){
Text('支付来源')
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Start, wrap: FlexWrap.Wrap }) {
ForEach(this.sourceList, (item: quarterType) => {
Row() {
Radio({ value: item.dictValue, group: 'radioGroup2' })
.radioStyle({ checkedBackgroundColor: '#1890ff' })
.height(15)
.width(15)
.onChange(() => {
this.params.source = item.dictValue
})
Text(item.dictLabel)
}.margin({right: 5,bottom: 5})
})
}
}.alignItems(HorizontalAlign.Start)
Row({space: 20}){
Button('搜索').layoutWeight(1).onClick(() => {
this.confirm()
this.controller.close()
console.log(JSON.stringify(this.params))
})
Button('重置').layoutWeight(1).backgroundColor('#fff').fontColor('#666')
.borderColor('#eee').borderWidth(1)
.onClick(() => {
this.params = {
pageNum: 1,
pageSize: 10,
companyId: companyId
}
this.reset()
this.controller.close()
})
}.margin({top: 20})
}.width('100%').alignItems(HorizontalAlign.Start).padding(20).backgroundColor('#fff')
}
}
\ No newline at end of file
... ...
import { recordParams } from '../api/recordsType'
import preferencesUtils from '../utils/preferences'
let companyId = preferencesUtils.get('XF_COMPANY_ID', '') as number
@CustomDialog
export default struct FilterRecordDialog {
controller: CustomDialogController = new CustomDialogController({builder: ''})
reset: () => void = () => {}
confirm: () => void = () => {}
@Link recordParams: recordParams
build() {
Column({space: 10}){
Row(){
Row({space: 10}){
Text().width(3).height(20).backgroundColor('#6D9DFF')
Text('筛选条件').fontSize(14)
}
Image($r('app.media.close')).width(20).onClick(() => this.controller.close())
}.width('100%').justifyContent(FlexAlign.SpaceBetween).margin({bottom: 20})
Column({space: 10}){
Text('原始记录名称')
TextInput({text: $$this.recordParams.reportName ,placeholder: '请输入原始记录名称'}).backgroundColor('#fff')
.border({width: {bottom: 1}, color: '#eee'}).borderRadius(0)
}.alignItems(HorizontalAlign.Start)
Column({space: 10}){
Text('公司')
TextInput({text: $$this.recordParams.companyName, placeholder: '请输入公司名称'}).backgroundColor('#fff')
.border({width: {bottom: 1}, color: '#eee'}).borderRadius(0)
}.alignItems(HorizontalAlign.Start)
Column({space: 10}){
Text('创建用户')
TextInput({text: $$this.recordParams.createUserId, placeholder: '请输入创建用户'}).backgroundColor('#fff')
.border({width: {bottom: 1}, color: '#eee'}).borderRadius(0)
}.alignItems(HorizontalAlign.Start)
Row({space: 20}){
Button('搜索').layoutWeight(1).onClick(() => {
this.confirm()
this.controller.close()
})
Button('重置').layoutWeight(1).backgroundColor('#fff').fontColor('#666')
.borderColor('#eee').borderWidth(1)
.onClick(() => {
this.recordParams = {
pageNum: 1,
pageSize: 10,
companyId: companyId
}
this.reset()
this.controller.close()
})
}.margin({top: 20})
}.width('100%').alignItems(HorizontalAlign.Start).padding(20).backgroundColor('#fff')
}
}
\ No newline at end of file
... ...
import { Row, QueryParams, RecordsList } from '../api/recordsType'
import { getRecordsList, importRecord } from '../api/originalRecords'
import { AxiosResponse } from '@ohos/axios'
import preferencesUtil from '../utils/preferences'
import { promptAction } from '@kit.ArkUI'
let companyId: number = preferencesUtil.get('XF_COMPANY_ID', 0) as number
@CustomDialog
export default struct ImportRecordsDialog{
controller: CustomDialogController = new CustomDialogController({builder: ''})
//回调函数
onChange: () => void = () => {}
@Prop applyCompanyName: string
@Prop reportId: number
@State recordsList: Row[] = []
@State searchValue: string = ''
async aboutToAppear() {
let params: QueryParams = {
pageNum: 1,
pageSize: 20,
applyCompanyName: this.applyCompanyName,
companyId: companyId
}
const result: AxiosResponse<RecordsList> = await getRecordsList(params)
this.recordsList = result.data.rows
}
build() {
Column(){
Row(){
Search({ value: $$this.searchValue, placeholder: '请输入【记录编号】' })
.searchButton('搜索', {
fontSize: 12
})
.width('95%')
.height(30)
.backgroundColor('#fff')
.placeholderColor(Color.Grey)
.placeholderFont({ size: 12, weight: 400 })
.textFont({ size: 12, weight: 400 })
.layoutWeight(1)
.onSubmit(async () => {
this.recordsList = []
let params: QueryParams = {
pageNum: 1,
pageSize: 10,
applyCompanyName: this.applyCompanyName,
companyId: companyId,
reportType: '1',
reportNo: this.searchValue
}
const result: AxiosResponse<RecordsList> = await getRecordsList(params)
this.recordsList = result.data.rows
})
}.padding({left: 5, right: 5}).borderRadius(10)
List({space: 10}){
ForEach(this.recordsList, (item: Row) => {
ListItem(){
Row({space: 10}){
Column({space: 10}){
Row(){
Image($r('app.media.project')).width(16).margin({right: 10})
Text(item.reportName).fontSize(12).fontColor('#333').maxLines(2)
.textOverflow({overflow: TextOverflow.Ellipsis})
}
Row(){
Image($r('app.media.company')).width(16).margin({right: 10})
Text(item.applyCompanyName).fontSize(12).fontColor('#999')
}
Row(){
Image($r('app.media.numberNo')).width(16).margin({right: 10})
Text(item.reportNo).fontSize(12).fontColor('#999')
}
Row(){
Image($r('app.media.dateTime')).width(16).margin({right: 10})
Text(`${item.maintenanceTime}~${item.maintenanceEndTime || ''}`).fontSize(12).fontColor('#999')
}
}.alignItems(HorizontalAlign.Start).layoutWeight(1)
Text('导入').fontSize(14).fontColor('#1890ff')
.onClick(() => {
AlertDialog.show({
title: '',
message: '删除后无法找回,确认删除全部故障处理记录并提交?',
autoCancel: true,
alignment: DialogAlignment.Center,
gridCount: 4,
offset: { dx: 0, dy: -20 },
buttonDirection: DialogButtonDirection.HORIZONTAL,
buttons: [
{
value: '取消',
action: () => {
console.info('Callback when button1 is clicked')
}
},
{
value: '确认',
action: async () => {
await importRecord(item.reportId,this.reportId)
this.onChange()
this.controller.close()
promptAction.showToast({message: '更新成功'})
}
}
],
cancel: () => {
console.info('Closed callbacks')
}
})
})
}.borderRadius(10).padding(10).backgroundColor('#fff').width('100%')
}
})
}.padding({top: 10, bottom: 20, left: 10, right: 10})
}.constraintSize({maxHeight: '60%'}).backgroundColor('#f2f3f7')
}
}
\ No newline at end of file
... ...
@CustomDialog
export default struct LoadingDialog{
controller: CustomDialogController = new CustomDialogController({builder: ''})
build() {
Column({space: 10}){
LoadingProgress().height(32).color(Color.White)
Text("加载中...").fontSize(16).margin({ left: 20 }).fontColor('#fff')
}
}
}
\ No newline at end of file
... ...
@CustomDialog
export default struct PhotoBrowser {
controller: CustomDialogController = new CustomDialogController({builder: ''})
@State count: number = 0
@Prop imagesList: ResourceStr[] | string[] = []
build() {
Swiper(){
ForEach(this.imagesList, (str: string | ResourceStr, index)=>{
Image(str)
.width('100%')
.height('100%')
.objectFit(ImageFit.Auto)
})
}
.index(this.count)
.loop(false)
.backgroundColor(Color.Black)
.indicator(
new DotIndicator().color(Color.White)
)
.width('100%')
.height('100%')
.onClick(()=>{
this.controller.close()
})
}
}
\ No newline at end of file
... ...
import { router } from '@kit.ArkUI'
@Extend(Text) function textCommon () {
.width('100%').height(60)
.textAlign(TextAlign.Center)
.backgroundColor('#fff')
}
@CustomDialog
export default struct SelectRegDialog{
controller: CustomDialogController = new CustomDialogController({builder: ''})
build() {
Column(){
Text('请选择注册类型').textCommon().fontSize(12).fontColor('#999')
.border({width: {bottom: 1}, color: '#eee'})
Text('个人用户').textCommon().fontSize(14).fontColor('#000')
.border({width: {bottom: 1}, color: '#eee'})
.onClick(() => {
this.controller.close()
router.pushUrl({
url: 'pages/UserRegister'
})
})
Text('维保机构').textCommon().fontSize(14).fontColor('#000')
.margin({bottom: 10})
.onClick(() => {
this.controller.close()
router.pushUrl({
url: 'pages/Register'
})
})
Text('取消').textCommon().fontSize(14).fontColor('#000')
.onClick(() => {
this.controller.close()
})
}.backgroundColor('#f2f3f7').width('100%')
}
}
\ No newline at end of file
... ...
import AreaPicker from '../components/AreaPicker'
@CustomDialog
export default struct AreaPickerDialog {
private dialogController: CustomDialogController //弹窗控制器
@State value: string[] = [] //选中值
//确认关闭选择改变回调
private onChange: (value: string[]) => void = () => {
}
private defaultValue: string[] = []; //首次打开选中值
aboutToAppear(): void {
//记录打开时候的默认值
this.defaultValue = this.value
if (Array.isArray(this.value) && this.value.length < 3) {
this.value = ['月度']; //设置默认值
}
}
build() {
Column({ space: 50 }) {
//头部确认、取消操作行
Row() {
Text('取消')
.fontColor('#909090')
.onClick(() => {
this.dialogController.close()
})
Text('请选择记录类型')
Text('确定')
.fontColor('#0A7EE6')
.onClick(() => {
//和首次打开值对比
if (this.defaultValue.join('') !== this.value.join('')) {
this.onChange(this.value)
}
this.dialogController.close()
})
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
//地区选择器
AreaPicker({ value: this.value })
}
.backgroundColor(Color.White)
.borderRadius(24)
.padding(20)
.width('93%')
}
}
... ...
@CustomDialog
export default struct DialogTip{
controller: CustomDialogController = new CustomDialogController({builder: ''})
cancel: Function = () => {}
confirm: Function = () => {}
build() {
Column({space: 10}){
Text('上传视频/图片提示').fontSize(16).lineHeight(21).fontColor('#fff').fontWeight(600).margin({bottom: 20})
Text('已上传视频/图片会为你保留15个自然日,请及时下载并上传到正式报告系统中。').fontSize(16).fontColor('#fff')
Text('我已知晓')
.fontSize(16).lineHeight(21).fontColor('#fff').fontWeight(600).textAlign(TextAlign.Center)
.width('100%').padding({top: 20, bottom: 20})
.onClick(() => {
this.controller.close()
AppStorage.setOrCreate('isShowTip', true)
})
}.backgroundImage($r('app.media.login_back'))
.backgroundImageSize({width: '100%'}).width('100%')
.backgroundImagePosition(Alignment.Center)
.padding({top: 20,left: 13, right: 13})
}
}
\ No newline at end of file
... ...
import { promptAction } from '@kit.ArkUI'
@CustomDialog
export default struct UserCommit{
controller: CustomDialogController = new CustomDialogController({builder: ''})
@State count: number = 3
@State rememberSelect: boolean = false
aboutToAppear(): void {
let timer = setInterval(() => {
this.count--
if(this.count <= 0){
this.count = 0
clearInterval(timer)
}
}, 1000)
}
build() {
Column({space: 10}){
Text('承诺书').fontSize(20).lineHeight(21).fontColor('#606266').fontWeight(600).margin({bottom: 20})
.margin({top: 60})
Text('本人承诺在本系统中自主录入的所有信息真实有效,并将按照相关法律法规的要求,及时、准确录入后续变更信息。').fontSize(12).fontColor('#606266').textIndent(24)
Text('本人承诺严格遵守相关法律法规和标准规范,并按照客观独立、合法公正、诚实信用的原则,从事消防设施维护保养检测和消防安全评估等消防技术服务活动,并在本系统录入消防技术服务项目原始记录情况。')
.fontSize(12).fontColor('#606266').textIndent(24)
Text('本人承诺主动接受并配合消防救援机构和其他行政主管部门的监督管理。以上承诺如不属实,或者违反上述承诺的,本人依法依规承担相应的法律责任。')
.textIndent(24).fontSize(12).fontColor('#606266')
Row({space: 5}){
Checkbox({ group: 'password' })
.select(this.rememberSelect)
.selectedColor('#1890ff')
.shape(CheckBoxShape.ROUNDED_SQUARE)
.width(16).height(16)
.mark({
size: 10,
strokeWidth: 5
})
.onChange((value: boolean) => {
this.rememberSelect = value
})
Text('我已阅读《承诺书》,并严格按照承诺书《承诺书》内容执行').fontSize(12).fontColor('#606266')
}.width('100%').justifyContent(FlexAlign.Start)
Text(`请仔细阅读承诺书(${this.count}s后可关闭)`)
.fontSize(14).fontColor('#fff').fontWeight(600).textAlign(TextAlign.Center)
.margin({top: 60}).width('100%').border({width: {top: 1}, color: '#fff'}).padding({top: 10, bottom: 10})
.visibility(this.count > 0 ? Visibility.Visible : Visibility.None).backgroundColor('#1890ff')
.borderRadius(10).opacity(0.5)
Text('前往注册')
.fontSize(14).fontColor('#fff').fontWeight(600).textAlign(TextAlign.Center)
.margin({top: 60}).width('100%').border({width: {top: 1}, color: '#fff'}).padding({top: 10, bottom: 10})
.visibility(this.count == 0 ? Visibility.Visible : Visibility.None).backgroundColor('#1890ff')
.borderRadius(10)
.onClick(() => {
if(!this.rememberSelect){
return promptAction.showToast({message: '请选勾选同意承诺书'})
}
this.controller.close()
})
}.backgroundColor('#fff').width('100%').padding(10).borderRadius(10).height('100%')
}
}
\ No newline at end of file
... ...
import { promptAction } from '@kit.ArkUI'
import { updatePassword } from '../api/user'
@CustomDialog
export default struct updatePasswordDialog{
controller: CustomDialogController = new CustomDialogController({builder: ''})
@State oldPassword: string = ''
@State newPassword: string = ''
@State requirePassword: string = ''
build() {
Column(){
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('旧密码')
}.width(90)
TextInput({placeholder: '请输入旧密码', text: $$this.oldPassword})
.backgroundColor('#fff').layoutWeight(1).type(InputType.Password)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('新密码')
}.width(90)
TextInput({placeholder: '请输入新密码', text: $$this.newPassword})
.backgroundColor('#fff').layoutWeight(1).type(InputType.Password)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('确认密码')
}.width(90)
TextInput({placeholder: '请确认密码', text: $$this.requirePassword})
.backgroundColor('#fff').layoutWeight(1).type(InputType.Password)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row({space: 10}){
Text('取消').layoutWeight(1).textAlign(TextAlign.Center).onClick(() => {
this.controller.close()
})
Text('确认').layoutWeight(1).fontColor('#1890ff').textAlign(TextAlign.Center)
.onClick(async () => {
if(this.oldPassword == '' && this.newPassword == '' && this.requirePassword == '') {
promptAction.showToast({
message: '请正确填写内容',
duration: 2000
})
} else if(this.newPassword == this.oldPassword) {
promptAction.showToast({
message: '新密码和旧密码不能相同',
duration: 2000
})
} else if(this.newPassword !== this.requirePassword) {
promptAction.showToast({
message: '两次密码输入不同',
duration: 2000
})
} else {
await updatePassword(this.oldPassword, this.newPassword)
promptAction.showToast({
message: '修改成功',
duration: 2000
})
this.controller.close()
}
})
}.width('100%').padding({top: 10, bottom: 10})
}.backgroundColor('#fff').width('100%')
.padding({top: 20,left: 13, right: 13})
}
}
\ No newline at end of file
... ...
import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit';
import { hilog } from '@kit.PerformanceAnalysisKit';
import { window } from '@kit.ArkUI';
export default class EntryAbility extends UIAbility {
onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
}
onDestroy(): void {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
}
onWindowStageCreate(windowStage: window.WindowStage): void {
// Main window is created, set main page for this ability
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
windowStage.loadContent('pages/Login', (err) => {
if (err.code) {
hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
return;
}
hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
});
}
onWindowStageDestroy(): void {
// Main window is destroyed, release UI related resources
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
}
onForeground(): void {
// Ability has brought to foreground
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
}
onBackground(): void {
// Ability has back to background
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
}
}
... ...
import { hilog } from '@kit.PerformanceAnalysisKit';
import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit';
export default class EntryBackupAbility extends BackupExtensionAbility {
async onBackup() {
hilog.info(0x0000, 'testTag', 'onBackup ok');
}
async onRestore(bundleVersion: BundleVersion) {
hilog.info(0x0000, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion));
}
}
\ No newline at end of file
... ...
import {
addParamsType,
LatestProjectTest,
LatestProjectDatum,
equipmentTest,
equipmentType,
companyPersonTest,
companyPersonRow,
reportDetailTest,
reportDetailData,
projectType,
RecordsList
} from '../api/recordsType'
import { quarterType, quarterTest } from '../api/options/optionsType'
import { getMaintenanceType, getLatestProjectList, getEquipmentList, addRecords, getCompanyPersonList, getReportDetail, updateRecords, getRecordsList } from '../api/originalRecords'
import { AxiosResponse } from '@ohos/axios'
import preferencesUtil from '../utils/preferences'
import { router, promptAction } from '@kit.ArkUI'
interface routerParams {
reportId: number
}
let params = router.getParams() as routerParams
let reportId: number | undefined = params?.reportId
// 查看原始记录编号是否存在
let queryReportNo = async (reportNo: string) => {
let res: AxiosResponse<RecordsList> = await getRecordsList({pageNum: 1, pageSize: 10, reportNo})
return res.data.total > 0
}
// 模糊查询
//模糊查询1:利用字符串的indexOf方法
function searchByIndexOf(keyWord: string, list: equipmentType[]){
if(!(list instanceof Array)){
return ;
}
let len = list.length;
let arr: equipmentType[] = []
for(let i = 0;i < len;i++){
//如果字符串中不包含目标字符会返回-1
if(list[i].equipmentName.indexOf(keyWord) >= 0){
arr.push(list[i]);
}
}
return arr;
}
@Entry
@Component
struct EditUser {
@Builder indicatorBuilder(icon: ResourceStr) {
Image(icon)
}
searchController: SearchController = new SearchController()
// 添加维保记录类型参数
@State addForm: addParamsType = {
reportName: '',
reportNo: '',
approvePerson: '',
approvePersonId: 0,
applyCompanyId: null,
applyCompanyName: '',
fireFacilities: '',
result: '',
equipment: '',
maintenancePeople: '',
maintenanceTime: '起始日期',
state: '',
reportType: '1',
reportTime: '',
maintenanceEndTime: '结束日期',
projectList: [],
equipmentList: [],
maintenancePeopleList: [],
technicalDirectorId: ''
}
personId = preferencesUtil.get('XF_PERSON_ID', 0)
// 回显数据使用
@State viewEquipmentList: string[] = []
@State fireFacilitiesList: string[] = []
@State PeopleList: string[] = []
@State isEdit: boolean = false
// 公司在职人员列表
@State companyPersonList: companyPersonRow[] = []
// 选择维保记录类型
@State recordsType: quarterType[] = []
// 主要消防措施选择列表
@State latestProjectList: LatestProjectDatum[] = []
// 仪器设备选择列表
@State equipmentList: equipmentType[] = []
// 初始设备列表
@State initEquipmentList: equipmentType[] = []
@State errorMsg: string = ''
flag: boolean = true
async aboutToAppear() {
this.isEdit = reportId !== undefined
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.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(',') || []
}
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
})
}
@State changeValue: string = '';
@State text: string = "请选择维保记录类型"
@State index: number = 2
@State space: number = 8
@State arrowPosition: ArrowPosition = ArrowPosition.END
build() {
Column(){
Scroll(){
Column(){
Column(){
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('项目名称')
}.width(90)
TextInput({placeholder: '请输入项目名称', text: $$this.addForm.reportName})
.backgroundColor('#fff').layoutWeight(1)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Text('原始记录编号一经创建,不可修改,请谨慎').fontSize(12).fontColor('#ffba00').width('100%').textAlign(TextAlign.Start)
.padding({top: 10, left: 10})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('项目编号')
}.width(90)
Row({ space: 5 }){
TextInput({placeholder: '请输入项目编号', text: $$this.addForm.reportNo})
.backgroundColor('#fff').showError(this.errorMsg).onBlur(async () => {
this.errorMsg = await queryReportNo(this.addForm.reportNo as string) ? '此原始记录编号已被使用' : ''
})
}.layoutWeight(1)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
.visibility(this.isEdit ? Visibility.None : Visibility.Visible)
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('项目编号')
}.width(90)
Row({ space: 5 }){
Text(this.addForm.reportNo).fontColor('#c0c4cc')
.fontSize(16).padding({top: 8, bottom: 8, left: 16, right: 16})
}.layoutWeight(1)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
.visibility(this.isEdit ? Visibility.Visible : Visibility.None)
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('维保起始日期')
}.width(120)
Text(this.addForm.maintenanceTime).padding({top: 8, bottom: 8, left: 16, right: 16})
.backgroundColor('#fff').layoutWeight(1).fontColor('#000').onClick(() => {
CalendarPickerDialog.show({
onAccept: (value) => {
this.addForm.maintenanceTime = JSON.stringify(value).slice(1, 11)
}
})
})
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('维保结束日期')
}.width(120)
Text(this.addForm.maintenanceEndTime).padding({top: 8, bottom: 8, left: 16, right: 16})
.backgroundColor('#fff').layoutWeight(1).fontColor('#000').onClick(() => {
CalendarPickerDialog.show({
onAccept: (value) => {
this.addForm.maintenanceEndTime = JSON.stringify(value).slice(1, 11)
}
})
})
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Column({space: 10}){
Row(){
Image($r('app.media.require')).width(20)
Text('项目负责人')
}.width('100%').justifyContent(FlexAlign.Start)
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Start, wrap: FlexWrap.Wrap }) {
ForEach(this.companyPersonList, (children: companyPersonRow) => {
Row() {
Radio({ value: children.personId.toString(), group: 'radioGroup',
indicatorType:RadioIndicatorType.TICK,
}).height(14).width(14).checked(this.addForm.approvePersonId == children.personId)
Text(children.personName).fontSize(14)
}
})
Text('公司暂无人员').visibility(this.companyPersonList.length == 0 ? Visibility.Visible : Visibility.None)
}.margin({right:15})
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Column({space: 10}){
Row(){
Image($r('app.media.require')).width(20)
Text('维保人员')
}.width('100%').justifyContent(FlexAlign.Start)
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Start, wrap: FlexWrap.Wrap }) {
Row(){
CheckboxGroup({ group: 'checkboxGroup3' })
.checkboxShape(CheckBoxShape.ROUNDED_SQUARE)
.selectedColor('#1890ff')
.onChange((itemName: CheckboxGroupResult) => {
this.addForm.maintenancePeople = itemName.name.join(',')
})
.mark({
strokeColor:Color.White,
size: 12,
strokeWidth: 2
})
.unselectedColor('#eee')
.width(15)
.height(15)
Text('选择全部').fontSize(14)
}.margin({right: 10})
ForEach(this.companyPersonList, (children: companyPersonRow) => {
Row(){
Checkbox({ name: children.personName, group: 'checkboxGroup3' })
.selectedColor('#1890ff')
.select(this.PeopleList.includes(children.personId.toString()))
.shape(CheckBoxShape.ROUNDED_SQUARE)
.onChange((value: boolean) => {
if(value){
this.addForm.maintenancePeopleList?.push(children.personId.toString())
}else {
this.addForm.maintenancePeopleList = this.addForm.maintenancePeopleList?.filter((item: string) => item !== children.personId.toString())
}
this.addForm.technicalDirectorId = this.addForm.maintenancePeopleList?.join(',')
})
.mark({
strokeColor:Color.White,
size: 12,
strokeWidth: 2
})
.unselectedColor('#eee')
.width(15)
.height(15)
Text(children.personName).fontSize(14)
}.margin({right: 10})
})
Text('公司暂无人员').visibility(this.companyPersonList.length == 0 ? Visibility.Visible : Visibility.None)
}.margin({right:15})
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Column(){
Row(){
Image($r('app.media.require')).width(20)
Text('消防设施使用管理单位')
}.justifyContent(FlexAlign.Start).width('100%')
TextInput({placeholder: '请输入消防设施管理单位', text: $$this.addForm.applyCompanyName})
.backgroundColor('#fff')
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Row(){
Text('备注')
}.width(100)
TextArea({
text: $$this.addForm.result,
placeholder: '请输入内容'
}).layoutWeight(1).height(80).borderRadius(5).backgroundColor('#fff')
.border({width: 1, color: "#eee"})
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Column(){
Row(){
Image($r('app.media.require')).width(20)
Text('维保记录类型')
}.width('100%').justifyContent(FlexAlign.Start).margin({bottom: 8})
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Start, wrap: FlexWrap.Wrap }) {
ForEach(this.recordsType, (item: quarterType) => {
Stack(){
Row() {
Radio({ value: item.dictValue, group: 'radioGroup' })
.radioStyle({ checkedBackgroundColor: '#1890ff' })
.height(15)
.width(15)
.checked(item.dictValue == this.addForm.reportType)
Text(item.dictLabel)
}.margin({right: 5,bottom: 5})
Row().width(80).height(30).backgroundColor(Color.White).opacity(0.1)
.onClick(() => {
this.addForm.reportType = item.dictValue
if(this.flag) {
this.addForm.projectList = []
this.fireFacilitiesList = []
this.addForm.fireFacilities = ''
this.flag = false
getLatestProjectList(item.dictValue).then((res: AxiosResponse<LatestProjectTest>) => {
this.latestProjectList = res.data.data
this.flag = true
})
}
})
}
})
}
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Column({space: 10}){
Row(){
Image($r('app.media.require')).width(20)
Text('主要消防设施')
}.width('100%').justifyContent(FlexAlign.Start)
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center, wrap: FlexWrap.Wrap }) {
Row(){
CheckboxGroup({ group: 'checkboxGroup' })
.checkboxShape(CheckBoxShape.ROUNDED_SQUARE)
.selectedColor('#1890ff')
.onChange((itemName: CheckboxGroupResult) => {
this.addForm.fireFacilities = itemName.name.join('、')
})
.mark({
strokeColor:Color.White,
size: 12,
strokeWidth: 2
})
.unselectedColor('#eee')
.width(15)
.height(15)
Text('选择全部').fontSize(14)
}.margin({right: 10})
ForEach(this.latestProjectList, (children: LatestProjectDatum) => {
Row(){
Checkbox({ name: children.projectName, group: 'checkboxGroup' })
.selectedColor('#1890ff')
.select(this.fireFacilitiesList.includes(children.projectName))
.shape(CheckBoxShape.ROUNDED_SQUARE)
.onChange((value) => {
if(value){
this.addForm.projectList?.push({ projectId: children.projectId })
} else {
this.addForm.projectList = this.addForm.projectList?.filter((item) => item.projectId !== children.projectId)
}
})
.mark({
strokeColor:Color.White,
size: 12,
strokeWidth: 2
})
.unselectedColor('#eee')
.width(15)
.height(15)
Text(children.projectName).fontSize(14)
}.margin({right: 10})
})
}.margin({right:15})
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Column({space: 10}){
Row(){
Row(){
Text('仪器设备')
}.margin({right: 10})
Search({ placeholder: '请输入关键字' })
.searchButton('搜索', {
fontSize: 12
})
.width('95%')
.height(30)
.backgroundColor('#fff')
.placeholderColor(Color.Grey)
.placeholderFont({ size: 12, weight: 400 })
.textFont({ size: 12, weight: 400 })
.layoutWeight(1)
.onSubmit((value) => {
if(value.trim() == '') {
this.equipmentList = this.initEquipmentList
} else {
this.equipmentList = searchByIndexOf(value, this.initEquipmentList) as equipmentType[]
}
})
}.width('100%').justifyContent(FlexAlign.Start)
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center, wrap: FlexWrap.Wrap }) {
Row(){
CheckboxGroup({ group: 'checkboxGroup2' })
.checkboxShape(CheckBoxShape.ROUNDED_SQUARE)
.selectedColor('#1890ff')
.onChange((itemName: CheckboxGroupResult) => {
this.addForm.equipmentList = itemName.name
this.addForm.equipment = itemName.name.join(',')
})
.mark({
strokeColor:Color.White,
size: 12,
strokeWidth: 2
})
.unselectedColor('#eee')
.width(15)
.height(15)
Text('选择全部').fontSize(14)
}.margin({right: 10})
ForEach(this.equipmentList, (children: equipmentType) => {
Row(){
Checkbox({ name: children.equipmentName, group: 'checkboxGroup2' })
.selectedColor('#1890ff')
.select(this.viewEquipmentList.includes(children.equipmentName))
.shape(CheckBoxShape.ROUNDED_SQUARE)
.mark({
strokeColor:Color.White,
size: 12,
strokeWidth: 2
})
.unselectedColor('#eee')
.width(15)
.height(15)
Text(children.equipmentName).fontSize(14)
}.margin({right: 10})
})
}.margin({right:15})
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
}.backgroundColor('#fff').width('100%').padding({left: 5, right: 5}).borderRadius(10)
}.padding(10).margin({bottom: 20, top: 10})
}.layoutWeight(1).scrollBar(BarState.Off)
Row(){
Text('提交').borderRadius(5).width('100%').height(30).fontColor('#fff')
.backgroundColor('#1B65FD').fontSize(14).textAlign(TextAlign.Center)
.onClick(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: '请选择维保人员'})
}
if(this.errorMsg !== '') {
return promptAction.showToast({message: '校验失败'})
}
if(!this.addForm.maintenancePeopleList?.includes(this.personId.toString())){
return promptAction.showToast({message: '本人必须在维护人员中'})
}
if(this.isEdit){
console.log(JSON.stringify(this.addForm))
await updateRecords(this.addForm)
promptAction.showToast({
message: '更新成功'
})
} else {
this.addForm.maintenanceDate = [this.addForm.maintenanceTime as string, this.addForm.maintenanceEndTime as string]
await addRecords(this.addForm)
promptAction.showToast({
message: '添加成功'
})
}
})
}.width('100%').height(40).backgroundColor('#fff').padding({left: 10, right: 10})
}.width('100%').height('100%').backgroundColor('#f2f3f7')
}
}
\ No newline at end of file
... ...
import preferencesUtil from '../utils/preferences'
import { promptAction } from '@kit.ArkUI';
import { AxiosResponse } from '@ohos/axios'
import { headerTest, headerRow, companyData } from '../api/userType'
import { getHeaderInfo, updateHeaderInfo, addHeaderInfo } from '../api/user'
let companyId = preferencesUtil.get('XF_COMPANY_ID', 65) as number
@Entry
@Component
struct EditUser {
@Builder indicatorBuilder(icon: ResourceStr) {
Image(icon)
}
@State companyInfo: companyData = {
createBy: null,
createTime: null,
updateBy: null,
updateTime: '',
remark: null,
companyId: 65,
companyName: '',
province: '',
city: '',
county: '',
address: '',
legalPerson: null,
lpTel: null,
linkMan: '',
lmTel: '',
companyTel: null,
fax: null,
postCode: null,
email: '',
website: null,
floorage: 0,
siteVoucher: '',
businessLicenseNo: '',
businessStartTime: null,
businessEndTime: null,
businessLicensePic: '',
businessScope: null,
peopleNum: 0,
companyIntroduce: null,
registeredCapital: null,
compangyPic: '',
memo: null,
state: '',
companyType: '',
isShow: null,
isValidVedio: null,
userId: 0,
username: '',
level: null,
regionCode: null,
levelModifyDate: null,
endTime: '',
}
@State isEdit: boolean = false
@State headerInfo: headerRow = {
account: '',
bank: '',
address: '',
phone: '',
companyId: '',
companyName: '',
businessLicenseNo: ''
}
async onPageShow() {
if(preferencesUtil.get('XF_COMPANY_INFO', '') !== '') {
this.companyInfo = JSON.parse(preferencesUtil.get('XF_COMPANY_INFO', '') as string)
this.headerInfo.businessLicenseNo = this.companyInfo.businessLicenseNo
this.headerInfo.companyName = this.companyInfo.companyName
}
let res: AxiosResponse<headerTest> = await getHeaderInfo({pageSize: 1, pageNum: 1, companyId: companyId})
this.isEdit = res.data.rows.length > 0
if(res.data.rows.length > 0){
this.headerInfo = res.data.rows[0]
}
}
build() {
Column(){
Column(){
Column(){
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('公司名称')
}.margin({right: 15})
Text(this.headerInfo?.companyName).layoutWeight(1).padding({top: 10, bottom: 10})
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('统一信用代码')
}.margin({right: 15})
Text(this.headerInfo?.businessLicenseNo).layoutWeight(1).padding({top: 10, bottom: 10})
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('对公账户')
}
TextInput({placeholder: '请输入对公账户', text: $$this.headerInfo.account})
.backgroundColor('#fff').layoutWeight(1).type(InputType.Number)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('开户行')
}
TextInput({placeholder: '请输入开户行', text: $$this.headerInfo.bank})
.backgroundColor('#fff').layoutWeight(1)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('公司电话')
}
TextInput({placeholder: '请输入公司电话', text: $$this.headerInfo.phone})
.backgroundColor('#fff').layoutWeight(1)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
Row(){
Row(){
Image($r('app.media.require')).width(20)
Text('公司地址')
}
TextInput({placeholder: '请输入公司地址', text: $$this.headerInfo.address})
.backgroundColor('#fff').layoutWeight(1)
}.border({width: {bottom: 1}, color: '#eee'}).padding({top: 10, bottom: 10})
}.backgroundColor('#fff').width('100%').padding({left: 5, right: 5}).borderRadius(10)
}.padding(10).margin({bottom: 20, top: 10}).width('100%').layoutWeight(1)
Row({ space: 10}){
Text('提交').borderRadius(5).layoutWeight(1).height(30).fontColor('#fff')
.backgroundColor('#1B65FD').fontSize(14).textAlign(TextAlign.Center)
.onClick(async () => {
if(this.isEdit) {
await updateHeaderInfo(this.headerInfo)
promptAction.showToast({
message: '修改成功',
duration: 2000
})
} else {
await addHeaderInfo(this.headerInfo)
promptAction.showToast({
message: '新增成功',
duration: 2000
})
}
})
}.width('100%').height(40).backgroundColor('#fff').padding({left: 10, right: 10})
}.width('100%').height('100%').backgroundColor('#f2f3f7')
}
}
\ No newline at end of file
... ...
@Entry
@Component
struct CancellationAgreement {
build() {
Scroll(){
Column({space: 10}){
Text('消防维保助手账号注销协议').textAlign(TextAlign.Center).width('100%')
Column({space: 10}){
Text('尊敬的用户,您好!在您正式开始下一步消防维保助手账号注销流程前,我们特意为您作出如下重要提示:注销消防维保助手账号是不可恢复的操作,注销消防维保助手账号后,您将无法找回您通过该账号添加或绑定的任何内容和信息,即使您选择相同的身份证号/统一社会信用代码再次注册账号并使 用消防维保助手产品及服务。').fontSize(12)
Text('为了避免给您带来不便,请您在注销消防维保助手账号之前慎重考虑,如您经过慎重考虑后仍决定注销消防维保助手账号的,请您务必先行仔细阅读并充分理解本《消防维保助手账号注销协议》(下或称“本协议”)的全部内容,特别是加粗部分。').fontSize(12)
Text('您应该具备中华人民共和国法律规定的与您签署本协议之行为相应的民事行为能力。若您不具备与您签署本协议之行为相适应的民事行为能力,请您在您的监护人陪同下阅读并进行相应操作,并确保监护人同意您的所有行为。在此情况下,您及您的监护人应依照法律相关规定承担由此导致的一切后果。').fontSize(12)
Text('本协议未尽事宜,可参照《消防维保助手隐私政策》。如本协议与前述规则存在冲突的,以本协议为准。如您对本协议有任何疑问,请发送邮件至我们的客服邮箱:【weiyi@crgx.net】。您阅读《消防维保助手账号注销协议》并点击“我已阅读并同意注销协议”的,即视为您同意与广西世纪创软信息技术有限公司达成本协议,并自愿接受本协议所有条款的约束。').fontSize(12)
Text('一、消防维保助手账号注销后您应当承担的后果').fontSize(12)
Text('您理解并同意,消防维保助手账号一旦注销,您自愿承担其所(可能)产生的后果,该等后果包括但不限于:\n' +
'1. 消防维保助手账号注销后,您将无法再以该账号登录/使用/继续使用消防维保助手产品及服务;且该账号将无法被恢复,即使您在账号注销后以相同身份证号/统一社会信用代码再次向广西世纪创软信息技术有限公司申请注册消防维保助手账号,此时该账号将默认为新的注册账号。因此,我们善意地提醒您在申请注销前对需要备份的内容和信息提前自行做好备份。\n' +
'2. 消防维保助手账号注销后,您曾通过该账号登录、使用消防维保助手产品及服务下的所有内容、信息、数据、记录将会被删除或匿名化处理(但法律法规另有规定除外),前述内容、信息、数据、记录被删除或匿名化处理后您无法再检索、访问、传输、获取、继续使用和找回,也无权要求我们找回。该等内容、信息、数据或记录包括但不限于:\n' +
'(1)该账号下您的个人信息(包括但不限于个人用户:个人照片、身份证国徽面照片、身份证人像面照片、姓名、手机号、邮箱、性别、出生日期;机构用户:公司名称、所在地区、营业执照编号、营业执照扫描件、联系人姓名、联系人手机号、联系人邮箱等);\n' +
'(2)该账号下您曾创建和编辑的内容(包括但不限于维保原始记录、确认公司从业);\n' +
'(3)该账号下的其他所有内容、信息、数据、记录。\n' +
'3. 消防维保助手账号注销后,广西世纪创软信息技术有限公司将会对该账号下的全部权益(如有)做清除处理。您理解并同意通过注销消防维保助手账号的方式放弃该账号在消防维保助手产品及服务使用期间已产生但尚未消耗完毕的权益及未来可能产生预期利益,该等权益或预期利益包括但不限于:该账号下您充值的会费未到期状态下可使用的功能等,该账号下其他已产生但尚未消耗的权益或未来可能产生的预期利益。\n' +
'4. 消防维保助手账号一旦注销,您通过该账号与我们曾签署过的相关用户协议、其他权利义务文件将相应终止,除非广西世纪创软信息技术有限公司与您已约定继续有效或法律法规另有规定。\n' +
'5. 其他因消防维保助手账号注销所(可能)产生的后果。').fontSize(12)
Text('在您向广西世纪创软信息技术有限公司申请/继续申请注销消防维保助手账号之前,为保障您的账号安全和财产权益,您应确保您申请注销的消防维保助手账号已同时具备以下条件,该等条件包括但不限于:\n' +
'1.该账号是您本人通过官方渠道进行注册的,且符合广西世纪创软信息技术有限公司所有平台规范。\n' +
'2.该账号无任何安全风险,包括但不限于1)该账号在申请注销期间无未处理完毕的(被)投诉、举报;2)该账号在申请注销期间未处于非法的被检查状态、被限制的状态;3)该账号在最近1个月内无异常登录记录、无修改密码等敏感操作;4)以及无其他安全风险。\n' +
'3.机构账号的会费权益已过期。即使该账户的会费从同意消防维保助手账号注册协议开始计算到权益终止不超过15个自然日的时间,您均同意以注销账号的方式放弃前述相关权益。\n' +
'4.不存在任何由于该账号被注销而导致的未了解的合同关系与其他基于该账号的存在而产生的或维持的权利义务,以及广西世纪创软信息技术有限公司认为注销该账号会由此产生未了结的权利义务而产生纠纷的情况。\n' +
'5.其他应满足的条件。\n' +
'您需要首先尝试自行核实并确认是否满足上述全部条件,如您无法自行处理或在处理过程中有任何疑问,可通过邮件weiyi@crgx.net联系协助处理。').fontSize(12)
Text('三、如何注销消防维保助手账号?').fontSize(12)
Text('1. 您需按照广西世纪创软信息技术有限公司官方渠道提供的操作指引进行注销操作。在消防维保助手移动端,完成注销账号的操作。\n' +
'2. 您已经仔细阅读与充分理解、且同意本《消防维保助手账号注销协议》的全部内容;同时您已自行检查并确认满足本协议的第二条项下账号注销所具备的全部条件。\n' +
'3. 在您满足本协议第三条第2款后,我们将根据您的账号安全状态以及使用情况进行初步检测,以初步判断该账号是否符合注销条件。如我们在初步判断后,发现您的账号不符和注销条件的,您的申请可能会失败,您需要在满足全部注销条件后再行申请注销。如我们对您的账号初步检测和判断后认为其初步符合注销条件的,我们将对您进行身份验证,以确保您系该账号的合法使用人,有权对该账号提交注销申请。您理解并同意,我们对您的账号是否符合注销条件可能仅做初步检测和判断,部分条件依赖于您的自行检查和确认;您确保已经自行检查并确认满足本协议第二条项下注销所需具备的全部条件,并承诺接受由此(可能)带来的所有后果。\n' +
'4. 在您通过身份验证和各项提醒并最终点击“提交注销申请”后,视为您已成功向广西世纪创软信息技术有限公司提交了消防维保助手账号注销申请,但是此并不意味着该账号必然完全符合注销条件。提交申请后,账号立即被冻结,无法正常使用,广西世纪创软信息技术有限公司会在15个工作日内,通过weiyi@crgx.net邮箱发送审核结果到您注册时填写的邮箱中。如消防维保助手账号注销申请未通过,则在收到邮件之时起,该申请注销账号恢复正常使用;如消防维保助手账号注销申请通过,则该申请注销账号将被永久注销,不得恢复。\n' +
'5. 您理解并同意,在您申请注销消防维保助手账号期间,如我们需要对相关交易、投诉或其他与您的账号相关的事项进行核实的,或者我们有其他合理的理由的,我们有权冻结您的该账号且暂时不为您提供注销服务。\n' +
'6. 您理解并同意,即使您的消防维保助手账号被注销了,也并不代表减轻或免除您理应根据相关法律法规、相关协议、规则等(可能)需要承担的法律责任。\n').fontSize(12)
Text('四、 适用法律及争议解决').fontSize(12)
Text('本协议适用中华人民共和国的法律,并且排除一切冲突法规定的适用。如出现纠纷,双方应尽量友好协商解决;协商不成时,任何乙方均有权向被告所在地人民法院提起诉讼').fontSize(12)
Text('广西世纪创软信息技术有限公司').fontSize(12)
Text('我已阅读并同意协议').width('100%').height(30).fontSize(14).fontColor('#fff').borderWidth(1).borderColor('#ff4949')
.backgroundColor('#ff4949').textAlign(TextAlign.Center).borderRadius(4)
}.alignItems(HorizontalAlign.Start)
}.width('100%').alignItems(HorizontalAlign.Start).padding(10)
}
}
}
\ No newline at end of file
... ...