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 @@
@@ -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 @@
-
+
@@ -95,10 +95,23 @@
imgboxshow = false">
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/xiangmu/addxiangmu.vue b/src/pages/xiangmu/addxiangmu.vue
index 48469f2..9234e78 100644
--- a/src/pages/xiangmu/addxiangmu.vue
+++ b/src/pages/xiangmu/addxiangmu.vue
@@ -1,6 +1,6 @@
-
+
*
- 系统合同号:
+
+ 系统合同号:
+ (执行中的合同)
+
-
-
+
+
@@ -185,53 +188,59 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
+
-
+
+
+
+
+
+
+ style="width:700px ; border: 1px dashed #e0e0e0; padding:20px; padding-bottom: 10px; margin-bottom: 20px; position: relative; border-radius: 4px; ">
@@ -364,8 +373,10 @@
@click="delbulid(item,index)">
+
+
-
+
@@ -377,36 +388,37 @@
-
-
+
-
+
-
+
-
+
-
+
-
+
+
@@ -520,6 +532,7 @@
remark: "", // 备注
startDate: "" // 启动日期
},
+ buildingCmdsListold: [],
buildingCmdsList: [{
buildingId: null, // 建筑物主键
projectId: null, // 项目主键
@@ -553,6 +566,7 @@
postId: null, // 岗位ID
roleId: null, //角色ID
}],
+ yqgjlistold: [],
yqgjlist: [{
instrumentId: null, //仪器工具主键
projectId: null, // 项目主键
@@ -663,7 +677,7 @@
this.getsystemrole(); //获取角色
this.getsystemuser(); //获取人员信息
this.getsystempost(); //获取岗位信息
- if (this.objitem) {
+ if (this.objitem.isedit == 1) {
if (this.objitem.projectid) {
this.projectid = this.objitem.projectid;
this.projectName = this.objitem.projectName;
@@ -749,6 +763,15 @@
}).then((res) => {
// debugger
this.renyuanlist = res.rows;
+
+ if (this.renyuanlist.length > 0) {
+ //debugger
+ if (this.renyuanlist[0].nickName == 'admin') {
+ this.renyuanlist.splice(0, 1);
+ }
+
+ }
+
})
},
getsystempost() {
@@ -886,6 +909,15 @@
//debugger
this.xththlist = this.parseObjectToArray(res.data.contracts);
this.xmfzrlist = this.parseObjectToArray(res.data.staffers);
+ // this.xmfzrlist = this.parseObjectToArray(res.data.staffers);
+ if (this.xmfzrlist.length > 0) {
+ //debugger
+ if (this.xmfzrlist[0].label == 'admin') {
+ this.xmfzrlist.splice(0, 1);
+ }
+
+ }
+
if (!this.isedit) {
this.getclassificationlist(this.buildingCmdsList[0], 0); //建筑分类
}
@@ -970,9 +1002,9 @@
// console.log('返回成功')
// }
// });
- // setTimeout(() => {
- // this.$emit("righteventclose"); //执行父级函数
- // }, 300);
+ setTimeout(() => {
+ this.$emit("shaunxian"); //执行父级函数
+ }, 300);
});
} else {
@@ -985,9 +1017,9 @@
// console.log('返回成功')
// }
// });
- // setTimeout(() => {
- // this.$emit("righteventclose"); //执行父级函数
- // }, 300);
+ setTimeout(() => {
+ this.$emit("shaunxian"); //执行父级函数
+ }, 300);
this.projectid = res.data.projectId;
this.isedit = true;
this.formdata.projectId = res.data.projectId;
@@ -1007,7 +1039,10 @@
// postId: null, // 岗位ID
// roleId: null, //角色ID
// }],
-
+ if (!this.projectid) {
+ this.$modal.msgError(`请先保存项目信息!`)
+ return false;
+ }
for (let index = 0; index < this.xmcylist.length; index++) {
const element = this.xmcylist[index];
if (!element.staffId) {
@@ -1087,7 +1122,10 @@
// jzfllist2: [],
// jzfllist3: [],
// }],
-
+ if (!this.projectid) {
+ this.$modal.msgError(`请先保存项目信息!`)
+ return false;
+ }
for (let index = 0; index < this.buildingCmdsList.length; index++) {
const element = this.buildingCmdsList[index];
if (this.projectid) {
@@ -1145,7 +1183,7 @@
}
-
+ let delIds = this.findDeletedIds(this.buildingCmdsListold, this.buildingCmdsList, 'buildingId');
//debugger
if (this.projectid != '' & this.isedit) {
//编辑
@@ -1164,7 +1202,7 @@
});
} else {
- upsafety_hazardbuilding(this.buildingCmdsList).then(res => {
+ upsafety_hazardbuilding(delIds, this.buildingCmdsList).then(res => {
// debugger
this.$modal.msgSuccess("添加成功!");
// uni.navigateBack({
@@ -1181,7 +1219,10 @@
}
},
-
+ findDeletedIds(oldArray, newArray, idname) {
+ const newArrayIds = new Set(newArray.map(item => item[`${idname}`]));
+ return oldArray.filter(item => !newArrayIds.has(item[`${idname}`])).map(item => item[`${idname}`]);
+ },
baocunyqgj() {
//保存仪器工具信息
// yqgjlist: [{
@@ -1193,6 +1234,13 @@
// status: "", // 帐号状态(0正常 1停用)
// remark: "" // 备注
// }],
+ //debugger
+ if (!this.projectid) {
+ this.$modal.msgError(`请先保存项目信息!`)
+ return false;
+ }
+ let delIds = this.findDeletedIds(this.yqgjlistold, this.yqgjlist, 'instrumentId');
+
for (let index = 0; index < this.yqgjlist.length; index++) {
const element = this.yqgjlist[index];
@@ -1217,7 +1265,12 @@
//debugger
if (this.projectid != '' & this.isedit) {
//编辑
- upsafety_hazardinstrument(this.yqgjlist).then(res => {
+
+ // let dataform={
+ // delIds:this.yqgjlist,
+
+ // }
+ upsafety_hazardinstrument(delIds, this.yqgjlist, ).then(res => {
//debugger
this.$modal.msgSuccess("修改成功!");
// uni.navigateBack({
@@ -1305,6 +1358,8 @@
s.jzfllist2 = [];
s.jzfllist3 = [];
}
+ this.buildingCmdsListold = JSON.parse(JSON.stringify(datalist));
+
this.buildingCmdsList = datalist;
this.buildingCmdsList.map((element, index) => {
this.getclassificationlist(element, 0); //建筑分类
@@ -1362,6 +1417,7 @@
projectId: this.projectid
}).then((res) => {
// debugger
+ this.yqgjlistold = JSON.parse(JSON.stringify(res.rows || []));
this.yqgjlist = res.rows || [{
instrumentId: null, //仪器工具主键
projectId: this.projectid, // 项目主键
@@ -1633,5 +1689,29 @@
}
}
}
+
+ ::v-deep .mewtable2bs {
+ .u-table__header {
+
+ .u-table__header__column:nth-child(1),
+ .u-table__header__column:nth-child(2),
+ .u-table__header__column:nth-child(3) {
+ color: red;
+ }
+ }
+
+ }
+
+ ::v-deep .mewtable3bs {
+ .u-table__header {
+
+ .u-table__header__column:nth-child(2),
+ .u-table__header__column:nth-child(3),
+ .u-table__header__column:nth-child(4) {
+ color: red;
+ }
+ }
+
+ }
}
\ No newline at end of file
diff --git a/src/pages/xiangmu/listindex.vue b/src/pages/xiangmu/listindex.vue
index f051683..7e01b23 100644
--- a/src/pages/xiangmu/listindex.vue
+++ b/src/pages/xiangmu/listindex.vue
@@ -96,7 +96,7 @@
-
@@ -253,7 +253,8 @@
getprojectlist,
getprojectlistdefaultCondtion,
getprojectinfo,
- setsafety_hazardprojectstatus
+ setsafety_hazardprojectstatus,
+ delsafety_hazardproject
} from "@/apis/xiangmu"
import {
@@ -688,12 +689,18 @@
//this.activeitem.projectId
this.$modal.confirm('确定要删除此条信息吗?').then(() => {
// debugger
- delquestionnaire(checkTableIds).then((res) => {
+ delsafety_hazardproject(checkTableIds).then((res) => {
// debugger
- this.$modal.msgSuccess("删除成功!");
- setTimeout(() => {
- this.getlistinfo(); //获取检查列表
- }, 300);
+ if (res.data.failedDetailString) {
+ this.$modal.msgError(res.data.failedDetailString);
+ } else {
+ this.$modal.msgSuccess("删除成功!");
+
+ setTimeout(() => {
+ this.getlistinfo(); //获取检查列表
+ }, 1000);
+ }
+
})
});
},
@@ -951,7 +958,7 @@
this.shanchujiancha();
},
- openright(item) {
+ openright() {
// /debugger
// uni.navigateTo({
// url: `/pages/zhixing/addjianchabiao?isedit=1&projectid=${this.activeitem.projectId}&checkTableId=${this.activeitem.checkTableId}&id1=${this.activeitem.standardCheckTable1Id}&id2=${this.activeitem.standardCheckTable2Id}&id3=${this.activeitem.standardCheckTable3Id}&id4=${this.activeitem.standardCheckTable4Id}&projectName=${this.queryParams.projectname}`,
@@ -964,6 +971,10 @@
// item.id3 = item.standardCheckTable3Id;
// item.id4 = item.standardCheckTable4Id;
// this.rowitem = item;
+ let item2 = {
+ isedit: 0,
+ }
+ this.rowitem = item2;
this.sjnum = Math.random();
this.$refs.showright.open();
},
diff --git a/src/pages/xiangmu/yezhudanwei.vue b/src/pages/xiangmu/yezhudanwei.vue
index 1e29e59..6fbea70 100644
--- a/src/pages/xiangmu/yezhudanwei.vue
+++ b/src/pages/xiangmu/yezhudanwei.vue
@@ -129,8 +129,11 @@
width: columns[3].width + 'px',
minWidth: columns[3].minWidth + 'px'
}">
-
+
+
+
化学品数量:
-
+
+
@@ -208,12 +209,15 @@
-
+
-
+
@@ -514,6 +518,10 @@
this.formdata.fireResult = ''; // 处理结果 false
}
},
+ quxiaoxm() {
+ //取消关闭
+ this.$emit("righteventclose"); //执行父级函数
+ },
baocun() {
//保存
diff --git a/src/pages/zhixing/jianchabiao.vue b/src/pages/zhixing/jianchabiao.vue
index c8affaa..76e58f8 100644
--- a/src/pages/zhixing/jianchabiao.vue
+++ b/src/pages/zhixing/jianchabiao.vue
@@ -20,7 +20,7 @@
*
项目编号:
-
@@ -156,8 +156,10 @@
imgboxshow = false">
-
-
+
+
@@ -648,7 +650,7 @@ width: 100%;align-items: left; border-top:1px solid #eee;">
res.rows = res.rows || [];
for (let s of res.rows) {
s.title = s.info + ` -(${s.createBy})`;
- s.desc = s.createTime ? this.$dayjs(s.createTime).format("YYYY-MM-DD HH:mm:ss") : '';
+ s.desc = s.createTime ? this.$dayjs(s.createTime).format("YYYY-MM-DD HH:mm") : '';
}
this.bglslist = res.rows;
diff --git a/src/pages/zhixing/jianchabiao000000.vue b/src/pages/zhixing/jianchabiao000000.vue
index 7f91ad5..ce047e6 100644
--- a/src/pages/zhixing/jianchabiao000000.vue
+++ b/src/pages/zhixing/jianchabiao000000.vue
@@ -510,7 +510,7 @@ width: 100%;align-items: left; border-top:1px solid #eee;">
res.rows = res.rows || [];
for (let s of res.rows) {
s.title = s.info + ` -(${s.createBy})`;
- s.desc = s.createTime ? this.$dayjs(s.createTime).format("YYYY-MM-DD HH:mm:ss") : '';
+ s.desc = s.createTime ? this.$dayjs(s.createTime).format("YYYY-MM-DD HH:mm") : '';
}
this.bglslist = res.rows;
diff --git a/src/pages/zhixing/wenjuan.vue b/src/pages/zhixing/wenjuan.vue
index 2f57d1a..4dc0f37 100644
--- a/src/pages/zhixing/wenjuan.vue
+++ b/src/pages/zhixing/wenjuan.vue
@@ -17,9 +17,9 @@
*
项目编号:
-
+
@@ -78,7 +78,7 @@
-->
-
@@ -499,6 +499,23 @@
}
});
},
+
+ changexmbh(e) {
+ //项目编号
+ //debugger
+ if (e) {
+ this.queryParams.projectname = e.lablename;
+ this.queryParams.projectId = e.projectId;
+ }
+
+ if (e) {
+ setprojectcurrent(this.queryParams.projectId).then((res) => {
+ //保存选择的项目编号
+ this.userStore.setproject(e.projectId, e.lablename);
+ });
+ }
+
+ },
changexthth(e) {
//系统合同号
//debugger
@@ -804,47 +821,46 @@
this.xmpickerConfig.options = res.data.projects || [];
if (this.xmdwlist.length > 0) {
- //debugger
- // this.queryParams.projectId = this.xmdwlist[0].projectId;
- // this.queryParams.projectname = this.xmdwlist[0].lablename;
- getprojectcurrent().then((res2) => {
- //获取当前保存过的项目 没有就默认
- // debugger
- if (res2.data) {
- if (this.contractId == res2.data.contractId) {
- //当前选的和保存的一样
- this.queryParams.projectId = res2.data.projectId;
- this.queryParams.projectname = res2.data.projectNo + `(${res2.data.name})`;
- this.userStore.setproject(this.xmdwlist[0].projectId, res2.data.projectNo +
- `(${res2.data.name})`);
- } else {
- this.queryParams.projectId = this.xmdwlist[0].projectId;
- this.queryParams.projectname = this.xmdwlist[0].lablename;
+ // getprojectcurrent().then((res2) => {
+ // //获取当前保存过的项目 没有就默认
+ // // debugger
+ // if (res2.data) {
+ // if (this.contractId == res2.data.contractId) {
+ // //当前选的和保存的一样
+ // this.queryParams.projectId = res2.data.projectId;
+ // this.queryParams.projectname = res2.data.projectNo + `(${res2.data.name})`;
- setprojectcurrent(this.queryParams.projectId).then((res) => {
- //保存选择的项目编号
- this.userStore.setproject(this.xmdwlist[0].projectId, this.xmdwlist[0].lablename);
- });
- }
+ // this.userStore.setproject(this.xmdwlist[0].projectId, res2.data.projectNo +
+ // `(${res2.data.name})`);
+ // } else {
+ // this.queryParams.projectId = this.xmdwlist[0].projectId;
+ // this.queryParams.projectname = this.xmdwlist[0].lablename;
- } else {
- this.queryParams.projectId = this.xmdwlist[0].projectId;
- this.queryParams.projectname = this.xmdwlist[0].lablename;
+ // setprojectcurrent(this.queryParams.projectId).then((res) => {
+ // //保存选择的项目编号
+ // this.userStore.setproject(this.xmdwlist[0].projectId, this.xmdwlist[0].lablename);
+ // });
+ // }
- setprojectcurrent(this.queryParams.projectId).then((res) => {
- //保存选择的项目编号
- this.userStore.setproject(this.xmdwlist[0].projectId, this.xmdwlist[0].lablename);
- });
- }
- this.getlistinfo(); //获取检查列表
- });
+ // } else {
+ // this.queryParams.projectId = this.xmdwlist[0].projectId;
+ // this.queryParams.projectname = this.xmdwlist[0].lablename;
+
+ // setprojectcurrent(this.queryParams.projectId).then((res) => {
+ // //保存选择的项目编号
+ // this.userStore.setproject(this.xmdwlist[0].projectId, this.xmdwlist[0].lablename);
+ // });
+ // }
+ // this.getlistinfo(); //获取检查列表
+ // });
- } else {
- this.getlistinfo(); //获取检查列表
}
+ // else {
+ // this.getlistinfo(); //获取检查列表
+ // }
- // this.getlistinfo(); //获取问卷列表
+ this.getlistinfo(); //获取问卷列表
})
},
clickcell(row, column, cell, event) {
diff --git a/src/store/user.ts b/src/store/user.ts
index ab18365..1eb30d3 100644
--- a/src/store/user.ts
+++ b/src/store/user.ts
@@ -29,6 +29,7 @@ interface userInfoStoreInt {
xththstr: string
projectid: string
projectname: string
+ androidappVersion: string
}
// 创建小仓库
@@ -54,7 +55,8 @@ export default defineStore(
xththid: '',
xththstr: '',
projectid: '',
- projectname: ''
+ projectname: '',
+ androidappVersion: ''
})
//debugger
userInfo.value.token = getToken()
@@ -75,6 +77,7 @@ export default defineStore(
userInfo.value.xththid = storage.get(constant.xththid)
userInfo.value.projectid = storage.get(constant.projectid)
userInfo.value.projectname = storage.get(constant.projectname)
+ userInfo.value.androidappVersion = storage.get(constant.androidappVersion)
const token = computed(() => {
// debugger
@@ -131,6 +134,9 @@ export default defineStore(
const projectname = computed(() => {
return userInfo.value.projectname
})
+ const androidappVersion = computed(() => {
+ return userInfo.value.androidappVersion
+ })
const parentmenutitle = computed(() => {
return userInfo.value.parentmenutitle
@@ -178,6 +184,11 @@ export default defineStore(
userInfo.value.childrenmenutitle = childrenmenutitle
storage.set(constant.childrenmenutitle, childrenmenutitle)
}
+ function setandroidappVersion(androidappVersion: any) {
+ userInfo.value.androidappVersion = androidappVersion
+ storage.set(constant.androidappVersion, androidappVersion)
+ }
+
// 登录
function userLogin(dataInfo: { username: string; password: string; code: string; uuid: string; mianlogin: boolean }) {
return new Promise((resolve, reject) => {
@@ -298,7 +309,8 @@ export default defineStore(
xththid: '',
xththstr: '',
projectid: '',
- projectname: ''
+ projectname: '',
+ androidappVersion: ''
}
uni.clearStorageSync()
goToPage({
@@ -348,7 +360,9 @@ export default defineStore(
xththstr,
projectid,
projectname,
- setproject
+ setproject,
+ androidappVersion,
+ setandroidappVersion
}
},
{
diff --git a/src/utils/constant.ts b/src/utils/constant.ts
index e66dc0b..ef61ebc 100644
--- a/src/utils/constant.ts
+++ b/src/utils/constant.ts
@@ -15,7 +15,8 @@ const constant = {
xththid: 'vuex_xththid',
xththstr: 'vuex_xththstr',
projectid: 'vuex_projectid',
- projectname: 'vuex_projectname'
+ projectname: 'vuex_projectname',
+ androidappVersion: 'vuex_androidappVersion'
}
export default constant
diff --git a/src/utils/storage.ts b/src/utils/storage.ts
index c57d133..15c9ac0 100644
--- a/src/utils/storage.ts
+++ b/src/utils/storage.ts
@@ -20,7 +20,8 @@ let storageNodeKeys = [
constant.xththid,
constant.xththstr,
constant.projectid,
- constant.projectname
+ constant.projectname,
+ constant.androidappVersion
]
const storage = {
diff --git a/vite.config.ts b/vite.config.ts
index bc626f6..9f5cc17 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,5 +1,6 @@
import { defineConfig, loadEnv } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
+
// import Components from 'unplugin-vue-components/vite'
import AutoImport from 'unplugin-auto-import/vite'
import path from 'path'
@@ -16,6 +17,7 @@ export default defineConfig(({ mode }) => {
transpileDependencies: ['uview-plus'],
plugins: [
uni(),
+
AutoImport({
imports: ['vue', 'uni-app'],
// 生成自动导入的TS声明文件