From 7498a8359043f7db3d21d52581e32a600d5ad0fd Mon Sep 17 00:00:00 2001 From: ancong <12345678> Date: Tue, 11 Nov 2025 09:56:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E6=9C=9F=E7=BB=93=E6=9D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 8 +- package-lock.json | 4 +- src/apis/jianzhuwu.ts | 4 +- src/apis/yezhudanwei.ts | 2 +- src/apis/yiqigj.ts | 4 +- .../components/cl-upload/cl-upload.vue | 77 ++++++--- src/components/signature/landscape.vue | 8 +- src/components/uni-menu/uni-menu.vue | 26 ++- src/manifest.json | 4 +- src/pages/hetong/hetong.vue | 55 +++++-- src/pages/jianyi/jianyi.vue | 21 ++- src/pages/xiangmu/addxiangmu.vue | 152 +++++++++++++----- src/pages/xiangmu/listindex.vue | 27 +++- src/pages/xiangmu/yezhudanwei.vue | 42 ++++- src/pages/zhixing/addwenjuan.vue | 14 +- src/pages/zhixing/jianchabiao.vue | 10 +- src/pages/zhixing/jianchabiao000000.vue | 2 +- src/pages/zhixing/wenjuan.vue | 92 ++++++----- src/store/user.ts | 20 ++- src/utils/constant.ts | 3 +- src/utils/storage.ts | 3 +- vite.config.ts | 2 + 22 files changed, 421 insertions(+), 159 deletions(-) diff --git a/.env.production b/.env.production index 04ac7ed..b4c40f7 100644 --- a/.env.production +++ b/.env.production @@ -1,9 +1,9 @@ ENV='production' # base api -#VITE_APP_BASE_URL='http://219.146.89.198' -#VITE_APP_BASE_URLpro='9380' - VITE_APP_BASE_URL='http://219.146.89.198' -VITE_APP_BASE_URLpro='18080' +VITE_APP_BASE_URLpro='9380' + +#VITE_APP_BASE_URL='http://219.146.89.198' +#VITE_APP_BASE_URLpro='18080' VITE_APP_BASE_PRE='/prod-api' VITE_APP_BASE_NAME='vite项目' diff --git a/package-lock.json b/package-lock.json index bbd8904..073cf9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,6 +26,7 @@ "dayjs": "^1.11.9", "gcoord": "^1.0.7", "pinia": "2.0.36", + "sass": "^1.69.5", "uview-next": "^3.7.3", "vue": "^3.2.45", "vue-i18n": "^11.1.12", @@ -50,7 +51,6 @@ "husky": "^8.0.0", "pinia-plugin-unistorage": "^0.0.17", "prettier": "^3.0.0", - "sass": "^1.69.5", "sass-loader": "^16.0.5", "typescript": "^4.9.4", "unplugin-auto-import": "^0.16.6", @@ -8601,7 +8601,6 @@ "version": "4.3.7", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", - "devOptional": true, "license": "MIT" }, "node_modules/import-fresh": { @@ -12167,7 +12166,6 @@ "version": "1.69.5", "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz", "integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==", - "devOptional": true, "license": "MIT", "dependencies": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/src/apis/jianzhuwu.ts b/src/apis/jianzhuwu.ts index cf0e956..4adf8ae 100644 --- a/src/apis/jianzhuwu.ts +++ b/src/apis/jianzhuwu.ts @@ -31,9 +31,9 @@ export const addsafety_hazardbuilding = async (data: any) => { *批量修改建筑物 safety_hazard:project:edit * @returns */ -export const upsafety_hazardbuilding = async (data: any) => { +export const upsafety_hazardbuilding = async (delIds: any, data: any) => { return await request.http({ - url: '/safety_hazard/building/batch', + url: '/safety_hazard/building/batch?delIds=' + delIds, data: data, // isPost: true, isPost: '2' diff --git a/src/apis/yezhudanwei.ts b/src/apis/yezhudanwei.ts index 80b9606..28bdfba 100644 --- a/src/apis/yezhudanwei.ts +++ b/src/apis/yezhudanwei.ts @@ -97,6 +97,6 @@ export const setsafety_hazardcompanystatus = async (customerCompanyId: any, stat return await request.http({ url: `/safety_hazard/company/status/${customerCompanyId}/${status}`, - isPost: '0' + isPost: '2' }) } diff --git a/src/apis/yiqigj.ts b/src/apis/yiqigj.ts index c6c03dd..167a98a 100644 --- a/src/apis/yiqigj.ts +++ b/src/apis/yiqigj.ts @@ -31,9 +31,9 @@ export const addsafety_hazardinstrument = async (data: any) => { *批量修改仪器工具 safety_hazard:project:edit * @returns */ -export const upsafety_hazardinstrument = async (data: any) => { +export const upsafety_hazardinstrument = async (delIds: any, data: any) => { return await request.http({ - url: '/safety_hazard/instrument/batch', + url: '/safety_hazard/instrument/batch?delIds=' + delIds, data: data, // isPost: true, isPost: '2' diff --git a/src/components/cl-upload/components/cl-upload/cl-upload.vue b/src/components/cl-upload/components/cl-upload/cl-upload.vue index a867dcb..0fbfdf4 100644 --- a/src/components/cl-upload/components/cl-upload/cl-upload.vue +++ b/src/components/cl-upload/components/cl-upload/cl-upload.vue @@ -443,35 +443,60 @@ const compress = that.imageFormData?.compress || false; // 限制图片上传尺寸 - if (that.imageFormData?.size ?? false) { - const maxSize = that.imageFormData.size * 1024 * 1024 + // if (that.imageFormData?.size ?? false) { + // const maxSize = that.imageFormData.size * 1024 * 1024 - tempFiles.map((imgInfo, index) => { - if (imgInfo.size > maxSize) { - tempFiles.splice(index, 1) - that.$emit('onImageSize', imgInfo) - return uni.showToast({ - title: `图片最大上传${that.imageFormData.size}MB`, - duration: 2000, - icon: 'none' - }); - } - }) - } + // tempFiles.map((imgInfo, index) => { + // if (imgInfo.size > maxSize) { + // tempFiles.splice(index, 1) + // that.$emit('onImageSize', imgInfo) + // return uni.showToast({ + // title: `图片最大上传${that.imageFormData.size}MB`, + // duration: 2000, + // icon: 'none' + // }); + // } + // }) + // } - // 开启压缩图片 - if (compress) { - const compressedImagePathList = tempFiles.map(imageItem => { - return that.compressImage(imageItem.path) - }) + // // 开启压缩图片 + // if (compress) { + // const compressedImagePathList = tempFiles.map(imageItem => { + // return that.compressImage(imageItem.path) + // }) - Promise.all(compressedImagePathList).then(result => { - upload(result); - }) + // Promise.all(compressedImagePathList).then(result => { + // upload(result); + // }) - } else { - upload(tempFiles); - } + // } else { + // upload(tempFiles); + // } + const maxSize = 5 * 1024 * 1024; //暂定超过5m压缩 + + tempFiles.map((imgInfo, index) => { + // debugger + if (imgInfo.size > maxSize) { + console.log('大于5m', imgInfo.size) + // tempFiles.splice(index, 1) + // that.$emit('onImageSize', imgInfo) + // return uni.showToast({ + // title: `图片最大上传${that.imageFormData.size}MB`, + // duration: 2000, + // icon: 'none' + // }); + const compressedImagePathList = tempFiles.map(imageItem => { + return that.compressImage(imageItem.path) + }) + Promise.all(compressedImagePathList).then(result => { + upload(result); + }); + return + } else { + upload(tempFiles); + return + } + }) function upload(tempImages) { if (that.autoUpload) { @@ -759,7 +784,7 @@ // #ifndef H5 uni.compressImage({ src: tempFilePaths, - quality: that.imageFormData.quality || 80, + quality: that.imageFormData.quality || 60, success: res => { resolve(res.tempFilePath); uni.hideLoading(); diff --git a/src/components/signature/landscape.vue b/src/components/signature/landscape.vue index cd94c54..25ecd94 100644 --- a/src/components/signature/landscape.vue +++ b/src/components/signature/landscape.vue @@ -40,7 +40,7 @@ color: 'rgba(0, 0, 0, 0.1)', fontSize: 15, fontFamily: 'Arial', - rotate: 60, + rotate: -30, spacing: 150, single: false } @@ -88,6 +88,12 @@ onWatermarkConfirm(res) { this.watermarkResult = res } + }, + mounted() { + + this.watermark.text = `火灾与建筑物安全隐患排查平台` + this.$dayjs().format("YYYY-MM-DD HH:mm"); + + } } diff --git a/src/components/uni-menu/uni-menu.vue b/src/components/uni-menu/uni-menu.vue index bfd9a03..a965768 100644 --- a/src/components/uni-menu/uni-menu.vue +++ b/src/components/uni-menu/uni-menu.vue @@ -49,8 +49,14 @@ width="40px" height="40px" /> - - {{ userStore.name }} + + + {{ userStore.name }} + + {{ userStore.androidappVersion }} + + @@ -67,7 +73,7 @@ - {{item.label}} + {{index==0?item.label:`${item.label}`}} @@ -381,6 +387,14 @@ } }); }, + // xitongbanben(){ + // plus.runtime.getProperty(plus.runtime.appid, (info) => { + // // console.log(JSON.stringify(info)); + // this.appVersion = info.version; + // // this.panduan(); + // // this.getxinapphost(); //获取新的app地址 + // }) + // }, shauxin() { // 在页面方法中调用 // uni.reload(); @@ -464,7 +478,7 @@ //判断是否为安卓去更新版本 let shebeitype = uni.getSystemInfoSync().osName; //判断是否Android或ios 'android', 'ios' // debugger - //console.log('环境', shebeitype); + // console.log('环境', shebeitype); if (shebeitype == 'android') { //获取版本号 并且请求接口获取最新app 进行比较是否更新 @@ -473,6 +487,9 @@ plus.runtime.getProperty(plus.runtime.appid, (info) => { //console.log('获取出来的', JSON.stringify(info)); this.appVersion = info.version; + + this.userStore.setandroidappVersion('V' + this.appVersion); + console.log('当前版本', this.userStore.androidappVersion); //1:android, 2:ios, 3:harmony framework:app:query getappConfigKey('1').then(res => { // debugge @@ -526,6 +543,7 @@ // debugger // }); // #ifdef APP-PLUS + //console.log('环境反对等等等等等等等等等等等等等等'); this.upgrade(); //获取版本号 并且请求接口获取最新app 进行比较是否更新 // #endif } diff --git a/src/manifest.json b/src/manifest.json index 29bf5f7..b563e96 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -3,8 +3,8 @@ "appid" : "__UNI__D31BBA7", "package" : "com.skzh.hzyjzaqyhglpt", "description" : "安全隐患排查app", - "versionName" : "1.0.4", - "versionCode" : 104, + "versionName" : "2.0.0", + "versionCode" : 200, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/src/pages/hetong/hetong.vue b/src/pages/hetong/hetong.vue index eb2780a..f1f0e1f 100644 --- a/src/pages/hetong/hetong.vue +++ b/src/pages/hetong/hetong.vue @@ -7,9 +7,11 @@ 委托单位: - - + + @@ -40,8 +42,12 @@ 状态: - + + + @@ -68,10 +74,13 @@ + - @@ -205,7 +214,8 @@ } from "@/apis/hetong" import { - parseObjectToArray + parseObjectToArray, + downloadBinaryFile } from "@/utils/util" @@ -221,6 +231,7 @@ }, data() { return { + userStore: useUserStore(), highRiskFlag: false, isedit: false, formdata: { @@ -325,6 +336,7 @@ }, methods: { parseObjectToArray, + downloadBinaryFile, addwtdwchange(e) { //新增编辑时 委托单位 // debugger @@ -398,6 +410,17 @@ }); }, + daochu() { + //导出 + let url = this.userStore.allurl + '/safety_hazard/contract/export/' + this.activeitem.contractId; + this.downloadBinaryFile(url); + // daochuword({ + // projectId: this.activeitem.projectId + // }).then((res) => { + // debugger + + // }); + }, wanjie() { //完结 setsafety_hazardcontractstatus(this.activeitem.contractId, '2').then((res) => { @@ -420,13 +443,21 @@ let contractIds = this.activenumlist; //this.activeitem.questionnaireId this.$modal.confirm('确定要删除选中信息吗?').then(() => { - // debugger + // debugger delsafety_hazardcontract(contractIds).then((res) => { // debugger - this.$modal.msgSuccess("删除成功!"); - setTimeout(() => { - this.getlistinfo(); //获取合同列表 - }, 300); + // this.$modal.msgSuccess("删除成功!"); + if (res.data.failedDetailString) { + this.$modal.msgError(res.data.failedDetailString); + } else { + this.$modal.msgSuccess("删除成功!"); + setTimeout(() => { + this.getlistinfo(); //获取合同列表 + }, 1000); + } + + + }) }); }, diff --git a/src/pages/jianyi/jianyi.vue b/src/pages/jianyi/jianyi.vue index 439a011..81dc171 100644 --- a/src/pages/jianyi/jianyi.vue +++ b/src/pages/jianyi/jianyi.vue @@ -78,8 +78,8 @@