二期结束

This commit is contained in:
ancong 2025-11-11 09:56:58 +08:00
parent 7dcac380a8
commit 7498a83590
22 changed files with 421 additions and 159 deletions

View File

@ -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项目'

4
package-lock.json generated
View File

@ -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",

View File

@ -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'

View File

@ -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'
})
}

View File

@ -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'

View File

@ -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'
// });
// }
// })
// }
// //
// if (compress) {
// const compressedImagePathList = tempFiles.map(imageItem => {
// return that.compressImage(imageItem.path)
// })
// Promise.all(compressedImagePathList).then(result => {
// upload(result);
// })
// } else {
// upload(tempFiles);
// }
const maxSize = 5 * 1024 * 1024; //5m
tempFiles.map((imgInfo, index) => {
// debugger
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) {
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();

View File

@ -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");
}
}
</script>

View File

@ -49,8 +49,14 @@
width="40px" height="40px" />
</view>
<view style="display: flex;flex-direction: column;align-items: center; ">
<view class="mingzi" style="display: flex;flex-direction: row;align-items: center;">
<view class="username" style="line-height:50px;">{{ userStore.name }}</view>
<view class="mingzi"
style="display: flex;flex-direction: column;justify-content:center; align-items: center;">
<!-- <view class="username" style="line-height:50px;">{{ userStore.name }}</view> -->
<view class="username" style="margin-top: 12px;">{{ userStore.name }}</view>
<view class="username" style="margin-top:4px; font-size: 12px;">
{{ userStore.androidappVersion }}
</view>
</view>
</view>
</view>
@ -67,7 +73,7 @@
<view class="item-box dropdown-menu">
<view class="item dropdown-item" :class="[item.active ? 'active' : '']" @tap="usertagClick(index)"
v-for="(item, index) in userlist" :key="index">
{{item.label}}
{{index==0?item.label:`${item.label}`}}
</view>
</view>
@ -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();
@ -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
}

View File

@ -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" : {

View File

@ -7,9 +7,11 @@
<view class="querybox">
<view class="querybox_title">委托单位</view>
<view style="width: calc(100% - 100px);">
<sh-select @change="wtdwchange" @remove="wtdwremove" :localdata="wtdwlist"
v-model="queryParams.customerCompanyId" labelKey="label" valueKey="value" search :delshow="true" />
<!-- <sh-select @change="wtdwchange" @remove="wtdwremove" :localdata="wtdwlist"
v-model="queryParams.customerCompanyId" labelKey="label" valueKey="value" search :delshow="true" /> -->
<csr-uni-data-select :filterable="false" v-model="queryParams.customerCompanyId" placeholder="选择委托单位"
dataKey="label" dataValue="value" :localdata="wtdwlist" :clear="false"
@change="chaxunqy()"></csr-uni-data-select>
</view>
</view>
</uni-col>
@ -40,8 +42,12 @@
<view class="querybox">
<view class="querybox_title">状态</view>
<view style="width: calc(100% - 100px);">
<sh-select @change="wtdwchange" @remove="wtdwremove" :localdata="zhuangtailist"
v-model="queryParams.status" labelKey="label" valueKey="value" search :delshow="true" />
<!-- <sh-select @change="wtdwchange" @remove="wtdwremove" :localdata="zhuangtailist"
v-model="queryParams.status" labelKey="label" valueKey="value" search :delshow="true" /> -->
<csr-uni-data-select :filterable="false" v-model="queryParams.status" placeholder="选择状态" dataKey="label"
dataValue="value" :localdata="zhuangtailist" :clear="false"
@change="chaxunqy()"></csr-uni-data-select>
</view>
</view>
</uni-col>
@ -68,10 +74,13 @@
<u-button style="width:100px; float: left;margin-left: 20px;" type="warning" icon="error-circle" text="完结"
:disabled="activenum!=1" @click="wanjie()" size="small"
v-if="$checkPermi(['safety_hazard:project:status'])"></u-button>
<u-button style="width:100px; float: left;margin-left: 20px;"
v-if="tableData.length>0&&$checkPermi(['safety_hazard:contract:export'])" :disabled="activenum!=1"
type="primary" icon="arrow-downward" size="small" text="导出问题台账" @click="daochu()"></u-button>
</view>
</view>
<view class="zhixing_center">
<u-table row-key="createTime" rowHeight="50" customClass="mewtable2" ref="pageTable" :scrollX="true"
<u-table row-key="contractId" rowHeight="50" customClass="mewtable2" ref="pageTable" :scrollX="true"
:cellStyle="{padding:'10px 10px 0px 10px'}" :data="tableData" :ellipsis="false" height="450" :border="true"
@selection-change="handleSelectionChange" style="width:100%">
<!-- :span-method="spanMethodWithColspan" -->
@ -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) => {
@ -423,10 +446,18 @@
// debugger
delsafety_hazardcontract(contractIds).then((res) => {
// debugger
// this.$modal.msgSuccess("");
if (res.data.failedDetailString) {
this.$modal.msgError(res.data.failedDetailString);
} else {
this.$modal.msgSuccess("删除成功!");
setTimeout(() => {
this.getlistinfo(); //
}, 300);
}, 1000);
}
})
});
},

View File

@ -78,8 +78,8 @@
<u-table-column prop="" width="150" label="操作" align="center" headerAlign="center">
<template #default=" { row, index }">
<u-button type="primary" icon="edit-pen" text="编辑" size="small"
v-if="!row.editshow&&$checkPermi(['safety_hazard:suggestion:edit'])"
<!-- v-show="$checkPermi(['safety_hazard:suggestion:edit'])" -->
<u-button type="primary" icon="edit-pen" text="编辑" size="small" v-if="!row.editshow"
@click="bianji(row,index)"></u-button>
<view v-else style="display: flex; flex-direction: row; justify-content: space-around;">
@ -95,10 +95,23 @@
<u-modal content="" :closeOnClickOverlay="true" title="图片预览" confirmText="关闭" width="600px" :show="imgboxshow"
@confirm="() => imgboxshow = false">
<view class="slot-content" style="width: 100%;min-height: 200px; max-height: 200px; overflow-y: auto;">
<u-album :urls="imgurlslist" style="margin-top: 20px;" autoWrap showMore multipleSize="100"></u-album>
<view class="slot-content"
style="width: 100%;min-height: 280px; max-height: 280px;margin-bottom: 30px; overflow-y: auto;">
<u-album :urls="imgurlslist" rowCount="5" style="margin-top: 20px;" autoWrap showMore
multipleSize="100"></u-album>
</view>
<!-- style="width: 100%;min-height: 280px; max-height:280px; margin-bottom: 30px; overflow-y: auto;">
<u-album :urls="imgurlslist" style="margin-top: 20px;" autoWrap showMore multipleSize="100"
rowCount="5"></u-album> -->
</u-modal>
<u-toast ref="uToast"></u-toast>
<UniMenu />

View File

@ -1,6 +1,6 @@
<template>
<view class="addxmcontainer">
<u-sidebar v-model="active" @change="onChange" :showLine="false" activeColor="#1677ff" width="120px">
<u-sidebar v-model="active" @change="onChange" :showLine="false" activeColor="#1677ff" width="100px">
<u-sidebar-item :value="0" label="项目信息" icon="order" iconSize="24" iconPosition="top"
:iconColor="active === 0 ? '#1677ff' : '#666'" />
<u-sidebar-item :value="1" label="项目组成员" icon="man-add" iconSize="24" iconPosition="top"
@ -29,7 +29,10 @@
<view class="querybox">
<view class="querybox_title">
<view style="color: #ca4341; ">*</view>
<view style="display: flex; flex-direction: column;">
<view>系统合同号</view>
<view>(执行中的合同) </view>
</view>
</view>
<csr-uni-data-select style="width: 400px;" :disabled="isedit" :filterable="true"
@ -174,8 +177,8 @@
v-model:checked="formdata.fixedFireMonitorFireFlag"></u-checkbox>
</view>
<view style="display: flex; padding-bottom: 30px; flex-direction: row; justify-content: space-around;">
<u-button type="primary" text="取消关闭" @click="quxiaoxm()" style="width: 20%; margin-top: 40rpx;"></u-button>
<u-button type="success" text="保存" @click="baocunxm()" style="width: 20%; margin-top: 40rpx;"></u-button>
<u-button type="primary" text="关闭" @click="quxiaoxm()" style="width: 20%; margin-top: 60rpx;"></u-button>
<u-button type="success" text="保存" @click="baocunxm()" style="width: 20%; margin-top:60rpx;"></u-button>
</view>
</scroll-view>
@ -185,53 +188,59 @@
<scroll-view scroll-y="true" style="height: 100%;">
<u-button style="width:100px; float: left; margin-bottom: 10px;" type="success" icon="plus-circle" text="新增成员"
@click="addchengyuan()" size="small"></u-button>
<u-table rowHeight="60" customClass="mewtable2" ref="pageTable" :scrollX="true"
<u-table rowHeight="60" customClass="mewtable2 mewtable2bs" ref="pageTable" :scrollX="true"
:cellStyle="{padding:'10px 10px 0px 10px'}" :data="xmcylist" :ellipsis="false" height="460" :border="true">
<u-table-column prop="staffId" width="180" label="姓名" align="center" headerAlign="center">
<u-table-column prop="staffId" width="200" label="*姓名" align="center" headerAlign="center">
<template #default=" { row, index }">
<!-- <sh-select @change="renyuanchange($event,row,index)" :localdata="renyuanlist" v-model="row.staffId"
labelKey="label" valueKey="value" search :delshow="false" /> -->
<csr-uni-data-select style="width:160px;" :filterable="false" v-model="row.staffId" placeholder="选择姓名"
<csr-uni-data-select style="width:180px;" :filterable="false" v-model="row.staffId" placeholder="选择姓名"
dataKey="nickName" dataValue="staffId" :localdata="renyuanlist"
@change="renyuanchange($event,row,index)" :clear="false"></csr-uni-data-select>
</template>
</u-table-column>
<u-table-column prop="roleId" width="180" label="角色权限" align="center" headerAlign="center">
<u-table-column prop="roleId" width="220" label="*角色权限" align="center" headerAlign="center">
<template #default=" { row, index }">
<!-- <sh-select :localdata="jueselist" @change="juesechange($event,row,index)" v-model="row.roleId"
labelKey="label" valueKey="value" search :delshow="false" /> -->
<csr-uni-data-select style="width:160px;" :filterable="false" v-model="row.roleId" placeholder="选择角色权限"
<csr-uni-data-select style="width:200px;" :filterable="false" v-model="row.roleId" placeholder="选择角色权限"
dataKey="name" dataValue="id" :localdata="jueselist" @change="juesechange($event,row,index)"
:clear="false"></csr-uni-data-select>
</template>
</u-table-column>
<u-table-column prop="postId" width="180" label="岗位" align="center" headerAlign="center">
<u-table-column prop="postId" width="220" label="*岗位" align="center" headerAlign="center">
<template #default=" { row, index }">
<!-- <sh-select :localdata="gangweilist" @change="gangweichange($event,row,index)" v-model="row.postId"
labelKey="label" valueKey="value" search :delshow="false" /> -->
<csr-uni-data-select style="width:160px;" :filterable="false" v-model="row.postId" placeholder="选择岗位"
<csr-uni-data-select style="width:200px;" :filterable="false" v-model="row.postId" placeholder="选择岗位"
dataKey="postName" dataValue="postId" :localdata="gangweilist" @change="gangweichange($event,row,index)"
:clear="false"></csr-uni-data-select>
</template>
</u-table-column>
<u-table-column width="90" label="操作" align="center" headerAlign="center">
<u-table-column width="100" label="操作" align="center" headerAlign="center">
<template #default=" { row, index }">
<u-icon name="trash" color="#ca4341" size="28" @click="delxmcy(row,index)"></u-icon>
<u-icon name="trash" color="#ca4341" size="28" v-if="!index==0" @click="delxmcy(row,index)"></u-icon>
</template>
</u-table-column>
</u-table>
<view style="display: flex; margin-bottom: 30px; flex-direction: row; justify-content: space-around;">
<!-- <view style="display: flex; margin-bottom: 30px; flex-direction: row; justify-content: space-around;">
<u-button type="success" text="保存" @click="baocuncyxx()" style="width: 20%; margin-top: 100rpx;"></u-button>
</view>
-->
<view style="display: flex; padding-bottom: 30px; flex-direction: row; justify-content: space-around;">
<u-button type="primary" text="关闭" @click="quxiaoxm()" style="width: 20%; margin-top: 60rpx;"></u-button>
<u-button type="success" text="保存" @click="baocuncyxx()" style="width: 20%; margin-top:60rpx;"></u-button>
</view>
</scroll-view>
</view>
<view v-if="active === 2" class="xiangmnuxinxi home-page">
<!-- 建筑基本信息 -->
<scroll-view scroll-y="true" style="height: 100%;">
<view v-for="(item, index) in buildingCmdsList" :key="index"
style="border: 1px dashed #e0e0e0; padding: 15px; padding-bottom: 10px; margin-bottom: 20px; position: relative; border-radius: 4px; ">
style="width:700px ; border: 1px dashed #e0e0e0; padding:20px; padding-bottom: 10px; margin-bottom: 20px; position: relative; border-radius: 4px; ">
<uni-row style="width: 100%;margin-bottom: 20px;" :gutter="0">
<uni-col :xs="24" :sm="12" :md="12">
<view class="querybox">
@ -364,8 +373,10 @@
@click="delbulid(item,index)"></u-icon>
</view>
</view>
<view style="display: flex; padding-bottom: 30px; flex-direction: row; justify-content: space-around;">
<!-- <u-button type="primary" text="关闭" @click="baocunxm()" style="width: 20%; margin-top: 40rpx;"></u-button> -->
<u-button type="primary" text="关闭" @click="quxiaoxm()" style="width: 20%; margin-top: 40rpx;"></u-button>
<u-button type="success" text="保存" @click="baocunjzw()" style="width: 20%; margin-top: 40rpx;"></u-button>
</view>
</scroll-view>
@ -377,36 +388,37 @@
<scroll-view scroll-y="true" style="height: 100%;">
<u-button style="width:100px; float: left; margin-bottom: 10px;" type="success" icon="plus-circle" text="新增仪器"
@click="addyiqi()" size="small"></u-button>
<u-table rowHeight="60" customClass="mewtable2" ref="pageTable" :scrollX="true"
<u-table rowHeight="60" customClass="mewtable2 mewtable3bs" ref="pageTable" :scrollX="true"
:cellStyle="{padding:'10px 10px 10px 10px'}" :data="yqgjlist" height="460" :border="true">
<u-table-column type="index" fixed width="50" label="序号" align="center" headerAlign="center"></u-table-column>
<u-table-column prop="name" width="180" label="仪器名称" align="center" headerAlign="center">
<u-table-column prop="name" width="180" label="*仪器名称" align="center" headerAlign="center">
<template #default=" { row, index }">
<u-textarea style="width:150px" height="40" v-model="row.name" placeholder="请输入仪器名称"></u-textarea>
</template>
</u-table-column>
<u-table-column prop="type" width="160" label="型号" align="center" headerAlign="center">
<u-table-column prop="type" width="160" label="*型号" align="center" headerAlign="center">
<template #default=" { row, index }">
<u-textarea v-model="row.type" style="width:130px" height="40" placeholder="请输入仪器名称"></u-textarea>
</template>
</u-table-column>
<u-table-column prop="no" width="130" label="设备编号" align="center" headerAlign="center">
<u-table-column prop="no" width="130" label="*设备编号" align="center" headerAlign="center">
<template #default=" { row, index }">
<u-textarea v-model="row.no" style="width:100px" height="40" placeholder="请输入编号"></u-textarea>
</template>
</u-table-column>
<u-table-column prop="remark" width="180" label="备注" align="center" headerAlign="center">
<u-table-column prop="remark" width="160" label="备注" align="center" headerAlign="center">
<template #default=" { row, index }">
<u-textarea v-model="row.remark" style="width:150px" height="40" placeholder="请输入备注"></u-textarea>
<u-textarea v-model="row.remark" style="width:130px" height="40" placeholder="请输入备注"></u-textarea>
</template>
</u-table-column>
<u-table-column width="70" label="操作" align="center" headerAlign="center">
<template #default=" { row, index }">
<u-icon name="trash" color="#ca4341" size="28" @click="delyiqi(row,index)"></u-icon>
<u-icon name="trash" color="#ca4341" size="28" v-if="!index==0" @click="delyiqi(row,index)"></u-icon>
</template>
</u-table-column>
</u-table>
<view style="display: flex; margin-bottom: 30px; flex-direction: row; justify-content: space-around;">
<u-button type="primary" text="关闭" @click="quxiaoxm()" style="width: 20%; margin-top: 100rpx;"></u-button>
<u-button type="success" text="保存" @click="baocunyqgj()" style="width: 20%; margin-top: 100rpx;"></u-button>
</view>
</scroll-view>
@ -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;
}
}
}
}
</style>

View File

@ -96,7 +96,7 @@
<view class="zhixing_center">
<u-table row-key="createTime" rowHeight="60" customClass="mewtable2" ref="pageTable" :scrollX="true"
<u-table row-key="projectId" rowHeight="60" customClass="mewtable2" ref="pageTable" :scrollX="true"
:cellStyle="{padding:'10px 10px 0px 10px'}" :data="tableData" :ellipsis="false" height="450" :border="true"
@select="handleSelectionChange" style="width:100%">
<!-- :span-method="spanMethodWithColspan" -->
@ -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
if (res.data.failedDetailString) {
this.$modal.msgError(res.data.failedDetailString);
} else {
this.$modal.msgSuccess("删除成功!");
setTimeout(() => {
this.getlistinfo(); //
}, 300);
}, 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();
},

View File

@ -129,8 +129,11 @@
width: columns[3].width + 'px',
minWidth: columns[3].minWidth + 'px'
}">
<u-tag style="width:40px; text-align: center; margin: 0 auto;" v-if="item.status"
:text="item.status=='0'?'正常':'停用'" :type="item.status=='1'?'error':'success'" size="mini"></u-tag>
<!-- <u-tag style="width:40px; text-align: center; margin: 0 auto;" v-if="item.status"
:text="item.status=='0'?'正常':'停用'" :type="item.status=='1'?'error':'success'" size="mini"></u-tag> -->
<u-switch space="2" v-model="item.status" @change="statusswitch($event,item, i)" activeValue="0"
inactiveValue="1" activeColor="#5ac725" inactiveColor="#f56c6c">
</u-switch>
</view>
<view class="table-body-cell" :style="{
width: columns[4].width + 'px',
@ -726,7 +729,40 @@
this.addshow = true;
});
},
statusswitch(e, item, index) {
//
// debugger
let that = this;
let text = e == 1 ? '停用' : '正常';
// this.$modal.confirm(`${text}`).then(() => {
// debugger
// }).fail(() => {
// debugger
// });
uni.showModal({
title: '系统提示',
content: `确定要将此条信息状态改为${text}吗?`,
cancelText: '取消',
confirmText: '确定',
customStyle: 'class=custom-modal',
success: function(res) {
// debugger
if (res.confirm) {
setsafety_hazardcompanystatus(item.customerCompanyId, e).then(res => {
that.$modal.msgSuccess("修改成功!");
});
} else {
if (e == 1) {
item.status = 0;
} else {
item.status = 1;
}
}
}
})
},
},
onShow() {

View File

@ -77,7 +77,8 @@
<view class="querybox1" style="margin-top:20px;" v-if="formdata.chemicalsRst==1">
<view class="querybox_title">化学品数量</view>
<view class="querybox_title2">
<u-number-box :min="0" :max="1000" v-model="formdata.chemicalsQuantity"></u-number-box>
<!-- <u-number-box :min="0" :max="1000" v-model="formdata.chemicalsQuantity"></u-number-box> -->
<u-input style="width: 300px;" v-model="formdata.chemicalsQuantity" :clearable="true"></u-input>
</view>
</view>
<view class="querybox1" style="margin-top:20px;" v-if="formdata.chemicalsRst==1">
@ -208,12 +209,15 @@
</view>
<view style="width: 100%; display: flex; padding-bottom:50px; flex-direction: row; justify-content: space-around;">
<!-- <u-button type="primary" text="关闭" @click="baocun()" style="width: 20%; margin-top: 100rpx;"></u-button> -->
<u-button type="primary" text="关闭" @click="quxiaoxm()" style="width: 20%; margin-top: 100rpx;"></u-button>
<u-button type="success"
v-if="(formdata.questionnaireId&&$checkPermi(['safety_hazard:questionnaire:edit']))||!formdata.questionnaireId"
text="保存" @click="baocun()" style="width: 20%; margin-top: 100rpx;"></u-button>
</view>
<!-- <view style="display: flex; padding-bottom: 30px; flex-direction: row; justify-content: space-around;">
<u-button type="primary" text="关闭" @click="quxiaoxm()" style="width: 20%; margin-top: 60rpx;"></u-button>
<u-button type="success" text="保存" @click="baocunxm()" style="width: 20%; margin-top:60rpx;"></u-button>
</view> -->
</view>
</template>
@ -514,6 +518,10 @@
this.formdata.fireResult = ''; // false
}
},
quxiaoxm() {
//
this.$emit("righteventclose"); //
},
baocun() {
//

View File

@ -20,7 +20,7 @@
<view style="color: #ca4341; margin-right:5px;">*</view>
<view>项目编号</view>
</view>
<csr-uni-data-select :filterable="true" v-model="queryParams.projectId" placeholder="请选择项目编号"
<csr-uni-data-select :filterable="false" v-model="queryParams.projectId" placeholder="请选择项目编号"
dataKey="lablename" dataValue="projectId" :localdata="xmpickerConfig.options" @change="changexmbh"
:clear="false" style="width: 400px;"></csr-uni-data-select>
</view>
@ -156,8 +156,10 @@
</view>
<u-modal content="" :closeOnClickOverlay="true" title="图片预览" confirmText="关闭" width="600px" :show="imgboxshow"
@confirm="() => imgboxshow = false">
<view class="slot-content" style="width: 100%;min-height: 200px; max-height: 200px; overflow-y: auto;">
<u-album :urls="imgurlslist" style="margin-top: 20px;" autoWrap showMore multipleSize="100"></u-album>
<view class="slot-content"
style="width: 100%;min-height: 280px; max-height:280px; margin-bottom: 30px; overflow-y: auto;">
<u-album :urls="imgurlslist" style="margin-top: 20px;" autoWrap showMore multipleSize="100"
rowCount="5"></u-album>
</view>
</u-modal>
@ -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;

View File

@ -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;

View File

@ -17,9 +17,9 @@
<view style="color: #ca4341; margin-right:5px;">*</view>
<view>项目编号</view>
</view>
<csr-uni-data-select :filterable="true" v-model="queryParams.projectId" placeholder="请选择项目编号"
dataKey="lablename" dataValue="projectId" :localdata="xmpickerConfig.options" :clear="false"
style="width: 400px;"></csr-uni-data-select>
<csr-uni-data-select :filterable="false" v-model="queryParams.projectId" placeholder="请选择项目编号"
dataKey="lablename" dataValue="projectId" :localdata="xmpickerConfig.options" :clear="true"
style="width: 400px;" @change="changexmbh"></csr-uni-data-select>
</view>
@ -78,7 +78,7 @@
</uni-table> -->
<u-table row-key="createTime" rowHeight="60" customClass="mewtable2" ref="pageTable" :scrollX="true"
<u-table row-key="questionnaireId" rowHeight="60" customClass="mewtable2" ref="pageTable" :scrollX="true"
:cellStyle="{padding:'10px 10px 0px 10px'}" :data="tableData" :ellipsis="false" height="480" :border="true"
@select="handleSelectionChange" style="width:100%">
<!-- :span-method="spanMethodWithColspan" -->
@ -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
// 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}`;
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;
// setprojectcurrent(this.queryParams.projectId).then((res) => {
// //
// this.userStore.setproject(this.xmdwlist[0].projectId, 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);
// });
// }
// this.getlistinfo(); //
// });
setprojectcurrent(this.queryParams.projectId).then((res) => {
//
this.userStore.setproject(this.xmdwlist[0].projectId, this.xmdwlist[0].lablename);
});
}
// else {
// 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(); //
}
// this.getlistinfo(); //
this.getlistinfo(); //
})
},
clickcell(row, column, cell, event) {

View File

@ -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
}
},
{

View File

@ -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

View File

@ -20,7 +20,8 @@ let storageNodeKeys = [
constant.xththid,
constant.xththstr,
constant.projectid,
constant.projectname
constant.projectname,
constant.androidappVersion
]
const storage = {

View File

@ -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声明文件