Browse Source

Merge branch 'data-page-V4.3.1' into data-page

# Conflicts:
#	utils/api.js
data-page-V4.3.1
mk 2 years ago
parent
commit
369ccf21ff
  1. 1
      .cloudbase/container/debug.json
  2. 6
      README.md
  3. 26
      app.json
  4. 2
      components/Head/index.wxml
  5. 1
      components/noData/nodata.wxml
  6. BIN
      images/add.png
  7. BIN
      images/home/information.png
  8. BIN
      images/home/informationSelected.png
  9. BIN
      images/home/message.png
  10. BIN
      images/home/messageSelected.png
  11. BIN
      images/home/mine.png
  12. BIN
      images/home/mineSelected.png
  13. BIN
      images/home/resiAndHouse.png
  14. BIN
      images/home/resiAndHouseSelected.png
  15. BIN
      images/home/work.png
  16. BIN
      images/home/workSelected.png
  17. BIN
      images/icon_close.png
  18. BIN
      images/ig_tianjiatupian@2x.png
  19. BIN
      images/location.png
  20. BIN
      images/statistics/icon-back.png
  21. BIN
      images/work2/add_houses.png
  22. BIN
      images/work2/add_record.png
  23. BIN
      images/work2/add_resident.png
  24. BIN
      images/work2/data.png
  25. BIN
      images/work2/rep_record.png
  26. BIN
      images/work2/reporting.png
  27. BIN
      images/work2/satisfaction.png
  28. BIN
      images/work2/slices.png
  29. BIN
      images/work2/work2.png
  30. BIN
      images/xuncha.png
  31. 116
      libs/jsencrypt/lib/JSEncrypt.d.ts
  32. 142
      libs/jsencrypt/lib/JSEncryptRSAKey.d.ts
  33. 3
      libs/jsencrypt/lib/index.d.ts
  34. 51
      libs/jsencrypt/lib/lib/asn1js/asn1.d.ts
  35. 5
      libs/jsencrypt/lib/lib/asn1js/base64.d.ts
  36. 3
      libs/jsencrypt/lib/lib/asn1js/hex.d.ts
  37. 9
      libs/jsencrypt/lib/lib/asn1js/int10.d.ts
  38. 9778
      libs/jsencrypt/lib/lib/asn1js/oids.d.ts
  39. 3
      libs/jsencrypt/lib/lib/jsbn/base64.d.ts
  40. 98
      libs/jsencrypt/lib/lib/jsbn/jsbn.d.ts
  41. 10
      libs/jsencrypt/lib/lib/jsbn/prng4.d.ts
  42. 3
      libs/jsencrypt/lib/lib/jsbn/rng.d.ts
  43. 23
      libs/jsencrypt/lib/lib/jsbn/rsa.d.ts
  44. 7
      libs/jsencrypt/lib/lib/jsbn/util.d.ts
  45. 19
      pages/resiAndHouse/resiAndHouse.js
  46. 22
      pages/resiAndHouse/resiAndHouse.wxml
  47. 47
      pages/resiAndHouse/resiAndHouse.wxss
  48. 5
      pages/work2/work2.js
  49. 6
      pages/work2/work2.wxml
  50. 2
      pages/work2/work2.wxss
  51. 37
      project.private.config.json
  52. 601
      subpages/InspectionReport/pages/InspectionReport/InspectionReport.js
  53. 13
      subpages/InspectionReport/pages/InspectionReport/InspectionReport.json
  54. 155
      subpages/InspectionReport/pages/InspectionReport/InspectionReport.wxml
  55. 504
      subpages/InspectionReport/pages/InspectionReport/InspectionReport.wxss
  56. 9
      subpages/addhouse/pages/addhouse/addhouse.wxss
  57. 4
      subpages/communitySelfInsp/pages/followUpList/followUpList.json
  58. 2970
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js
  59. 2
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml
  60. 2
      subpages/house/pages/housePortrait/housePortrait.wxml
  61. 500
      subpages/safetyinspection/pages/safetyinspection/safetyinspection.js
  62. 15
      subpages/safetyinspection/pages/safetyinspection/safetyinspection.json
  63. 165
      subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml
  64. 453
      subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxss
  65. 183
      subpages/securityCheck/pages/securityCheck.js
  66. 4
      subpages/securityCheck/pages/securityCheck.json
  67. 54
      subpages/securityCheck/pages/securityCheck.wxml
  68. 185
      subpages/securityCheck/pages/securityCheck.wxss
  69. 22
      utils/api.js

1
.cloudbase/container/debug.json

@ -0,0 +1 @@
{"containers":[],"config":{}}

6
README.md

@ -10,4 +10,8 @@
12345678
18900000002
12345678
12345678
17637262085
Makui240345
13215601578
287504

26
app.json

@ -11,8 +11,7 @@
"pages/statistics/statistics",
"pages/resiAndHouse/resiAndHouse",
"pages/setup/setup",
"subpages/house/pages/housePortrait/housePortrait",
"subpages/businessRecord/businessRecord"
"subpages/house/pages/housePortrait/housePortrait"
],
"subPackages": [
{
@ -22,6 +21,29 @@
"pages/addhouse/addhouse"
]
},
{
"root": "subpages/safetyinspection",
"name": "safetyinspection",
"pages": [
"pages/safetyinspection/safetyinspection"
]
},
{
"root": "subpages/InspectionReport",
"name": "InspectionReport",
"pages": [
"pages/InspectionReport/InspectionReport"
]
},
{
"root": "subpages/securityCheck",
"name": "securityCheck",
"pages": [
"pages/securityCheck"
]
},
{
"root": "subpages/morenews",
"name": "morenews",

2
components/Head/index.wxml

@ -5,7 +5,7 @@
<view class="back-nav" wx:if="{{isBack}}">
<view class="con" style="width: {{leftWidth}}px">
<view style="width: {{iconWidth}}px">
<image class="icon back" bind:tap="back" src="../../images/statistics/icon-back.png" mode="widthFix"/>
<image class="icon back" bind:tap="back" src="../../images/back.png" mode="widthFix"/>
</view>
<view class="text">
{{text}}

1
components/noData/nodata.wxml

@ -1,6 +1,5 @@
<!--components/nodata/nodata.wxml-->
<view class="box" wx:if="{{isShow}}" style="margin-top:{{top?'400rpx':''}}">
<!-- <image src="../../images/nodata.png" class="image"/> -->
<text class="text">暂无数据~</text>
</view>

BIN
images/add.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
images/home/information.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/home/informationSelected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
images/home/message.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/home/messageSelected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/home/mine.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/home/mineSelected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
images/home/resiAndHouse.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/home/resiAndHouseSelected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/home/work.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
images/home/workSelected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
images/icon_close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
images/ig_tianjiatupian@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
images/location.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
images/statistics/icon-back.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 B

BIN
images/work2/add_houses.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
images/work2/add_record.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
images/work2/add_resident.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
images/work2/data.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
images/work2/rep_record.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
images/work2/reporting.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
images/work2/satisfaction.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
images/work2/slices.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

BIN
images/work2/work2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
images/xuncha.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

116
libs/jsencrypt/lib/JSEncrypt.d.ts

@ -1,116 +0,0 @@
import { JSEncryptRSAKey } from "./JSEncryptRSAKey";
export interface IJSEncryptOptions {
default_key_size?: string;
default_public_exponent?: string;
log?: boolean;
}
/**
*
* @param {Object} [options = {}] - An object to customize JSEncrypt behaviour
* possible parameters are:
* - default_key_size {number} default: 1024 the key size in bit
* - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent
* - log {boolean} default: false whether log warn/error or not
* @constructor
*/
export declare class JSEncrypt {
constructor(options?: IJSEncryptOptions);
private default_key_size;
private default_public_exponent;
private log;
private key;
static version: string;
/**
* Method to set the rsa key parameter (one method is enough to set both the public
* and the private key, since the private key contains the public key paramenters)
* Log a warning if logs are enabled
* @param {Object|string} key the pem encoded string or an object (with or without header/footer)
* @public
*/
setKey(key: string): void;
/**
* Proxy method for setKey, for api compatibility
* @see setKey
* @public
*/
setPrivateKey(privkey: string): void;
/**
* Proxy method for setKey, for api compatibility
* @see setKey
* @public
*/
setPublicKey(pubkey: string): void;
/**
* Proxy method for RSAKey object's decrypt, decrypt the string using the private
* components of the rsa key object. Note that if the object was not set will be created
* on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
* @param {string} str base64 encoded crypted string to decrypt
* @return {string} the decrypted string
* @public
*/
decrypt(str: string): string | false;
/**
* Proxy method for RSAKey object's encrypt, encrypt the string using the public
* components of the rsa key object. Note that if the object was not set will be created
* on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
* @param {string} str the string to encrypt
* @return {string} the encrypted string encoded in base64
* @public
*/
encrypt(str: string): string | false;
/**
* Proxy method for RSAKey object's sign.
* @param {string} str the string to sign
* @param {function} digestMethod hash method
* @param {string} digestName the name of the hash algorithm
* @return {string} the signature encoded in base64
* @public
*/
sign(str: string, digestMethod: (str: string) => string, digestName: string): string | false;
/**
* Proxy method for RSAKey object's verify.
* @param {string} str the string to verify
* @param {string} signature the signature encoded in base64 to compare the string to
* @param {function} digestMethod hash method
* @return {boolean} whether the data and signature match
* @public
*/
verify(str: string, signature: string, digestMethod: (str: string) => string): boolean;
/**
* Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object
* will be created and returned
* @param {callback} [cb] the callback to be called if we want the key to be generated
* in an async fashion
* @returns {JSEncryptRSAKey} the JSEncryptRSAKey object
* @public
*/
getKey(cb?: () => void): JSEncryptRSAKey;
/**
* Returns the pem encoded representation of the private key
* If the key doesn't exists a new key will be created
* @returns {string} pem encoded representation of the private key WITH header and footer
* @public
*/
getPrivateKey(): string;
/**
* Returns the pem encoded representation of the private key
* If the key doesn't exists a new key will be created
* @returns {string} pem encoded representation of the private key WITHOUT header and footer
* @public
*/
getPrivateKeyB64(): string;
/**
* Returns the pem encoded representation of the public key
* If the key doesn't exists a new key will be created
* @returns {string} pem encoded representation of the public key WITH header and footer
* @public
*/
getPublicKey(): string;
/**
* Returns the pem encoded representation of the public key
* If the key doesn't exists a new key will be created
* @returns {string} pem encoded representation of the public key WITHOUT header and footer
* @public
*/
getPublicKeyB64(): string;
}

142
libs/jsencrypt/lib/JSEncryptRSAKey.d.ts

@ -1,142 +0,0 @@
import { RSAKey } from "./lib/jsbn/rsa";
/**
* Create a new JSEncryptRSAKey that extends Tom Wu's RSA key object.
* This object is just a decorator for parsing the key parameter
* @param {string|Object} key - The key in string format, or an object containing
* the parameters needed to build a RSAKey object.
* @constructor
*/
export declare class JSEncryptRSAKey extends RSAKey {
constructor(key?: string);
/**
* Method to parse a pem encoded string containing both a public or private key.
* The method will translate the pem encoded string in a der encoded string and
* will parse private key and public key parameters. This method accepts public key
* in the rsaencryption pkcs #1 format (oid: 1.2.840.113549.1.1.1).
*
* @todo Check how many rsa formats use the same format of pkcs #1.
*
* The format is defined as:
* PublicKeyInfo ::= SEQUENCE {
* algorithm AlgorithmIdentifier,
* PublicKey BIT STRING
* }
* Where AlgorithmIdentifier is:
* AlgorithmIdentifier ::= SEQUENCE {
* algorithm OBJECT IDENTIFIER, the OID of the enc algorithm
* parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)
* }
* and PublicKey is a SEQUENCE encapsulated in a BIT STRING
* RSAPublicKey ::= SEQUENCE {
* modulus INTEGER, -- n
* publicExponent INTEGER -- e
* }
* it's possible to examine the structure of the keys obtained from openssl using
* an asn.1 dumper as the one used here to parse the components: http://lapo.it/asn1js/
* @argument {string} pem the pem encoded string, can include the BEGIN/END header/footer
* @private
*/
parseKey(pem: string): boolean;
/**
* Translate rsa parameters in a hex encoded string representing the rsa key.
*
* The translation follow the ASN.1 notation :
* RSAPrivateKey ::= SEQUENCE {
* version Version,
* modulus INTEGER, -- n
* publicExponent INTEGER, -- e
* privateExponent INTEGER, -- d
* prime1 INTEGER, -- p
* prime2 INTEGER, -- q
* exponent1 INTEGER, -- d mod (p1)
* exponent2 INTEGER, -- d mod (q-1)
* coefficient INTEGER, -- (inverse of q) mod p
* }
* @returns {string} DER Encoded String representing the rsa private key
* @private
*/
getPrivateBaseKey(): string;
/**
* base64 (pem) encoded version of the DER encoded representation
* @returns {string} pem encoded representation without header and footer
* @public
*/
getPrivateBaseKeyB64(): string;
/**
* Translate rsa parameters in a hex encoded string representing the rsa public key.
* The representation follow the ASN.1 notation :
* PublicKeyInfo ::= SEQUENCE {
* algorithm AlgorithmIdentifier,
* PublicKey BIT STRING
* }
* Where AlgorithmIdentifier is:
* AlgorithmIdentifier ::= SEQUENCE {
* algorithm OBJECT IDENTIFIER, the OID of the enc algorithm
* parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)
* }
* and PublicKey is a SEQUENCE encapsulated in a BIT STRING
* RSAPublicKey ::= SEQUENCE {
* modulus INTEGER, -- n
* publicExponent INTEGER -- e
* }
* @returns {string} DER Encoded String representing the rsa public key
* @private
*/
getPublicBaseKey(): string;
/**
* base64 (pem) encoded version of the DER encoded representation
* @returns {string} pem encoded representation without header and footer
* @public
*/
getPublicBaseKeyB64(): string;
/**
* wrap the string in block of width chars. The default value for rsa keys is 64
* characters.
* @param {string} str the pem encoded string without header and footer
* @param {Number} [width=64] - the length the string has to be wrapped at
* @returns {string}
* @private
*/
static wordwrap(str: string, width?: number): string;
/**
* Retrieve the pem encoded private key
* @returns {string} the pem encoded private key with header/footer
* @public
*/
getPrivateKey(): string;
/**
* Retrieve the pem encoded public key
* @returns {string} the pem encoded public key with header/footer
* @public
*/
getPublicKey(): string;
/**
* Check if the object contains the necessary parameters to populate the rsa modulus
* and public exponent parameters.
* @param {Object} [obj={}] - An object that may contain the two public key
* parameters
* @returns {boolean} true if the object contains both the modulus and the public exponent
* properties (n and e)
* @todo check for types of n and e. N should be a parseable bigInt object, E should
* be a parseable integer number
* @private
*/
static hasPublicKeyProperty(obj: object): boolean;
/**
* Check if the object contains ALL the parameters of an RSA key.
* @param {Object} [obj={}] - An object that may contain nine rsa key
* parameters
* @returns {boolean} true if the object contains all the parameters needed
* @todo check for types of the parameters all the parameters but the public exponent
* should be parseable bigint objects, the public exponent should be a parseable integer number
* @private
*/
static hasPrivateKeyProperty(obj: object): boolean;
/**
* Parse the properties of obj in the current rsa object. Obj should AT LEAST
* include the modulus and public exponent (n, e) parameters.
* @param {Object} obj - the object containing rsa parameters
* @private
*/
parsePropertiesFrom(obj: any): void;
}

3
libs/jsencrypt/lib/index.d.ts

@ -1,3 +0,0 @@
import { JSEncrypt } from './JSEncrypt';
export { JSEncrypt };
export default JSEncrypt;

51
libs/jsencrypt/lib/lib/asn1js/asn1.d.ts

@ -1,51 +0,0 @@
import { Int10 } from "./int10";
export declare class Stream {
constructor(enc: Stream | number[], pos?: number);
private enc;
pos: number;
get(pos?: number): number;
hexDigits: string;
hexByte(b: number): string;
hexDump(start: number, end: number, raw: boolean): string;
isASCII(start: number, end: number): boolean;
parseStringISO(start: number, end: number): string;
parseStringUTF(start: number, end: number): string;
parseStringBMP(start: number, end: number): string;
parseTime(start: number, end: number, shortYear: boolean): string;
parseInteger(start: number, end: number): string | 0 | -1;
parseBitString(start: number, end: number, maxLength: number): string;
parseOctetString(start: number, end: number, maxLength: number): string;
parseOID(start: number, end: number, maxLength: number): string;
}
export declare class ASN1 {
constructor(stream: Stream, header: number, length: number, tag: ASN1Tag, sub: ASN1[]);
private stream;
private header;
private length;
private tag;
sub: ASN1[];
typeName(): string;
content(maxLength: number): string | 0 | -1;
toString(): string;
toPrettyString(indent: string): string;
posStart(): number;
posContent(): number;
posEnd(): number;
toHexString(): string;
static decodeLength(stream: Stream): number;
/**
* Retrieve the hexadecimal value (as a string) of the current ASN.1 element
* @returns {string}
* @public
*/
getHexStringValue(): string;
static decode(str: Stream | number[]): ASN1;
}
export declare class ASN1Tag {
constructor(stream: Stream);
tagClass: number;
tagConstructed: boolean;
tagNumber: number | Int10;
isUniversal(): boolean;
isEOC(): boolean;
}

5
libs/jsencrypt/lib/lib/asn1js/base64.d.ts

@ -1,5 +0,0 @@
export declare const Base64: {
decode(a: string): number[];
re: RegExp;
unarmor(a: string): number[];
};

3
libs/jsencrypt/lib/lib/asn1js/hex.d.ts

@ -1,3 +0,0 @@
export declare const Hex: {
decode(a: string): number[];
};

9
libs/jsencrypt/lib/lib/asn1js/int10.d.ts

@ -1,9 +0,0 @@
export declare class Int10 {
constructor(value?: string | number);
mulAdd(m: number, c: number): void;
sub(c: number): void;
toString(base?: number): string;
valueOf(): number;
simplify(): number | this;
private buf;
}

9778
libs/jsencrypt/lib/lib/asn1js/oids.d.ts

File diff suppressed because it is too large

3
libs/jsencrypt/lib/lib/jsbn/base64.d.ts

@ -1,3 +0,0 @@
export declare function hex2b64(h: string): string;
export declare function b64tohex(s: string): string;
export declare function b64toBA(s: string): number[];

98
libs/jsencrypt/lib/lib/jsbn/jsbn.d.ts

@ -1,98 +0,0 @@
import { SecureRandom } from "./rng";
export declare class BigInteger {
constructor(a: number | number[] | string, b?: number | SecureRandom, c?: number | SecureRandom);
toString(b: number): string;
protected negate(): BigInteger;
abs(): BigInteger;
compareTo(a: BigInteger): number;
bitLength(): number;
mod(a: BigInteger): BigInteger;
modPowInt(e: number, m: BigInteger): BigInteger;
protected clone(): BigInteger;
protected intValue(): number;
protected byteValue(): number;
protected shortValue(): number;
protected signum(): 0 | 1 | -1;
toByteArray(): number[];
protected equals(a: BigInteger): boolean;
protected min(a: BigInteger): BigInteger;
protected max(a: BigInteger): BigInteger;
protected and(a: BigInteger): BigInteger;
protected or(a: BigInteger): BigInteger;
protected xor(a: BigInteger): BigInteger;
protected andNot(a: BigInteger): BigInteger;
protected not(): BigInteger;
protected shiftLeft(n: number): BigInteger;
protected shiftRight(n: number): BigInteger;
protected getLowestSetBit(): number;
protected bitCount(): number;
protected testBit(n: number): boolean;
protected setBit(n: number): BigInteger;
protected clearBit(n: number): BigInteger;
protected flipBit(n: number): BigInteger;
add(a: BigInteger): BigInteger;
subtract(a: BigInteger): BigInteger;
multiply(a: BigInteger): BigInteger;
divide(a: BigInteger): BigInteger;
protected remainder(a: BigInteger): BigInteger;
protected divideAndRemainder(a: BigInteger): BigInteger[];
modPow(e: BigInteger, m: BigInteger): BigInteger;
modInverse(m: BigInteger): BigInteger;
protected pow(e: number): BigInteger;
gcd(a: BigInteger): BigInteger;
isProbablePrime(t: number): boolean;
copyTo(r: BigInteger): void;
fromInt(x: number): void;
protected fromString(s: string | number[], b: number): void;
clamp(): void;
dlShiftTo(n: number, r: BigInteger): void;
drShiftTo(n: number, r: BigInteger): void;
protected lShiftTo(n: number, r: BigInteger): void;
protected rShiftTo(n: number, r: BigInteger): void;
subTo(a: BigInteger, r: BigInteger): void;
multiplyTo(a: BigInteger, r: BigInteger): void;
squareTo(r: BigInteger): void;
divRemTo(m: BigInteger, q: BigInteger, r: BigInteger): void;
invDigit(): number;
protected isEven(): boolean;
protected exp(e: number, z: IReduction): BigInteger;
protected chunkSize(r: number): number;
protected toRadix(b: number): string;
fromRadix(s: string, b: number): void;
protected fromNumber(a: number, b: number | SecureRandom, c?: number | SecureRandom): void;
protected bitwiseTo(a: BigInteger, op: (a: number, b: number) => number, r: BigInteger): void;
protected changeBit(n: number, op: (a: number, b: number) => number): BigInteger;
protected addTo(a: BigInteger, r: BigInteger): void;
protected dMultiply(n: number): void;
dAddOffset(n: number, w: number): void;
multiplyLowerTo(a: BigInteger, n: number, r: BigInteger): void;
multiplyUpperTo(a: BigInteger, n: number, r: BigInteger): void;
protected modInt(n: number): number;
protected millerRabin(t: number): boolean;
protected square(): BigInteger;
gcda(a: BigInteger, callback: (x: BigInteger) => void): void;
fromNumberAsync(a: number, b: number | SecureRandom, c: number | SecureRandom, callback: () => void): void;
s: number;
t: number;
DB: number;
DM: number;
DV: number;
FV: number;
F1: number;
F2: number;
am: (i: number, x: number, w: BigInteger, j: number, c: number, n: number) => number;
[index: number]: number;
static ONE: BigInteger;
static ZERO: BigInteger;
}
export interface IReduction {
convert(x: BigInteger): BigInteger;
revert(x: BigInteger): BigInteger;
mulTo(x: BigInteger, y: BigInteger, r: BigInteger): void;
sqrTo(x: BigInteger, r: BigInteger): void;
}
export declare function nbi(): BigInteger;
export declare function parseBigInt(str: string, r: number): BigInteger;
export declare function intAt(s: string, i: number): number;
export declare function nbv(i: number): BigInteger;
export declare function nbits(x: number): number;

10
libs/jsencrypt/lib/lib/jsbn/prng4.d.ts

@ -1,10 +0,0 @@
export declare class Arcfour {
constructor();
init(key: number[]): void;
next(): number;
private i;
private j;
private S;
}
export declare function prng_newstate(): Arcfour;
export declare let rng_psize: number;

3
libs/jsencrypt/lib/lib/jsbn/rng.d.ts

@ -1,3 +0,0 @@
export declare class SecureRandom {
nextBytes(ba: number[]): void;
}

23
libs/jsencrypt/lib/lib/jsbn/rsa.d.ts

@ -1,23 +0,0 @@
import { BigInteger } from "./jsbn";
export declare class RSAKey {
constructor();
doPublic(x: BigInteger): BigInteger;
doPrivate(x: BigInteger): BigInteger;
setPublic(N: string, E: string): void;
encrypt(text: string): string;
setPrivate(N: string, E: string, D: string): void;
setPrivateEx(N: string, E: string, D: string, P: string, Q: string, DP: string, DQ: string, C: string): void;
generate(B: number, E: string): void;
decrypt(ctext: string): string;
generateAsync(B: number, E: string, callback: () => void): void;
sign(text: string, digestMethod: (str: string) => string, digestName: string): string;
verify(text: string, signature: string, digestMethod: (str: string) => string): boolean;
protected n: BigInteger;
protected e: number;
protected d: BigInteger;
protected p: BigInteger;
protected q: BigInteger;
protected dmp1: BigInteger;
protected dmq1: BigInteger;
protected coeff: BigInteger;
}

7
libs/jsencrypt/lib/lib/jsbn/util.d.ts

@ -1,7 +0,0 @@
export declare function int2char(n: number): string;
export declare function op_and(x: number, y: number): number;
export declare function op_or(x: number, y: number): number;
export declare function op_xor(x: number, y: number): number;
export declare function op_andnot(x: number, y: number): number;
export declare function lbit(x: number): number;
export declare function cbit(x: number): number;

19
pages/resiAndHouse/resiAndHouse.js

@ -80,7 +80,14 @@ Page({
{ name: '未出售', num: 0, value: '3' },
],
tempList:[],
angencyJmList:[]
angencyJmList:[],
houseListSearchFlag:false
},
handelClickedit(e){
console.log(e);
wx.navigateTo({
url: `/subpages/house/pages/housePortrait/housePortrait?resiId=${e.currentTarget.dataset.item.id}`,
})
},
/**
* 生命周期函数--监听页面加载
@ -409,6 +416,16 @@ Page({
this.getTableData()
this.getAllOrgCategoryCount()
}else{
if(this.data.keyWord){
this.setData({
houseListSearchFlag:true,
'params1.searchOrgIdPath':App.globalData.user.agencyId
})
}else{
this.setData({
houseListSearchFlag:false
})
}
this.setData({
pageNo: 1,
tableFwData: []

22
pages/resiAndHouse/resiAndHouse.wxml

@ -94,7 +94,7 @@
<view class="group_2" wx:if="{{selectVale === 'house'}}">
<view class="section_2">
<view class="box_16">
<view class="box_16" wx:if="{{!houseListSearchFlag}}">
<text lines="1" class="text_4" bind:tap="handelClickShowTreeFw">{{cascaderNameFw}}</text>
<view class="image-text_9">
<view class="image-text_qh">
@ -103,7 +103,7 @@
</view>
</view>
</view>
<view class="box_17">
<view class="box_17" wx:if="{{!houseListSearchFlag}}">
<view class="tabs">
<view class="tab_item_fw {{activeFwType === index ? 'border_bto' : ''}}" wx:for="{{fwTypes}}" bind:tap="handelClickTabFw" data-index="{{index}}" data-category="{{item.value}}">
<view class="num">{{item.num}}</view>
@ -111,7 +111,7 @@
</view>
</view>
</view>
<view style="margin-left: 24rpx;margin-top: 47rpx;">
<view style="margin-left: 24rpx;margin-top: 47rpx;" wx:if="{{!houseListSearchFlag}}">
<text class="text_51">注:</text>
<image src="../../images/house/zzMin.png" class="image_81"></image>
<text lines="1" class="text_51" bind:tap="handelClickShowTreeFw">自住</text>
@ -122,8 +122,8 @@
<image src="../../images/house/wcsMin.png" class="image_81 image_82"></image>
<text lines="1" class="text_51" bind:tap="handelClickShowTreeFw">未出售</text>
</view>
<scroll-view class="scroll_fw form_item_fw" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollFwToLower">
<view class="form_item_fw">
<scroll-view class="{{houseListSearchFlag?'scroll_fw_search':'scroll_fw'}} form_item_fw" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollFwToLower">
<view class="form_item_fw" wx:if="{{!houseListSearchFlag}}">
<view wx:for="{{tableFwData}}" :wx:key="{{index}}" bind:tap="onClickJump" data-resiId="{{item.id}}" class="form_item_fw_item">
<view class="item_fw">
<view class="item_imgs_fw">
@ -141,7 +141,17 @@
</view>
</view>
</view>
<load-more loadVisible="{{loadFwMoreVisible}}" loadType="{{loadFwMoreType}}"></load-more>
<view class="card" wx:else>
<view class="list_card" wx:for="{{tableFwData}}" wx:key="index" data-item="{{item}}" bind:tap="handelClickedit">
<view class="left">
<view>{{item.quartersName+item.buildingName+item.buildingUnitName + item.houseName}}</view>
</view>
<view class="right">
<image src="../../images/right.png" mode=""/>
</view>
</view>
</view>
<load-more loadVisible="{{loadFwMoreVisible}}" loadType="{{loadFwMoreType}}" wx:if="{{!nodatafw}}"></load-more>
<no-data isShow="{{nodatafw}}" wx:if="{{nodatafw}}"></no-data>
</scroll-view>
</view>

47
pages/resiAndHouse/resiAndHouse.wxss

@ -1395,6 +1395,9 @@ page {
.scroll_fw {
height: calc(100vh - 750rpx);
}
.scroll_fw_search{
height: calc(100vh - 460rpx);
}
.loadVisible{
color: #c1c1c1;
font-size: 24rpx;
@ -1553,4 +1556,48 @@ page {
.huang{
color: #fcac00;
background-color: #fff3db;
}
.card{
background-color: #fff;
border-radius: 0 0 20rpx 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
}
.card .list_card{
display: flex;
justify-content: space-around;
padding: 30rpx 0;
align-items: center;
color: #333333;
border-top: 1px solid #EAEAEA;
}
.card .list_card .left{
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.card .list_card .left :nth-child(1),
.card .list_card .left :nth-child(2){
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.card .list_card .left .address{
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
margin-top: 20rpx;
}
.list_card .right image{
width: 20rpx;
height: 20rpx;
}

5
pages/work2/work2.js

@ -115,8 +115,9 @@ Page({
})
},
onData(){
wx.switchTab({
url:'../../pages/statistics/statistics'
// wx.switchTab({
wx.navigateTo({
url: '/subpages/securityCheck/pages/securityCheck'
})
}
// onAddHouse(){

6
pages/work2/work2.wxml

@ -60,13 +60,13 @@
</view>
<view class="section_1-0">
<view class="text-wrapper_7-0">
<text lines="1" class="text_2-0">数据</text>
<text lines="1" class="text_2-0">安检管理</text>
</view>
<view class="content_1" bind:tap="onData">
<view>
<image src="/images/work2/data.png" class="image_15">
<image src="/images/work2/slices.png" class="image_15">
</image>
<text lines="1" class="text_13" >数据</text>
<text lines="1" class="text_13" >安检巡查</text>
</view>
</view>

2
pages/work2/work2.wxss

@ -28,7 +28,7 @@
}
.header {
display: flex;
background: #1673ee;
background: #1974ec;
width: 100%;
height: 400rpx;
flex-direction: column;

37
project.private.config.json

@ -9,6 +9,31 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "房屋搜索",
"pathName": "subpages/searchResult/pages/searchResult/searchResult",
"query": "type=house&keyword=101",
"launchMode": "default",
"scene": null
},
{
"name": "巡查上报",
"pathName": "subpages/InspectionReport/pages/InspectionReport/InspectionReport",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "subpages/safetyinspection/pages/safetyinspection/safetyinspection",
"pathName": "subpages/safetyinspection/pages/safetyinspection/safetyinspection",
"query": "",
"launchMode": "default",
"scene": null,
"partialCompile": {
"enabled": true,
"pages": []
}
},
{
"name": "subpages/communitySelfInsp/pages/historyQuery/historyQuery",
"pathName": "subpages/communitySelfInsp/pages/historyQuery/historyQuery",
@ -254,18 +279,6 @@
"pathName": "subpages/gatherInformation/pages/gatherInformation/gatherInformation",
"query": "",
"scene": null
},
{
"name": "",
"pathName": "subpages/searchResult/pages/ceshi/ceshi",
"query": "resiId=1704759138283409410",
"scene": null
},
{
"name": "",
"pathName": "subpages/searchResult/pages/cheshi/cheshi",
"query": "resiId=1704759138283409410",
"scene": null
}
]
}

601
subpages/InspectionReport/pages/InspectionReport/InspectionReport.js

@ -0,0 +1,601 @@
import {
$wuxActionSheet
} from '../../../../components/dist/index'
const config = require('../../../../utils/config')
const QQMapWX = require('../../../../utils/qqmap-wx-jssdk')
const App = getApp()
import {
addRecord,
securityCheckk,
inspectionStaff
} from "../../../../utils/api"
Page({
/**
* 页面的初始数据
*/
data: {
hiddenDangeList: [],
newObj:[],
addRecord: [],
attachmentUrl: '',
reviewTime: '',
checkResultFlag: '',
checkPersonsIdList: [],
pageNo: 1,
pageSize: 10,
id: 0,
addressContent: '',
fmData: {
gridId: '',
attachmentList: [], //图片
voiceList: [],
latitude: "",
longitude: "",
resiId: "",
happenTime: "",
content: "", //内容
address: "", //地址
checkPersons: ''
},
imageUrl: '',
remarks: '', //备注
getData: '',
checkResultName: '',
array: ['不合格', '合格'], // 选择器的数据源
arrlist: [],
fileList: [],
companyId: '',
showPopup: false, // 控制弹出层显示/隐藏的状态
selectedOptions: [], // 选中的复选框项
selectedNames: [], //显示检察人员
// 用于存放复选框选择的结果
result: [],
// 用于存放输入框的值
hazardDesc: '',
hazardDesc2:'',
uploadImageList: [],
imageId: 1,
arr: [],
arr1: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
companyId: options.resiId
})
this.data.qqMapWX = new QQMapWX({
key: 'CMJBZ-4DECI-JXGGN-5B4WU-QLV2H-B5BEJ'
})
this.reverseLocation()
this.getList()
},
getCurrentDateTime() {
const now = new Date();
const year = now.getFullYear();
const month = (now.getMonth() + 1).toString().padStart(2, '0');
const day = now.getDate().toString().padStart(2, '0');
const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0');
const seconds = now.getSeconds().toString().padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
},
submitBiao() {
if(!this.data.companyId){
wx.showToast({
title: '请选择企业',
icon:'none'
})
return false
}
if(this.data.selectedOptions.length === 0){
wx.showToast({
title: '请选择检查人员',
icon:'none'
})
return false
}
if(!this.data.checkResultFlag){
wx.showToast({
title: '请选择检查结论',
icon:'none'
})
return false
}
if(this.data.checkResultFlag == 0 && !this.data.reviewTime){
wx.showToast({
title: '请选择拟复查时间',
icon:'none'
})
return false
}
if(this.data.checkResultFlag == 0 && this.data.hiddenDangeList.length<0){
wx.showToast({
title: '请填写隐患明细',
icon:'none'
})
return false
}
const now = new Date();
const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0');
const seconds = now.getSeconds().toString().padStart(2, '0');
addRecord({
companyId: this.data.companyId,
checkTime: this.getCurrentDateTime(),
checkPersonsIdList: this.data.checkPersonsIdList,
checkResultFlag: this.data.checkResultFlag,
reviewTime:`${this.data.reviewTime} ${hours}:${minutes}:${seconds}`,
hiddenDangeList:[...this.data.hiddenDangeList,{hazardStatus:2,hazardDesc:this.data.hazardDesc2}] ,
attachmentUrls:this.data.uploadImageList.map(item=>({fileName:item.originFileName,attachmentUrl:item.ossUrl.url})),
remark: '',
reviewAddress:this.data.addressContent
}).then(
res => {
if(res.code == 0){
wx.showToast({
title: '新增成功',
duration:2000,
success:function(){
setTimeout(()=>{
wx.navigateBack({
delta: 1
})
},2000)
}
})
}
});
},
getList() {
securityCheckk({
pageNo: this.data.pageNo,
pageSize: this.data.pageSize,
}).then(({
data
}) => {
console.log(data)
this.setData({
companyList: data.list,
});
});
inspectionStaff({
orgId: App.globalData.user.agencyId,
orgType: 'agency',
pageNo: 1,
pageSize: 100
}).then(({
data
}) => {
this.setData({
arr: data.staffList
})
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.reverseLocation
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
onChange(event) {
console.log("111", event)
this.setData({
result: event.detail
});
console.log(this.data.result);
console.log(this.data.hiddenDangeList);
},
afterRead(event) {
const {
file
} = event.detail;
console.log(file)
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
wx.uploadFile({
url: 'https://example.weixin.qq.com/upload', // 仅为示例,非真实的接口地址
filePath: file.url,
name: 'file',
formData: {
user: 'test'
},
success(res) {
// 上传完成需要更新 fileList
const {
fileList = []
} = this.data;
fileList.push({
...file,
url: res.data
});
this.setData({
fileList
});
},
});
},
showPopup() {
this.setData({
showPopup: true
}); // 点击按钮显示弹出层
},
onClose() {
let names = []
this.data.arr.forEach(item=>{
if(this.data.selectedOptions.findIndex(itemC=>itemC === item.staffId) != -1){
names.push(item.name)
}
})
this.setData({
showPopup: false,
selectedNames: names,
checkPersonsIdList:this.data.selectedOptions
}); // 关闭弹出层
},
onChange1(event) {
console.log(event)
this.setData({
selectedOptions: event.detail
});
console.log(this.data.selectedOptions)
},
confirmSelection() {
// 点击确定按钮后触发,处理选中的复选框项
console.log("选中的项:", this.data.selectedOptions);
let names = []
this.data.arr.forEach(item=>{
if(this.data.selectedOptions.findIndex(itemC=>itemC === item.staffId) != -1){
names.push(item.name)
}
})
this.setData({
showPopup: false,
selectedNames: names,
checkPersonsIdList:this.data.selectedOptions
});
},
changeHazardDesc(e) {
this.setData({
hazardDesc: e.detail.value
});
},
changeHazardDescStatus2(e){
this.setData({
hazardDesc2: e.detail.value
});
},
addAnother() {
let newValue = this.data.arr1.length + 1; // 根据数组长度确定新值
let newArr = this.data.arr1.concat({
value: newValue.toString(),
name: this.data.hazardDesc
});
this.setData({
arr1: newArr,
hazardDesc: '', // 清空输入框的值
});
const nameArray = this.data.arr1.map(item => item.name);
nameArray.forEach(value => {
// 创建一个新的对象,设置 hazardDesc 属性为当前值
this.data.newObj = {
hazardStatus: '0', // 如果需要同时设置 hazardStatus 属性,可以在这里进行设置
hazardDesc: value
};
});
this.data.hiddenDangeList.push(this.data.newObj);
console.log(this.data.hiddenDangeList)
},
pickerChange: function (e) {
this.setData({
checkResultName: this.data.array[e.detail.value],
checkResultFlag:e.detail.value
});
},
pickerChange1: function (e) {
// 更新当前选中的索引
console.log(e.detail.value),
this.setData({
getData: e.detail.value
});
this.data.reviewTime = e.detail.value
console.log(this.data.getData)
// 在这里可以根据选择的值进行相应的逻辑处理
},
pickerChange2: function (e) {
// 更新当前选中的索引
this.setData({
gridNName: this.data.companyList[e.detail.value].name,
companyId:this.data.companyList[e.detail.value].id
});
},
bindRemarkInput(e) {
this.setData({
remarks: e.detail.value
});
console.log(this.data.remarks)
},
chooseImage() {
if (this.data.uploadImageList.length > 3) {
wx.showToast({
title: "最多上传3张照片",
icon: "none"
})
return
}
const _this = this
$wuxActionSheet().showSheet({
buttons: [{
text: '拍照'
},
{
text: '从相册中获取',
openType: null,
},
],
className: 'dialog-class',
// 进入到这里的方法 index是buttons中的选项的索引值
buttonClicked(index) {
console.log(index)
if (index === 0) {
wx.chooseMedia({
//具体属性看文档
count: 1, //最多选择的数量
sizeType: ['original', 'compressed'], //文件的类型
sourceType: ['camera'], //可以用进行选择拍摄
success(res) {
console.log(res);
// 将照片的长度赋值给他
let deleteLength = _this.data.uploadImageList.length
// .将this中的uploadImageList重新赋值给uploadImageList
const uploadImageList = [..._this.data.uploadImageList]
// 判断数据的大小
if (res.tempFiles[0].size <= 5 * 1024 * 1024) {
//uploadImageList
uploadImageList.push({
// 已上传关闭
uploaded: false,
// ossUrl服务器
ossUrl: {
// 获取请求中的地址
url: res.tempFiles[0].tempFilePath
},
// 图片地址
imgUrl: res.tempFiles[0].tempFilePath,
// 将data里边的imageId自动加1
imageId: ++_this.data.imageId,
//获取路径的后三位,res.tempFiles[0].tempFilePath.length - 3, 3 从第三个为值截取,截取长度为3
type: res.tempFiles[0].tempFilePath.substr(res.tempFiles[0].tempFilePath.length - 3, 3),
//格式,图片
format: "image",
// 设置标识符
name: 'wximage'
})
} else {
_this.showToast('图片上限5M,请压缩后重试~')
return false
}
// 将uploadImageList赋值给uploadImageList
_this.setData({
uploadImageList
})
// 上传到服务器
wx.uploadFile({
// 服务器的地址
url: `${config.BASEURL()}oss/file/uploadvariedfile`,
//上传的本地路径
filePath: res.tempFiles[0].tempFilePath,
//文件都相应的key
name: 'file',
// 头部标识
header: {
'Content-type': 'application/json;charset=UTF-8',
'Authorization': wx.getStorageSync('token')
},
success(fileRes) {
//不懂
console.log("执行了")
console.log(fileRes)
// 这段代码片段中 !JSON.parse(fileRes.data).data 是一个条件表达式,它用于判断 fileRes.data 中是否包含 data 属性的值。
//fileRes将json转化为一个javascript对象
if (!JSON.parse(fileRes.data).data) {
_this.showToast('图片上传失败,请重试~')
// 删除上传失败的图片
// findIndex是找到符合条件的第一个索引
const index = _this.data.uploadImageList.findIndex(item => item.imageId === _this.data.imageId)
if (index > -1) {
// 删掉splice索引为1
_this.data.uploadImageList.splice(index, 1)
//更新uploadImageList
_this.setData({
uploadImageList: _this.data.uploadImageList
})
}
} else {
// 上传uploaded为true
uploadImageList[uploadImageList.length - 1].uploaded = true
// ossUrl为data
uploadImageList[uploadImageList.length - 1].ossUrl = JSON.parse(fileRes.data).data
_this.setData({
uploadImageList
})
}
},
fail(fileRes) {
_this.setData({
uploadImageList: []
})
_this.showToast('图片上传失败,请重试~')
}
})
}
})
} else if (index === 1) {
wx.chooseMedia({
count: 1,
type: 'image', //类型是图片
sourceType: ['album'], //允许从相册李删选
success(res) {
console.log(res, '图片上传的res');
let deleteLength = _this.data.uploadImageList.length
const uploadImageList = []
const endIndex = _this.data.uploadImageList.length
res.tempFiles.forEach((item, index) => {
if (item.size <= 5 * 1024 * 1024) {
uploadImageList.push({
uploaded: false,
ossUrl: {
url: item.tempFilePath
},
imgUrl: item.tempFilePath,
imageId: ++_this.data.imageId,
format: "image",
type: item.tempFilePath.substr(item.tempFilePath.length - 3, 3),
originFileName: 'image' + index + 1
})
console.log(uploadImageList)
} else {
_this.showToast('图片上限5M,请压缩后重试~')
}
})
_this.setData({
uploadImageList: [..._this.data.uploadImageList, ...uploadImageList]
})
console.log(_this.data.uploadImageList)
console.log(uploadImageList)
uploadImageList.forEach((item, index) => {
return (function (index) {
wx.uploadFile({
url: `${config.BASEURL()}oss/file/uploadvariedfile`,
filePath: res.tempFiles[index].tempFilePath,
name: 'file',
header: {
'Content-type': 'application/json;charset=UTF-8',
'Authorization': wx.getStorageSync('token')
},
success(fileRes) {
if (!JSON.parse(fileRes.data).data) {
_this.showToast('图片上传失败,请重试~')
_this.data.uploadImageList.splice(deleteLength, _this.data.uploadImageList.length - deleteLength)
_this.setData({
uploadImageList: _this.data.uploadImageList
})
} else {
uploadImageList[index].uploaded = true
uploadImageList[index].ossUrl = JSON.parse(fileRes.data).data
_this.data.uploadImageList = _this.data.uploadImageList.slice(0, endIndex)
_this.setData({
uploadImageList: [..._this.data.uploadImageList, ...uploadImageList]
})
}
},
fail(fileRes) {
_this.setData({
uploadImageList: []
})
_this.showToast('图片上传失败,请重试~')
}
})
})(index)
})
}
})
}
return true
},
cancelText: '取消',
//cancel():当用户点击取消按钮时触发的回调函数。你可以在这个回调函数中执行相应的操作,比如关闭弹出框或者执行其他逻辑。
//destructiveButtonClicked():当用户点击了破坏性按钮(如果有)时触发的回调函数。破坏性按钮通常用于执行一些危险操作,比如删除或者清除数据等。
cancel() {},
destructiveButtonClicked() {},
})
},
// 删除选中的图片
deleteImage(e) {
const index = this.data.uploadImageList.findIndex(item => item.imageId === e.currentTarget.dataset.imageid)
if (index > -1) {
this.data.uploadImageList.splice(index, 1)
this.setData({
uploadImageList: this.data.uploadImageList
})
}
},
//跳转地图选点
toughGetLocation() {
// this.getLocation(false);
wx.chooseLocation({
success: res => {
console.log('resadddres', res)
const {
fmData
} = this.data;
this.setData({
fmData: {
...fmData,
address: res.address,
longitude: res.longitude,
latitude: res.latitude
},
addressContent: res.address
});
console.log(this.data.fmData);
}
})
},
//
reverseLocation() {
const _this = this
this.data.qqMapWX.reverseGeocoder({
success(res) {
console.log(res);
_this.setData({
addressContent: res.result.address,
'fmData.address': res.result.address,
'fmData.longitude': res.result.location.lng,
'fmData.latitude': res.result.location.lat,
})
},
fail(err) {
console.debug(err)
}
})
},
})

13
subpages/InspectionReport/pages/InspectionReport/InspectionReport.json

@ -0,0 +1,13 @@
{
"navigationBarTitleText": "安检巡查",
"usingComponents": {
"wux-actionsheet": "../../../../components/dist/actionsheet/index",
"wux-segmented-control": "../../../../components/dist/segmented-control/index",
"wux-cell-group": "../../../../components/dist/cell-group/index",
"van-uploader": "@vant/weapp/uploader/index",
"van-checkbox": "@vant/weapp/checkbox/index",
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
"van-popup": "@vant/weapp/popup/index",
"van-picker": "@vant/weapp/picker/index"
}
}

155
subpages/InspectionReport/pages/InspectionReport/InspectionReport.wxml

@ -0,0 +1,155 @@
<view class="header">
<view class="header_left">
<image src="../../../../images/location.png" class="header_img"></image>
<view class="inside">
<text class="text1">{{addressContent}}</text>
<text class="text2">如定位不在事发地,请重新选择定位</text>
</view>
</view>
<view class="header_right" bind:tap="toughGetLocation">
<text class="text3">重新定位</text>
</view>
</view>
<view class="from">
<view class="prosecutors">
<text class="prosecutors_req">*</text>
<view class="nes">
<view class="conclusion">
<text class="prosecutors_pre">企业名称</text>
<picker class="prosecutors_name" bindchange="pickerChange2" range-key="name" value="{{index}}" range="{{companyList}}">
<view class="{{gridNName?'':'gray'}}">
{{gridNName?gridNName:'请选择'}}
</view>
</picker>
</view>
<view class="conclusion_right">
<image src="../../../../images/right.png" class="prosecutors_img"></image>
</view></view>
</view>
<view class="prosecutors" bind:tap="showPopup">
<text class="prosecutors_req">*</text>
<view class="nes">
<view class="conclusion">
<text class="prosecutors_pre">检查人员</text>
<text class="prosecutors_name">{{ selectedNames }}</text>
</view>
<view class="conclusion_right">
<image src="../../../../images/right.png" class="prosecutors_img"></image>
</view></view>
</view>
<view class="pitfall">
<view class="prosecutors">
<text class="prosecutors_req" wx:if="{{checkResultFlag == 0}}">*</text>
<view class="conclusion1">
<text class="prosecutors_pre">隐患明细</text>
</view>
</view>
<view class="checkbox1">
<van-checkbox-group value="{{ result }}" bind:change="onChange">
<van-checkbox custom-class="group" data-value="{{item.value}}" name="{{item.value}}" wx:for="{{arr1}}" >{{item.name}}</van-checkbox>
</van-checkbox-group>
</view>
<view class="input1">
<input bindinput="changeHazardDesc" type="text" value="{{hazardDesc}}" placeholder=" 请输入" />
</view>
<view class="add" bind:tap="addAnother">
<image src="../../../../images/add.png" class="add_img"></image>
<text>再添加一条</text>
</view>
</view>
<view class="pitfall">
<view class="prosecutors">
<view class="requirement">
<text class="prosecutors_pre">整改要求</text>
</view>
</view>
<!-- <view class="checkbox1">
<van-checkbox-group value="{{ hazardDesc }}">
<van-checkbox name="hazardDesc">{{ hazardDesc }}</van-checkbox>
</van-checkbox-group>
</view> -->
<view class="input1">
<input bindinput="changeHazardDescStatus2" type="text" placeholder="请输入" value="{{ hazardDesc2 }}" />
</view>
</view>
<view class="prosecutors">
<text class="prosecutors_req">*</text>
<view class="nes">
<view class="conclusion">
<text class="prosecutors_pre">检查结论</text>
<picker class="prosecutors_name" bindchange="pickerChange" value="{{index}}" range="{{array}}">
<view class="{{checkResultName?'':'gray'}}">
{{checkResultName?checkResultName:'请选择'}}
</view>
</picker>
</view>
<view class="conclusion_right">
<image src="../../../../images/right.png" class="prosecutors_img"></image>
</view>
</view>
</view>
<view class="prosecutors">
<text class="prosecutors_req" wx:if="{{checkResultFlag == 0}}">*</text>
<view class="nes">
<view class="conclusion">
<text class="prosecutors_pre">拟复查时间</text>
<picker mode="date" class="prosecutors_name" bindchange="pickerChange1" value="{{data}}">
<view class="{{getData?'':'gray'}}">
{{getData?getData:'请选择'}}
</view>
</picker>
</view>
<view class="conclusion_right">
<image src="../../../../images/right.png" class="prosecutors_img"></image>
</view>
</view>
</view>
<view class="attachment">
<view class="image-box">
<view class="{{ uploadImageList.length < 4 ? 'image-list' : uploadImageList.length > 3 && uploadImageList.length < 7 ? 'image-list image-list-2' : uploadImageList.length > 6 && uploadImageList.length < 10 ? 'image-list image-list-3' : 'image-list image-list-4' }}">
<view class=" image-list-label">
<view class="field-text">上传图片</view>
</view>
<view
class="image-item"
wx:for="{{uploadImageList}}"
wx:for-index="index"
wx:for-item="item"
wx:key="imageId">
<image class="issue-image" src="{{item.ossUrl.url}}" />
<image wx:if="{{!item.uploaded}}" class="loading" src="../../../../images/loading.gif" />
<image bindtap="deleteImage" data-imageid="{{item.imageId}}" class="close" wx:else src="../../../../images/icon_close.png" />
</view>
<image wx:if="{{uploadImageList.length < 3}}" src="../../../../images/ig_tianjiatupian@2x.png" bindtap="chooseImage" />
</view>
</view>
<text class="text_27">备注</text>
<view class="textarea1">
<textarea placeholder-style="color: #C1C1C1;" bindinput="bindRemarkInput" maxlength="100" placeholder-class="gray" placeholder="请输入" />
</view>
</view>
</view>
<view class="footer">
<view class="btn" bind:tap="submitBiao">
<text class="btn_text">提交</text>
</view>
</view>
<wux-actionsheet id="wux-actionsheet" />
<van-popup show="{{ showPopup }}" closeable close-icon="close" position="bottom" custom-style="height: 50%" bind:close="onClose" round>
<view class="popup-content">
<van-checkbox-group value="{{selectedOptions}}" bind:change="onChange1">
<van-checkbox name="{{item.staffId}}" custom-class="checkbox" wx:for="{{arr}}">{{item.name}}</van-checkbox>
</van-checkbox-group>
</view>
</van-popup>

504
subpages/InspectionReport/pages/InspectionReport/InspectionReport.wxss

@ -0,0 +1,504 @@
page {
width: 100%;
min-height: 100vh;
overflow-y: auto;
background-color: #f7f7f7;
}
.from{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
border-radius: 15rpx;
background-color: rgb(255, 255, 255);
margin: 30rpx;
}
.prosecutors{
display: flex;
flex-direction:row;
align-items: center;
margin: 20rpx;
height: 80rpx;
}
.nes{
width: 630rpx;
display: flex;
flex-direction:row;
align-items: center;
margin: 20rpx;
justify-content: space-between;
height: 80rpx;
border-bottom: 1px solid #EAEAEA;
}
.conclusion{
display: flex;
flex-direction: row;
}
.conclusion1{
display: flex;
flex-direction: row;
margin-left: 20rpx;
}
.prosecutors_req{
color: red;
margin: 5rpx;
}
.prosecutors_pre{
width: 124rpx;
height: 31rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 32rpx;
font-family: PingFang-SC-Regular;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
}
.prosecutors_name{
width: 150px;
height: 30rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 32rpx;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
margin-left: 60rpx;
}
.prosecutors_img{
width: 40rpx;
height: 30rpx;
}
.prosecutors_top{
display: flex;
flex-direction: column;
}
.prosecutors_but{
display: flex;
flex-direction: column;
margin: 15rpx;
}
.prosecutors_chex{
margin: 20rpx;
}
.checkbox{
font-size: 32rpx;
}
.prosecutors_group{
margin: 20rpx;
}
.prosecutors_add{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.prosecutors_data{
display: flex;
flex-direction: row;
}
.input{
margin-left: 100rpx;
font-size: 32rpx;
}
.attachment{
display: flex;
flex-direction: column;
margin: 20rpx;
padding-left: 40rpx;
}
.image1{
margin-top: 20rpx;
margin-bottom: 20rpx;
width: 200rpx;
height: 200rpx;
}
.image-box .image-list-label {
position: absolute;
top: 35rpx;
}
.field-text{
width: 61rpx;
height: 31rpx;
overflow-wrap: break-word;
color: rgba(102,102,102,1);
font-size: 32rpx;
font-family: PingFang-SC-Regular;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
}
.text1{
width: 62rpx;
height: 30rpx;
overflow-wrap: break-word;
color: rgba(102,102,102,1);
font-size: 32rpx;
font-family: PingFang-SC-Regular;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
margin-bottom: 30rpx;
}
.textarea1{
margin-top: 20rpx;
background-color:#f7f7f7 ;
width: 650rpx;
height: 200rpx;
margin-left: 40rpx;
}
/* .text2{
width: 133rpx;
height: 32rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 34rpx;
font-family: PingFang-SC-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 52rpx;
margin: 31rpx 0 0 29rpx;
} */
.logsBox {
border-left: 3rpx solid #DADEE5;
margin-left: -18rpx;
padding-left: 12rpx;
}
.logs-top {
display: flex;
justify-content: space-between;
position: relative;
top: -32rpx;
padding-left: 12rpx;
}
.logs-top-title {
height: 31rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 32rpx;
color: #333333;
line-height: 41rpx;
}
.logs-top-time {
height: 20rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 26rpx;
color: #BDBDBD;
line-height: 40rpx;
}
.logs-content {
position: relative;
top: -24rpx;
padding-top: 12rpx;
padding-bottom: 24rpx;
display: flex;
justify-content: space-between;
font-family: PingFang SC;
font-weight: 500;
font-size: 30rpx;
color: #999999;
line-height: 52rpx;
}
.logs-content-left {
width: 48%;
}
.logs-content-right {
width: 48%;
}
.logs-content-txt {
color: #333333;
}
.item-dian {
position: relative;
left: -28rpx;
width: 32rpx;
height: 32rpx;
box-sizing: border-box;
background: #FFFFFF;
border-radius: 50%;
border: 1px solid #3A80E7;
display: flex;
align-items: center;
justify-content: center;
}
.neidian {
width: 18rpx;
height: 18rpx;
background: #3A80E7;
border-radius: 50%;
}
.text3{
width: 138rpx;
height: 27rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 28rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 48rpx;
margin-bottom: 20rpx;
}
.hidden{
display: flex;
flex-direction: column;
}
.hidden_top{
display: flex;
flex-direction:column;
align-items: center;
justify-content: space-between;
height: 50rpx;
}
.text8{
display: flex;
flex-direction: row;
}
.text9{
display: flex;
}
.pitfall{
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.pitfall_header{
display: flex;
flex-direction: row;
}
.checkbox1{
display: flex;
flex-direction:column;
margin-left: 50rpx;
margin-bottom: 20rpx;
}
.group{
margin-top: 20rpx;
}
.input1{
width: 650rpx;
height: 90rpx;
background-color: #F7F7F7;
border-radius: 10rpx;
margin-left: 50rpx;
}
.add{
display: flex;
flex-direction: row;
box-sizing: border-box;
justify-content: center;
align-items: center;
margin: 20rpx;
}
.add_img{
width: 40rpx;
height: 40rpx;
}
.conclusion_right{
display: flex;
flex-direction: row;
}
.btn{
display: flex;
margin: 20rpx;
background-color: #3974F6;
width: 630rpx;
height: 86rpx;
border-radius: 43rpx;
justify-content: center;
align-items: center;
margin-bottom: 30px;
}
.btn_text{
width: 80rpx;
height: 31rpx;
font-family: PingFang SC;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
line-height: 60rpx;
margin-bottom: 20rpx;
}
.footer{
width: 100%;
height: 100rpx;
display: flex;
justify-content: center;
align-items: center;
z-index: 2;
position:fixed;
left: 0;
bottom: 0;
}
.image-box {
width: 100%;
height: auto;
border-radius: 16rpx;
background: #fff;
box-sizing: border-box;
padding: 34rpx 40rpx;
position: relative;
display: flex;
/* display: flex;
align-items: center; */
}
.image-list {
width: 100%;
display: grid;
grid-template-columns: 214rpx 214rpx 214rpx;
grid-template-rows: 214rpx;
grid-gap: 17rpx;
height: 188rpx;
margin-top:50rpx ;
}
.image-list-2 {
height: 428rpx !important;
}
.image-list-3 {
height: 642rpx !important;
}
.image-list-4 {
height: 856rpx !important;
}
.image-list .image-item {
width: 100%;
height: 100%;
position: relative;
}
.image-list image {
/* width: 100%; */
/* height: 100%; */
width: 180rpx;
height: 180rpx;
object-fit: cover;
border-radius: 8rpx;
}
.image-list .image-item .loading {
position: absolute;
left: 25%;
top: 25%;
width: 50%;
height: 50%;
}
.image-list .image-item .close {
position: absolute;
top: -10rpx;
right: -10rpx;
width: 40rpx;
height: 40rpx;
}
.header{
width: 748rpx;
height: 100rpx;
display: flex;
background-color: white;
flex-direction: row;
justify-content: space-between;
}
.header_left{
display:flex;
flex-direction: row;
margin-left: 20rpx;
}
.header_img{
width: 36rpx;
height: 36rpx;
margin-top: 10rpx;
}
.inside{
display: flex;
flex-direction: column;
margin-left: 10rpx;
}
.text1{
width: 374rpx;
height: 30rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 32rpx;
font-family: PingFang-SC-Regular;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
margin-left: 1rpx;
}
.text2{
width: 382rpx;
height: 24rpx;
overflow-wrap: break-word;
color: rgba(172,172,172,1);
font-size: 24rpx;
font-family: PingFang-SC-Regular;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
margin-bottom: 10rpx;
margin-top: -7px;
}
.header_right{
display: flex;
justify-content: center;
align-items: center;
margin-right: 30rpx;
}
.text3{
width: 118rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(56,135,248,1);
font-size: 30rpx;
font-family: PingFang-SC-Regular;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
}
.requirement{
padding-left:40rpx ;
}
.popup-content{
margin: 20rpx;
display: flex;
}
.checkbox{
margin: 40rpx;
}
.text_27 {
margin-left: 40rpx;
margin-bottom: 30rpx;
width: 62rpx;
height: 30rpx;
overflow-wrap: break-word;
color: rgba(102,102,102,1);
font-size: 32rpx;
font-family: PingFang-SC-Regular;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
}

9
subpages/addhouse/pages/addhouse/addhouse.wxss

@ -15,10 +15,6 @@ page {
width: 100%;
height: 444rpx;
overflow: hidden;
/* position: fixed;
top: 0;
left: 0;
z-index: 1000; */
}
.header .header-bg {
width: 100%;
@ -191,4 +187,7 @@ page {
color: #fff;
margin: 30rpx auto 0;
line-height: 86rpx;
}
}

4
subpages/communitySelfInsp/pages/followUpList/followUpList.json

@ -2,8 +2,8 @@
"usingComponents": {
"load-more": "../../../../components/loadMore/loadMore",
"no-data": "../../../../components/noData/nodata",
"wux-calendar":"../../../../components/dist/calendar",
"wux-picker":"../../../../components/dist/picker/index"
"wux-calendar":"../../../../components/dist/calendar",
"wux-picker":"../../../../components/dist/picker/index"
}
}

2970
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js

File diff suppressed because it is too large

2
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml

@ -10,7 +10,7 @@
<view class="field-text">所属组织</view>
</view>
<view class="value-dl" bind:tap="showPicker">
<view class="di-name">{{agencyName?agencyName:'请选择'}}</view>
<view class="di-name">{{agencyName?agencyName:'请选择-'}}</view>
<image class="di-but" src="../../../../../images/right.png" mode="aspectFit" />
</view>
</view>

2
subpages/house/pages/housePortrait/housePortrait.wxml

@ -44,7 +44,7 @@
<view class="title">
<text>更新记录</text>
</view>
<view style="margin-top: 32rpx; padidng:0 12rpx;">
<view style="margin-top: 32rpx; padding:0 12rpx;">
<view class="logsBox" wx:for="{{logs}}" wx:key="{{item.changeTime}}">
<view class="item-dian {{index!=0?'item-dian1':''}}">
<view class="neidian"></view>

500
subpages/safetyinspection/pages/safetyinspection/safetyinspection.js

@ -0,0 +1,500 @@
// subpages/safetyinspection/pages/safetyinspection/safetyinspection.js
import { $wuxActionSheet } from '../../../../components/dist/index'
const App = getApp()
import {
showRecord,addRecord,inspectionStaff,securityCheckk
} from "../../../../utils/api"
const config = require('../../../../utils/config')
Page({
/**
* 页面的初始数据
*/
data: {
checkboxOptionsnumber:0,
orgid:'',
orgType:'',
pageNo:'1',
pageSize:'20',
showList:[],
imageUrls:[],
remark:'',//备注
reviewTime:'',
checkResultFlag:'',
array: ['不合格', '合格'], // 选择器的数据源
arrlist:[],
fileList: [],
companyId: '',
showPopup: false, // 控制弹出层显示/隐藏的状态
selectedOptions: [], // 选中的复选框项
selectedNames:[],//显示检察人员
newContent: '',
arr:[
],
checkboxOptions:[],
checkboxValue:[],
uploadImageList: [],//图片上传的数组
imageId:1,
addHiddenDangeList:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
companyId: options.resiId,
orgid:App.globalData.user.agencyId
})
console.log(App.globalData)
this.showRecordData()
this.toOinspectionStaff()
this.securityCheckk()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
securityCheckk(){
securityCheckk({
pageNo: this.data.pageNo,
pageSize: this.data.pageSize,
}).then(({
data
}) => {
console.log(data)
this.setData({
companyList: data.list,
});
});
},
onChange(event) {
console.log(event.detail);
this.data.checkboxOptions.forEach((item,index)=>{
if(event.detail.findIndex(item=>item==index) != -1){
item.hazardStatus = 1
}else{
item.hazardStatus = 0
}
})
this.setData({
checkboxValue:event.detail,
})
},
afterRead(event) {
const {
file
} = event.detail;
console.log(file)
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
wx.uploadFile({
url: 'https://example.weixin.qq.com/upload', // 仅为示例,非真实的接口地址
filePath: file.url,
name: 'file',
formData: {
user: 'test'
},
success(res) {
// 上传完成需要更新 fileList
const {
fileList = []
} = this.data;
fileList.push({
...file,
url: res.data
});
this.setData({
fileList
});
},
});
},
showRecordData() {
let parm = {
id: this.data.companyId
}
showRecord(parm).then(res => {
console.log(res)
if(res.data[0].hiddenDangeList){
let checkboxOptions = res.data[0].hiddenDangeList.filter(item=>item.hazardStatus === 0).map(item=>({hazardDesc:item.hazardDesc,hazardStatus:0}));
let checkboxOptionsnumber=checkboxOptions.length+1;
console.log(checkboxOptionsnumber)
this.setData({
checkboxOptions,
checkboxOptionsnumber
})
}
this.setData({
showList:res.data
})
console.log(this.data.showList)
})
},
toOinspectionStaff(){
let parm = {
orgId:this.data.orgid,
      orgType:"agency",
      pageNo:1,
      pageSize:100
}
inspectionStaff(parm).then(res=>{
console.log(res.data.staffList)
this.setData({
arr:res.data.staffList
})
})
},
showPopup() {
this.setData({ showPopup: true }); // 点击按钮显示弹出层
},
onClose() {
let names = []
this.data.arr.forEach(item=>{
if(this.data.selectedOptions.findIndex(itemC=>itemC === item.staffId) != -1){
names.push(item.name)
}
})
this.setData({
showPopup: false,
selectedNames: names,
checkPersonsIdList:this.data.selectedOptions
}); // 关闭弹出层
},
onChange1(event) {
console.log(event)
this.setData({
selectedOptions: event.detail
});
console.log(this.data.selectedOptions)
},
confirmSelection() {
// 点击确定按钮后触发,处理选中的复选框项
console.log("选中的项:", this.data.selectedOptions);
console.log(this.data.arr)
console.log(this.data.arr.filter(item => this.data.selectedOptions.includes(item.staffId)).map(item => item.name));
console.log(this.data.arr.filter(item => this.data.selectedOptions.includes(item.value)));
const selectedName = this.data.arr.filter(item => this.data.selectedOptions.includes(item.staffId)).map(item => item.name);
console.log("选中的名称:", selectedName);
this.setData({
showPopup: false,
selectedNames:selectedName
}); // 关闭弹出层
console.log(this.data.selectedNames)
},
changenewContent(e){
this.setData({
newContent: e.detail.value
});
},
addAnother() {
let newArr = this.data.addHiddenDangeList.concat({ hazardDesc: this.data.newContent, hazardStatus: 0 });
this.setData({
addHiddenDangeList: newArr,
newContent: '', // 清空输入框的值
});
console.log('添加后的数组:', this.data.addHiddenDangeList);
},
// 删除选中的图片
deleteImage(e) {
console.log(this.data.uploadImageList,'data中');
console.log(e.currentTarget.dataset.imageid,'图片Id');
const index = this.data.uploadImageList.findIndex(item => item.imageId === e.currentTarget.dataset.imageid)
if (index > -1) {
this.data.uploadImageList.splice(index, 1)
this.setData({
uploadImageList: this.data.uploadImageList
})
}
},
getCurrentDateTime() {
const now = new Date();
const year = now.getFullYear();
const month = (now.getMonth() + 1).toString().padStart(2, '0');
const day = now.getDate().toString().padStart(2, '0');
const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0');
const seconds = now.getSeconds().toString().padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
},
handelClickSave(){
if(this.data.selectedOptions.length === 0){
wx.showToast({
title: '请选择检查人员',
icon:'none'
})
return false
}
if(!this.data.checkResultFlag){
wx.showToast({
title: '请选择检查结论',
icon:'none'
})
return false
}
if(this.data.checkResultFlag == 0 && !this.data.reviewTime){
wx.showToast({
title: '请选择拟复查时间',
icon:'none'
})
return false
}
if(this.data.checkResultFlag == 0 && this.data.checkboxOptions.length<0){
wx.showToast({
title: '请填写隐患明细',
icon:'none'
})
return false
}
const now = new Date();
const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0');
const seconds = now.getSeconds().toString().padStart(2, '0');
let form = {
companyId:this.data.companyId,
checkTime:this.getCurrentDateTime(),
checkPersonsIdList:this.data.selectedOptions,
checkResultFlag:this.data.checkResultFlag,
reviewTime:`${this.data.reviewTime} ${hours}:${minutes}:${seconds}`,
hiddenDangeList:this.data.checkboxOptions.concat(this.data.addHiddenDangeList),
attachmentUrls:this.data.uploadImageList.map(item=>({fileName:item.originFileName,attachmentUrl:item.ossUrl.url})),
remark:this.data.remark,
address:""
}
console.log(this.data.checkboxOptions.concat(this.data.addHiddenDangeList))
addRecord(form).then(res => {
if(res.code == 0){
wx.showToast({
title: '新增成功',
duration:2000,
success:function(){
setTimeout(()=>{
wx.navigateBack({
delta: 1
})
},2000)
}
})
}
})
console.log(form);
},
chooseImage() {
if (this.data.uploadImageList.length > 3) {
wx.showToast({
title: "最多上传3张照片",
icon: "none"
})
return
}
const _this = this
$wuxActionSheet().showSheet({
buttons: [
{ text: '拍照' },
{ text: '从相册中获取',openType:null, },
],
className: 'dialog-class',
buttonClicked(index) {
if (index === 0) {
wx.chooseMedia({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['camera'],
success(res) {
console.log(res);
let deleteLength = _this.data.uploadImageList.length
const uploadImageList = [..._this.data.uploadImageList]
if (res.tempFiles[0].size <= 5 * 1024 * 1024) {
uploadImageList.push({
uploaded: false,
ossUrl: {url:res.tempFiles[0].tempFilePath},
imgUrl: res.tempFiles[0].tempFilePath,
imageId: ++_this.data.imageId,
type:res.tempFiles[0].tempFilePath.substr(res.tempFiles[0].tempFilePath.length -3,3),
format:"image",
name:'wximage'
})
} else {
_this.showToast('图片上限5M,请压缩后重试~')
return false
}
_this.setData({
uploadImageList
})
wx.uploadFile({
url: `${config.BASEURL()}oss/file/uploadvariedfile`,
filePath: res.tempFiles[0].tempFilePath,
name: 'file',
header: {
'Content-type': 'application/json;charset=UTF-8',
'Authorization': wx.getStorageSync('token')
},
success(fileRes) {
if (!JSON.parse(fileRes.data).data) {
_this.showToast('图片上传失败,请重试~')
// 删除
const index = _this.data.uploadImageList.findIndex(item => item.imageId === _this.data.imageId)
if (index > -1) {
_this.data.uploadImageList.splice(index, 1)
_this.setData({
uploadImageList: _this.data.uploadImageList
})
}
} else {
uploadImageList[uploadImageList.length - 1].uploaded = true
uploadImageList[uploadImageList.length - 1].ossUrl = JSON.parse(fileRes.data).data
_this.setData({
uploadImageList
})
}
},
fail(fileRes) {
_this.setData({
uploadImageList: []
})
_this.showToast('图片上传失败,请重试~')
}
})
}
})
} else if (index === 1) {
wx.chooseMedia({
count: 1,
type:'image',
sourceType: ['album'],
success(res) {
console.log(res,'图片上传的res');
let deleteLength = _this.data.uploadImageList.length
const uploadImageList = []
const endIndex = _this.data.uploadImageList.length
res.tempFiles.forEach((item,index) => {
if (item.size <= 5 * 1024 * 1024) {
uploadImageList.push({
uploaded: false,
ossUrl: {url:item.tempFilePath},
imgUrl: item.tempFilePath,
imageId: ++_this.data.imageId,
format:"image",
type:item.tempFilePath.substr(item.tempFilePath.length -3,3),
originFileName:'image' + index + 1
})
} else {
_this.showToast('图片上限5M,请压缩后重试~')
}
})
_this.setData({
uploadImageList: [..._this.data.uploadImageList, ...uploadImageList]
})
uploadImageList.forEach((item, index) => {
return (function (index) {
wx.uploadFile({
url: `${config.BASEURL()}oss/file/uploadvariedfile`,
filePath: res.tempFiles[index].tempFilePath,
name: 'file',
header: {
'Content-type': 'application/json;charset=UTF-8',
'Authorization': wx.getStorageSync('token')
},
success(fileRes) {
if (!JSON.parse(fileRes.data).data) {
_this.showToast('图片上传失败,请重试~')
_this.data.uploadImageList.splice(deleteLength, _this.data.uploadImageList.length - deleteLength)
_this.setData({
uploadImageList: _this.data.uploadImageList
})
} else {
console.log(uploadImageList,'see');
uploadImageList[index].uploaded = true
uploadImageList[index].ossUrl = JSON.parse(fileRes.data).data
_this.data.uploadImageList = _this.data.uploadImageList.slice(0, endIndex)
_this.setData({
uploadImageList: [..._this.data.uploadImageList, ...uploadImageList]
})
}
},
fail(fileRes) {
_this.setData({
uploadImageList: []
})
_this.showToast('图片上传失败,请重试~')
}
})
})(index)
})
}
})
}
return true
},
cancelText: '取消',
cancel() { },
destructiveButtonClicked() { },
})
},
pickerChange: function(e) {
console.log(e.detail.value);
this.setData({
checkResultFlag:e.detail.value,
checkResultFlagName:this.data.array[e.detail.value]
});
},
pickerChange1: function(e) {
this.setData({
reviewTime: e.detail.value
});
},
bindRemarkInput(e){
this.setData({
remark: e.detail.value
});
console.log(this.data.remark)
console.log(this.data.remark)
},
})

15
subpages/safetyinspection/pages/safetyinspection/safetyinspection.json

@ -0,0 +1,15 @@
{
"navigationBarTitleText": "安全巡检",
"backgroundTextStyle":"dark",
"usingComponents": {
"van-checkbox": "@vant/weapp/checkbox/index",
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
"van-uploader": "@vant/weapp/uploader/index",
"van-popup": "@vant/weapp/popup/index",
"van-picker": "@vant/weapp/picker/index",
"wux-actionsheet": "../../../../components/dist/actionsheet/index"
},
"permissions": {
"scope.record": true
}
}

165
subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml

@ -0,0 +1,165 @@
<!--subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml-->
<view class="form_add">
<view class="prosecutors" bind:tap="showPopup">
<text class="prosecutors_req">*</text>
<view class="nes">
<view class="conclusion">
<text class="prosecutors_pre">检查人员</text>
<text class="prosecutors_name">{{ selectedNames }}</text>
</view>
<view class="conclusion_right">
<image src="../../../../images/right.png" class="prosecutors_img"></image>
</view></view>
</view>
<view class="pitfall">
<view class="prosecutors" style="border-bottom: none;">
<view>
<text class="prosecutors_req" wx:if="{{checkResultFlag == 0}}">*</text>
<text class="prosecutors_pre1">未整改隐患</text>
</view>
</view>
<view class="checkbox1">
<van-checkbox-group value="{{checkboxValue}}" bind:change="onChange" wx:if="{{checkboxOptions}}" >
<van-checkbox custom-class="group" name="{{index}}" wx:for="{{checkboxOptions}}">{{index + 1}}. {{item.hazardDesc}}</van-checkbox>
</van-checkbox-group>
<view class="addHiddenDangeList">
<text wx:for="{{addHiddenDangeList}}" wx:for-index="index" class="addHiddenDangeListText"
wx:for-item="item">{{index + checkboxOptionsnumber
}}. {{item.hazardDesc}}</text>
</view>
</view>
<view class="input1">
<input bindinput="changenewContent" value="{{newContentWithIndex}}" type="text" placeholder=" 请输入新的隐患信息" />
</view>
<view class="add" bind:tap="addAnother">
<image src="../../../../images/add.png" class="add_img"></image>
<text>再添加一条</text>
</view>
</view>
<view class="prosecutors" >
<text class="prosecutors_req">*</text>
<view class="nes">
<view class="conclusion">
<text class="prosecutors_pre">检查结论</text>
<picker class="prosecutors_name" bindchange="pickerChange" value="{{checkResultFlag}}" range="{{array}}">
<view class="{{checkResultFlagName?'':'gray'}}">
{{checkResultFlagName?checkResultFlagName:'请选择'}}
</view>
</picker>
</view>
<view class="conclusion_right">
<image src="../../../../images/right.png" class="prosecutors_img"></image>
</view></view>
</view>
<view class="prosecutors" >
<text class="prosecutors_req" wx:if="{{checkResultFlag == 0}}">*</text>
<view class="nes">
<view class="conclusion">
<text class="prosecutors_pre">拟复查时间</text>
<picker mode="date" class="prosecutors_name" bindchange="pickerChange1" value="{{reviewTime}}">
<view class="{{reviewTime?'':'gray'}}">
{{reviewTime?reviewTime:'请选择'}}
</view>
</picker>
</view>
<view class="conclusion_right">
<image src="../../../../images/right.png" class="prosecutors_img"></image>
</view></view>
</view>
<view class="image-box">
<view class="{{ uploadImageList.length < 4 ? 'image-list' : uploadImageList.length > 3 && uploadImageList.length < 7 ? 'image-list image-list-2' : uploadImageList.length > 6 && uploadImageList.length < 10 ? 'image-list image-list-3' : 'image-list image-list-4' }}">
<view class=" image-list-label">
<view class="field-text">附件</view>
</view>
<view
class="image-item"
wx:for="{{uploadImageList}}"
wx:for-index="index"
wx:for-item="item"
wx:key="imageId">
<image class="issue-image" src="{{item.ossUrl.url}}" />
<image wx:if="{{!item.uploaded}}" class="loading" src="../../../../images/loading.gif" />
<image bindtap="deleteImage" data-imageid="{{item.imageId}}" class="close" wx:else src="../../../../images/icon_close.png" />
</view>
<image wx:if="{{uploadImageList.length < 3}}" src="../../../../images/ig_tianjiatupian@2x.png" bindtap="chooseImage" />
</view>
</view>
<view class="attachment">
<text class="text1">备注</text>
<view class="textarea1">
<textarea placeholder-style="color: #C1C1C1;" bindinput="bindRemarkInput" maxlength="100" placeholder-class="gray" placeholder="请输入" />
</view>
</view>
</view>
<view class="form_record">
<view class="text2">
巡查记录
</view>
<view class="logsBox" wx:for="{{showList}}" wx:for-index="index">
<view class="item-dian {{index!=0?'item-dian1':''}}">
<view class="neidian"></view>
</view>
<view class="logs-top">
<view class="logs-top-title">{{item.checkTime}}</view>
</view>
<view class="logs-content">
<view class="logs-content-left">
<view>
<text class="logs-content-title">检察人员:</text>
<text class="logs-content-txt">{{item.chekPersons||'--'}}</text>
</view>
<view>
<text class="logs-content-title">检查结论:</text>
<text class="logs-content-txt">{{item.checkResultFlag == 1?'合格':'不合格'}}</text>
</view>
<view>
<text class="logs-content-title">隐患明细:</text>
<text class="logs-content-txt" name="{{index}}" wx:for="{{item.hiddenDangeList}}">{{index + 1}}. {{item.hazardDesc}}</text>
</view>
<view>
<text class="logs-content-title">整改要求:</text>
<text class="logs-content-txt" wx:for="{{item.hiddenDangeList}}">{{item.hazardStatus}}</text>
</view>
<view>
<text class="logs-content-title">拟复查时间:</text>
<text class="logs-content-txt">{{item.reviewTime}}</text>
</view>
<view>
<text class="logs-content-title">附件:</text>
<block wx:if="{{item.attachmentUrls.length > 0}}" >
<text class="logs-content-txt" wx:for="{{item.attachmentUrls}}">{{item.fileName}}</text>
</block>
<text wx:else>--</text>
</view>
<view >
<text class="logs-content-title">备注:</text>
<text class="logs-content-txt">{{item.remark||'--'}}</text>
</view>
<view wx:if="{{index}}" >
<text class="logs-content-title">巡查定位:</text>
<text class="logs-content-txt">{{item.reviewAddress}}</text>
</view>
</view>
</view>
</view>
</view>
<view style="height: 100rpx; width: 100%;"></view>
<view class="footer">
<view class="btn" bind:tap="handelClickSave">
<text class="btn_text">提交</text>
</view>
</view>
<van-popup show="{{ showPopup }}" closeable close-icon="close" position="bottom" custom-style="height: 50%" bind:close="onClose" round>
<view class="popup-content">
<van-checkbox-group value="{{selectedOptions}}" bind:change="onChange1">
<van-checkbox name="{{item.staffId}}"custom-class="checkbox" data-value="{{item.value}}" wx:for="{{arr}}">{{item.name}}</van-checkbox>
</van-checkbox-group>
</view>
</van-popup>
<wux-actionsheet id="wux-actionsheet" />

453
subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxss

@ -0,0 +1,453 @@
page {
width: 100%;
min-height: calc(100vh - 100rpx);
overflow-y: auto;
background-color: #f7f7f7;
padding: 0 30rpx;
box-sizing: border-box;
}
.form_add{
width: 100%;
height: 100%;
padding:29rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
border-radius: 15rpx;
background-color: rgb(255, 255, 255);
margin-top:20rpx ;
}
.form_record{
width: 100%;
height: 100%;
padding:29rpx 60rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
border-radius: 15rpx;
background-color: rgb(255, 255, 255);
margin-top:20rpx ;
}
.prosecutors{
width: 650rpx;
display: flex;
flex-direction:row;
align-items: center;
margin: 20rpx;
height: 80rpx;
}
.conclusion{
display: flex;
flex-direction: row;
}
.nes{
width: 630rpx;
display: flex;
flex-direction:row;
align-items: center;
margin: 20rpx;
justify-content: space-between;
height: 80rpx;
border-bottom: 1px solid #EAEAEA;
}
.prosecutors_req{
color: red;
margin: 5rpx
}
.prosecutors_pre{
width: 124rpx;
height: 31rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 32rpx;
font-family: PingFang-SC-Regular;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
}
.prosecutors_pre1{
width: 124rpx;
height: 31rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 32rpx;
font-family: PingFang-SC-Regular;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
margin-left: 20rpx;
}
.prosecutors_name{
width: 150px;
height: 30rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 32rpx;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
margin-left: 60rpx;
}
.prosecutors_img{
width: 40rpx;
height: 30rpx;
}
.prosecutors_top{
display: flex;
flex-direction: column;
}
.prosecutors_but{
display: flex;
flex-direction: column;
margin: 15rpx;
}
.prosecutors_chex{
margin: 20rpx;
}
.checkbox{
font-size: 32rpx;
}
.prosecutors_group{
margin: 20rpx;
}
.prosecutors_add{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.prosecutors_data{
display: flex;
flex-direction: row;
}
.input{
margin-left: 100rpx;
font-size: 32rpx;
}
.attachment{
display: flex;
flex-direction: column;
margin: 20rpx;
}
.image1{
margin-top: 20rpx;
margin-bottom: 20rpx;
width: 200rpx;
height: 200rpx;
}
.text1{
width: 62rpx;
height: 30rpx;
overflow-wrap: break-word;
color: rgba(102,102,102,1);
font-size: 32rpx;
font-family: PingFang-SC-Regular;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
margin-bottom: 30rpx;
}
.textarea1{
margin-top: 20rpx;
background-color:#f7f7f7 ;
width: 100%;
height: 200rpx;
}
.text2{
width: 133rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 34rpx;
font-family: PingFang-SC-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
margin-bottom: 29rpx;
}
.logsBox {
border-left: 3rpx solid #DADEE5;
margin-left: -18rpx;
padding-left: 12rpx;
}
.logs-top {
display: flex;
justify-content: space-between;
position: relative;
top: -32rpx;
padding-left: 12rpx;
}
.logs-top-title {
height: 31rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 32rpx;
color: #333333;
line-height: 41rpx;
}
.logs-top-time {
height: 20rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 26rpx;
color: #BDBDBD;
line-height: 40rpx;
}
.logs-content {
position: relative;
top: -24rpx;
padding-top: 12rpx;
padding-bottom: 24rpx;
display: flex;
justify-content: space-between;
font-family: PingFang SC;
font-weight: 500;
font-size: 30rpx;
color: #999999;
line-height: 52rpx;
}
.logs-content-left {
width: 100%;
}
.logs-content-right {
width: 48%;
}
.logs-content-txt {
color: #333333;
}
.item-dian {
position: relative;
left: -28rpx;
width: 32rpx;
height: 32rpx;
box-sizing: border-box;
background: #FFFFFF;
border-radius: 50%;
border: 1px solid #3A80E7;
display: flex;
align-items: center;
justify-content: center;
}
.neidian {
width: 18rpx;
height: 18rpx;
background: #3A80E7;
border-radius: 50%;
}
.text3{
width: 138rpx;
height: 27rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 28rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 48rpx;
margin-bottom: 20rpx;
}
.hidden{
display: flex;
flex-direction: column;
}
.hidden_top{
display: flex;
flex-direction:column;
align-items: center;
justify-content: space-between;
height: 50rpx;
}
.text8{
display: flex;
flex-direction: row;
}
.text9{
display: flex;
}
.pitfall{
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.pitfall_header{
display: flex;
flex-direction: row;
}
.checkbox1{
display: flex;
flex-direction:column;
margin-left: 50rpx;
margin-bottom: 20rpx;
}
.input1{
width: 650rpx;
height: 90rpx;
background-color: #F7F7F7;
border-radius: 10rpx;
margin-left: 50rpx;
}
.add{
display: flex;
flex-direction: row;
box-sizing: border-box;
justify-content: center;
align-items: center;
margin: 20rpx;
}
.add_img{
width: 40rpx;
height: 40rpx;
}
.conclusion_right{
display: flex;
flex-direction: row;
}
.btn{
display: flex;
margin: 20rpx;
background-color: #3974F6;
width: 630rpx;
height: 86rpx;
border-radius: 43rpx;
justify-content: center;
align-items: center;
margin-bottom: 30px;
}
.btn_text{
justify-content: center;
align-items: center;
width: 80rpx;
height: 31rpx;
font-family: PingFang SC;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
line-height: 60rpx;
margin-bottom: 20rpx;
}
.footer{
width: 100%;
height: 100rpx;
display: flex;
justify-content: center;
align-items: center;
position: fixed;
bottom: 0;
left: 0;
z-index: 2;
}
.image-box {
width: 100%;
height: auto;
border-radius: 16rpx;
background: #fff;
margin-top: 20rpx;
box-sizing: border-box;
padding: 34rpx 60rpx;
position: relative;
}
.group{
margin-bottom: 20rpx;
}
.image-box .image-list-label {
position: absolute;
top: 35rpx;
}
.image-box .add-icon {
/* margin-top: 40rpx; */
width: 80rpx;
height: 80rpx;
margin-right: 40rpx;
}
.image-list {
width: 100%;
display: grid;
grid-template-columns: 214rpx 214rpx 214rpx;
grid-template-rows: 214rpx;
grid-gap: 17rpx;
height: 188rpx;
margin-top:80rpx ;
}
.image-list-2 {
height: 428rpx !important;
}
.image-list-3 {
height: 642rpx !important;
}
.image-list-4 {
height: 856rpx !important;
}
.image-list .image-item {
width: 100%;
height: 100%;
position: relative;
}
.image-list image {
/* width: 100%; */
/* height: 100%; */
width: 180rpx;
height: 180rpx;
object-fit: cover;
border-radius: 8rpx;
}
.image-list .image-item .loading {
position: absolute;
left: 25%;
top: 25%;
width: 50%;
height: 50%;
}
.image-list .image-item .close {
position: absolute;
top: -10rpx;
right: -10rpx;
width: 40rpx;
height: 40rpx;
}
.addHiddenDangeList{
display: flex;
flex-direction: column;
margin-left: 70rpx;
}
.addHiddenDangeListText {
margin-bottom: 20rpx;
}
.field-text{
width: 61rpx;
height: 31rpx;
overflow-wrap: break-word;
color: rgba(102,102,102,1);
font-size: 32rpx;
font-family: PingFang-SC-Regular;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
}
.popup-content{
margin: 20rpx;
display: flex;
}
.checkbox{
margin: 40rpx;
}

183
subpages/securityCheck/pages/securityCheck.js

@ -0,0 +1,183 @@
// subpages/securityCheck/securityCheck.js
import {securityCheckk} from "../../../utils/api";
Page({
data: {
pageNo: 1,
pageSize:3,
id: 0,
waitingCheckStyle: "color: #1974ec;border-bottom: 2px solid blue;",
qualifiedStyle: "",
marsi:[
//
],
flag0Array:[],
flag1Array:[],
checkResultFlag:0,
lowerThreshold:'5',
loadMoreVisible:false,
loadMoreType: "none",
nodata:false,
},
onLoad(options) {
this.getList()
},
handleTap() {
console.log('Movable view clicked');
wx.navigateTo({
url: '/subpages/InspectionReport/pages/InspectionReport/InspectionReport'
})
},
onScrollToLower(e){
console.log('gundaodi')
if (this.data.loadMoreType === 'more') {
this.setData({
loadMoreVisible: true,
})
this.data.pageNo += 1
this.getList()
}
},
getList() {
this.setData({
loadMoreVisible: true,
nodata: false,
loadMoreType: "more",
})
securityCheckk({
pageNo: this.data.pageNo,
pageSize: this.data.pageSize,
checkResultFlag:this.data.checkResultFlag
}).then(({data}) => {
// this.setData({
// marsi: data.list,
// total: data.total
// })
// this.memem();
this.setData({
loadMoreType: data.list.length === this.data.pageSize ? 'more' : 'none',
flag0Array: this.data.flag0Array.concat(data.list).filter(item => item.checkResultFlag === 0 || item.checkResultFlag == null),
flag1Array: this.data.flag1Array.concat(data.list).filter(item => item.checkResultFlag === 1)
})
if (this.data.flag0Array.length == 0) {
this.setData({
loadMoreVisible: false,
nodata: true
})
}
if (this.data.flag1Array.length == 0) {
this.setData({
loadMoreVisible: false,
nodata: true
})
}
}).catch(err=>{
console.log(err);
this.setData({
loadMoreVisible: false,
nodata: true,
})
})
},
memem() {
this.setData({
flag0Array: this.data.marsi.filter(item => item.checkResultFlag === 0 || item.checkResultFlag == null),
flag1Array: this.data.marsi.filter(item => item.checkResultFlag === 1)
});
},
handelTab(e){
console.log(e);
this.setData({
setlectVal :e.currentTarget.dataset.value
})
},
toggleColor(e) {
let value = e.currentTarget.dataset.value; // 获取点击选项的值
if (value === "1") {
this.setData({
waitingCheckStyle: "color: blue;border-bottom: 2px solid blue;",
qualifiedStyle: "",
flag0Array: []
});
this.data.checkResultFlag = 0
this.data.pageNo = 1
this.getList()
} else if (value === "2") {
this.setData({
waitingCheckStyle: "",
qualifiedStyle: "color: blue; border-bottom: 2px solid blue;",
flag1Array: []
});
this.data.checkResultFlag = 1
this.data.pageNo = 1
this.getList()
}
},
qualifed(){
wx.navigateTo({
url: '../../subpages/qualified/qualified'
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
toAddEnterprise(){
wx.navigateTo({
url: '../../../subpages/InspectionReport/pages/InspectionReport/InspectionReport',
})
},
toDetails(e){
console.log(e)
wx.navigateTo({
url: `../../../subpages/safetyinspection/pages/safetyinspection/safetyinspection?resiId=${e.currentTarget.dataset.resiid}`,
})
}
})

4
subpages/securityCheck/pages/securityCheck.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "安检巡查"
}

54
subpages/securityCheck/pages/securityCheck.wxml

@ -0,0 +1,54 @@
<!--subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml-->
<view class="page">
<view class="search">
<view class="filter" bind:tap="toggleColor" data-value="1" style="{{waitingCheckStyle}}">
待复核
</view>
<view class="filter" bind:tap="toggleColor" data-value="2" style="{{qualifiedStyle}}">
已合格
</view>
</view>
<view class="">
<view class="section_5">
<scroll-view scroll-y="{{true}}" scroll-into-view="scrollToHere" wx:if="{{waitingCheckStyle}}" style="width: 100%; height: 90vh;"
lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="list_1" wx:for="{{flag0Array}}" bind:tap="toDetails" data-resiId="{{item.id}}">
<view class="section_1-0" id="scrollToHere">
<view class="title">{{item.name}}</view>
<view class="title_mall">检查时间: {{item.orderDate}}</view>
<view class="title_mall">检查人员: {{item.checkPersons}}</view>
<view class="title_mall">隐患明细:</view>
<view class="title_mall" wx:for="{{item.hiddenDangeList}}" wx:key="index">{{item.hazardDesc}}</view>
<view class="title_mall">拟复查时间: {{item.reviewTime}}</view>
</view>
</view>
<movable-area class="movable-area">
<movable-view class="movable-view" direction="all" x="250" y="300">
<image src="../../../images/xuncha.png" class="image-wrapper" catchtouchend="handleTap"></image>
</movable-view>
</movable-area>
</scroll-view>
<scroll-view scroll-y="{{true}}" scroll-into-view="scrollToHere" wx:if="{{qualifiedStyle}}" style="width: 100%; height: 90vh;" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="list_1" wx:for="{{flag1Array}}" data-resiId="{{item.id}}" bind:tap="toDetails">
<view class="section_1-0" id="scrollToHere" >
<view class="title">{{item.name}}</view>
<view class="title_mall">检查时间: {{item.orderDate}}</view>
<view class="title_mall">检查人员: {{item.checkPersons}}</view>
<view class="title_mall">隐患明细:</view>
<view class="title_mall" wx:for="{{item.hiddenDangeList}}" wx:key="index">{{item.hazardDesc}}</view>
<view class="title_mall">拟复查时间: {{item.reviewTime}}</view>
</view>
</view>
<movable-area class="movable-area">
<movable-view class="movable-view" direction="all" x="250" y="300">
<image src="../../../images/xuncha.png" class="image-wrapper" catchtouchend="handleTap"></image>
</movable-view>
</movable-area>
</scroll-view>
</view>
</view>
</view>

185
subpages/securityCheck/pages/securityCheck.wxss

@ -0,0 +1,185 @@
/* subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxss */
page{
height: 100vh;
overflow: hidden;
background-color:#f7f7f7 ;
/*定位方式为相对定位 */
position: relative;
display: flex;
/* 按照行排序 */
flex-direction: column;
}
.search{
height: 110rpx;
width: 100%;
padding:0 22rpx;
box-sizing: border-box;
background-color: #fff;
display: flex;
align-items: center;
/* justify-content: space-between; */
padding-top: 20rpx;
box-sizing: border-box;
}
.filter{
margin-left: 10rpx;
margin-right: 40rpx;
}
.box_2 {
background-color: rgba(247,247,247,1.000000);
border-radius: 20rpx;
/* 相对于父级进行定位 */
/* position: absolute; */
left: 0rpx;
/* top: 181rpx; */
width: 750rpx;
height: 1365rpx;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
/* .section_5 {
width: 100%;
height: 1395rpx;
display: flex;
flex-direction: column;
overflow-y: auto;
} */
.section_5 {
width: 100%;
height: 1395rpx;
display: flex;
flex-direction: column;
overflow: hidden;
}
.content_1{
display: flex;
/* flex-direction: row; */
justify-self:center;
margin: 40rpx 0 0 10rpx;
}
.content_1>view{
display: flex;
flex-direction: column;
align-items: center;
width: 250rpx;
height:210rpx;
}
.data{
display: flex;
flex-direction: column;
margin: 40rpx 0 0 10rpx;
}
.data >view{
display: flex;
flex-direction: column;
align-items: center;
width: 303rpx;
height: 200rpx;
}
.house{
display: flex;
justify-content: start;
margin: 40rpx 0 0 10rpx;
}
.house >view{
display: flex;
flex-direction: column;
align-items: center;
width: 303rpx;
height: 200rpx;
}
.image_2 {
width: 158rpx;
height: 56rpx;
margin-left: 332rpx;
}
.list_1 {
/* width: 710rpx; */
/* height: 603rpx; */
/* display: flex; */
/* flex-direction: column; */
/* justify-content: space-between; */
margin: 20rpx 0 0 20rpx;
/* width: 100%; */
}
.section_1-0 {
background-color: rgba(255,255,255,1.000000);
border-radius: 20rpx;
/* height: 410rpx; */
/* width: 710rpx; */
display: flex;
flex-direction: column;
padding-bottom: 10px;
}
.image-wrapper_9-1{
width: 404rpx;
height: 100rpx;
flex-direction: row;
display: flex;
justify-content: space-between;
margin: 40rpx 0 0 59rpx;
}
.text-wrapper_7-0 {
width: 134rpx;
height: 33rpx;
display: flex;
/* row水平排列 */
flex-direction: row;
margin: 29rpx 0 0 29rpx;
}
.text_2-0 {
width: 134rpx;
height: 33rpx;
/* 文本换行 */
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 34rpx;
font-family: PingFang-SC-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
}
.title{
margin-top: 20rpx;
font-size: 16px;
font-weight: 550;
margin-left: 30rpx;
}
.title_mall{
margin-top: 20rpx;
font-size: 13px;
opacity: 0.5;
margin-left: 30rpx;
}
.movable-area{
pointer-events:none;
z-index: 100;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.movable-view{
pointer-events:auto;
height: 50px;
width: 50px;
}
.image-wrapper{
width: 200rpx;
height: 200rpx;
}

22
utils/api.js

@ -76,8 +76,12 @@ module.exports = {
houseResidentChangeRecord,
waitCollectHouseList,
nonIntResiList,
securityCheckk,
overView,
getFamilyRelationshipListByHouseId,
addRecord,
showRecord,
inspectionStaff,
getChangeRecordsById
}
@ -401,6 +405,10 @@ function waitCollectHouseList(parm){
function nonIntResiList(parm){
return fly.get(`actual/base/residentIntegrity/resiCategoryStats/nonIntResiList`,parm)
}
//安检巡查分页查询
function securityCheckk(parm){
return fly.post(`actual/base/companyInfo/page`,parm)
}
//
function overView(parm){
return fly.get(`actual/base/communityHouse/resiAndHouseCollect/overview`,parm)
@ -410,6 +418,16 @@ function getChangeRecordsById(id) {
return fly.post(`actual/base/residentChangeRecord/getChangeRecordsById/${id}`,)
}
//巡查记录--新增
function addRecord(parm){
return fly.post(`actual/base/companyInfo/addRecord`,parm)
}
//巡查记录--展示
function showRecord(parm){
return fly.post(`actual/base/companyInfo/showRecord`,parm)
}
//检查人员
function inspectionStaff(parm){
return fly.post(`data/aggregator/org/stafflist`,parm)
}

Loading…
Cancel
Save