二期结束

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' ENV='production'
# base api # 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_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_PRE='/prod-api'
VITE_APP_BASE_NAME='vite项目' VITE_APP_BASE_NAME='vite项目'

4
package-lock.json generated
View File

@ -26,6 +26,7 @@
"dayjs": "^1.11.9", "dayjs": "^1.11.9",
"gcoord": "^1.0.7", "gcoord": "^1.0.7",
"pinia": "2.0.36", "pinia": "2.0.36",
"sass": "^1.69.5",
"uview-next": "^3.7.3", "uview-next": "^3.7.3",
"vue": "^3.2.45", "vue": "^3.2.45",
"vue-i18n": "^11.1.12", "vue-i18n": "^11.1.12",
@ -50,7 +51,6 @@
"husky": "^8.0.0", "husky": "^8.0.0",
"pinia-plugin-unistorage": "^0.0.17", "pinia-plugin-unistorage": "^0.0.17",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"sass": "^1.69.5",
"sass-loader": "^16.0.5", "sass-loader": "^16.0.5",
"typescript": "^4.9.4", "typescript": "^4.9.4",
"unplugin-auto-import": "^0.16.6", "unplugin-auto-import": "^0.16.6",
@ -8601,7 +8601,6 @@
"version": "4.3.7", "version": "4.3.7",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz",
"integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==",
"devOptional": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/import-fresh": { "node_modules/import-fresh": {
@ -12167,7 +12166,6 @@
"version": "1.69.5", "version": "1.69.5",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz", "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz",
"integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==", "integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==",
"devOptional": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"chokidar": ">=3.0.0 <4.0.0", "chokidar": ">=3.0.0 <4.0.0",

View File

@ -31,9 +31,9 @@ export const addsafety_hazardbuilding = async (data: any) => {
* safety_hazard:project:edit * safety_hazard:project:edit
* @returns * @returns
*/ */
export const upsafety_hazardbuilding = async (data: any) => { export const upsafety_hazardbuilding = async (delIds: any, data: any) => {
return await request.http({ return await request.http({
url: '/safety_hazard/building/batch', url: '/safety_hazard/building/batch?delIds=' + delIds,
data: data, data: data,
// isPost: true, // isPost: true,
isPost: '2' isPost: '2'

View File

@ -97,6 +97,6 @@ export const setsafety_hazardcompanystatus = async (customerCompanyId: any, stat
return await request.http({ return await request.http({
url: `/safety_hazard/company/status/${customerCompanyId}/${status}`, 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 * safety_hazard:project:edit
* @returns * @returns
*/ */
export const upsafety_hazardinstrument = async (data: any) => { export const upsafety_hazardinstrument = async (delIds: any, data: any) => {
return await request.http({ return await request.http({
url: '/safety_hazard/instrument/batch', url: '/safety_hazard/instrument/batch?delIds=' + delIds,
data: data, data: data,
// isPost: true, // isPost: true,
isPost: '2' isPost: '2'

View File

@ -443,35 +443,60 @@
const compress = that.imageFormData?.compress || false; const compress = that.imageFormData?.compress || false;
// //
if (that.imageFormData?.size ?? false) { // if (that.imageFormData?.size ?? false) {
const maxSize = that.imageFormData.size * 1024 * 1024 // 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) => { tempFiles.map((imgInfo, index) => {
// debugger
if (imgInfo.size > maxSize) { if (imgInfo.size > maxSize) {
tempFiles.splice(index, 1) console.log('大于5m', imgInfo.size)
that.$emit('onImageSize', imgInfo) // tempFiles.splice(index, 1)
return uni.showToast({ // that.$emit('onImageSize', imgInfo)
title: `图片最大上传${that.imageFormData.size}MB`, // return uni.showToast({
duration: 2000, // title: `${that.imageFormData.size}MB`,
icon: 'none' // duration: 2000,
}); // icon: 'none'
} // });
})
}
//
if (compress) {
const compressedImagePathList = tempFiles.map(imageItem => { const compressedImagePathList = tempFiles.map(imageItem => {
return that.compressImage(imageItem.path) return that.compressImage(imageItem.path)
}) })
Promise.all(compressedImagePathList).then(result => { Promise.all(compressedImagePathList).then(result => {
upload(result); upload(result);
}) });
return
} else { } else {
upload(tempFiles); upload(tempFiles);
return
} }
})
function upload(tempImages) { function upload(tempImages) {
if (that.autoUpload) { if (that.autoUpload) {
@ -759,7 +784,7 @@
// #ifndef H5 // #ifndef H5
uni.compressImage({ uni.compressImage({
src: tempFilePaths, src: tempFilePaths,
quality: that.imageFormData.quality || 80, quality: that.imageFormData.quality || 60,
success: res => { success: res => {
resolve(res.tempFilePath); resolve(res.tempFilePath);
uni.hideLoading(); uni.hideLoading();

View File

@ -40,7 +40,7 @@
color: 'rgba(0, 0, 0, 0.1)', color: 'rgba(0, 0, 0, 0.1)',
fontSize: 15, fontSize: 15,
fontFamily: 'Arial', fontFamily: 'Arial',
rotate: 60, rotate: -30,
spacing: 150, spacing: 150,
single: false single: false
} }
@ -88,6 +88,12 @@
onWatermarkConfirm(res) { onWatermarkConfirm(res) {
this.watermarkResult = res this.watermarkResult = res
} }
},
mounted() {
this.watermark.text = `火灾与建筑物安全隐患排查平台` + this.$dayjs().format("YYYY-MM-DD HH:mm");
} }
} }
</script> </script>

View File

@ -49,8 +49,14 @@
width="40px" height="40px" /> width="40px" height="40px" />
</view> </view>
<view style="display: flex;flex-direction: column;align-items: center; "> <view style="display: flex;flex-direction: column;align-items: center; ">
<view class="mingzi" style="display: flex;flex-direction: row;align-items: center;"> <view class="mingzi"
<view class="username" style="line-height:50px;">{{ userStore.name }}</view> 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> </view>
</view> </view>
@ -67,7 +73,7 @@
<view class="item-box dropdown-menu"> <view class="item-box dropdown-menu">
<view class="item dropdown-item" :class="[item.active ? 'active' : '']" @tap="usertagClick(index)" <view class="item dropdown-item" :class="[item.active ? 'active' : '']" @tap="usertagClick(index)"
v-for="(item, index) in userlist" :key="index"> v-for="(item, index) in userlist" :key="index">
{{item.label}} {{index==0?item.label:`${item.label}`}}
</view> </view>
</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() { shauxin() {
// //
// uni.reload(); // uni.reload();
@ -473,6 +487,9 @@
plus.runtime.getProperty(plus.runtime.appid, (info) => { plus.runtime.getProperty(plus.runtime.appid, (info) => {
//console.log('', JSON.stringify(info)); //console.log('', JSON.stringify(info));
this.appVersion = info.version; this.appVersion = info.version;
this.userStore.setandroidappVersion('V' + this.appVersion);
console.log('当前版本', this.userStore.androidappVersion);
//1:android, 2:ios, 3:harmony framework:app:query //1:android, 2:ios, 3:harmony framework:app:query
getappConfigKey('1').then(res => { getappConfigKey('1').then(res => {
// debugge // debugge
@ -526,6 +543,7 @@
// debugger // debugger
// }); // });
// #ifdef APP-PLUS // #ifdef APP-PLUS
//console.log('');
this.upgrade(); // app this.upgrade(); // app
// #endif // #endif
} }

View File

@ -3,8 +3,8 @@
"appid" : "__UNI__D31BBA7", "appid" : "__UNI__D31BBA7",
"package" : "com.skzh.hzyjzaqyhglpt", "package" : "com.skzh.hzyjzaqyhglpt",
"description" : "安全隐患排查app", "description" : "安全隐患排查app",
"versionName" : "1.0.4", "versionName" : "2.0.0",
"versionCode" : 104, "versionCode" : 200,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -7,9 +7,11 @@
<view class="querybox"> <view class="querybox">
<view class="querybox_title">委托单位</view> <view class="querybox_title">委托单位</view>
<view style="width: calc(100% - 100px);"> <view style="width: calc(100% - 100px);">
<sh-select @change="wtdwchange" @remove="wtdwremove" :localdata="wtdwlist" <!-- <sh-select @change="wtdwchange" @remove="wtdwremove" :localdata="wtdwlist"
v-model="queryParams.customerCompanyId" labelKey="label" valueKey="value" search :delshow="true" /> 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>
</view> </view>
</uni-col> </uni-col>
@ -40,8 +42,12 @@
<view class="querybox"> <view class="querybox">
<view class="querybox_title">状态</view> <view class="querybox_title">状态</view>
<view style="width: calc(100% - 100px);"> <view style="width: calc(100% - 100px);">
<sh-select @change="wtdwchange" @remove="wtdwremove" :localdata="zhuangtailist" <!-- <sh-select @change="wtdwchange" @remove="wtdwremove" :localdata="zhuangtailist"
v-model="queryParams.status" labelKey="label" valueKey="value" search :delshow="true" /> 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>
</view> </view>
</uni-col> </uni-col>
@ -68,10 +74,13 @@
<u-button style="width:100px; float: left;margin-left: 20px;" type="warning" icon="error-circle" text="完结" <u-button style="width:100px; float: left;margin-left: 20px;" type="warning" icon="error-circle" text="完结"
:disabled="activenum!=1" @click="wanjie()" size="small" :disabled="activenum!=1" @click="wanjie()" size="small"
v-if="$checkPermi(['safety_hazard:project:status'])"></u-button> 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> </view>
<view class="zhixing_center"> <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" :cellStyle="{padding:'10px 10px 0px 10px'}" :data="tableData" :ellipsis="false" height="450" :border="true"
@selection-change="handleSelectionChange" style="width:100%"> @selection-change="handleSelectionChange" style="width:100%">
<!-- :span-method="spanMethodWithColspan" --> <!-- :span-method="spanMethodWithColspan" -->
@ -205,7 +214,8 @@
} from "@/apis/hetong" } from "@/apis/hetong"
import { import {
parseObjectToArray parseObjectToArray,
downloadBinaryFile
} from "@/utils/util" } from "@/utils/util"
@ -221,6 +231,7 @@
}, },
data() { data() {
return { return {
userStore: useUserStore(),
highRiskFlag: false, highRiskFlag: false,
isedit: false, isedit: false,
formdata: { formdata: {
@ -325,6 +336,7 @@
}, },
methods: { methods: {
parseObjectToArray, parseObjectToArray,
downloadBinaryFile,
addwtdwchange(e) { addwtdwchange(e) {
// //
// debugger // 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() { wanjie() {
// //
setsafety_hazardcontractstatus(this.activeitem.contractId, '2').then((res) => { setsafety_hazardcontractstatus(this.activeitem.contractId, '2').then((res) => {
@ -423,10 +446,18 @@
// debugger // debugger
delsafety_hazardcontract(contractIds).then((res) => { delsafety_hazardcontract(contractIds).then((res) => {
// debugger // debugger
// this.$modal.msgSuccess("");
if (res.data.failedDetailString) {
this.$modal.msgError(res.data.failedDetailString);
} else {
this.$modal.msgSuccess("删除成功!"); this.$modal.msgSuccess("删除成功!");
setTimeout(() => { setTimeout(() => {
this.getlistinfo(); // this.getlistinfo(); //
}, 300); }, 1000);
}
}) })
}); });
}, },

View File

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

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="addxmcontainer"> <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" <u-sidebar-item :value="0" label="项目信息" icon="order" iconSize="24" iconPosition="top"
:iconColor="active === 0 ? '#1677ff' : '#666'" /> :iconColor="active === 0 ? '#1677ff' : '#666'" />
<u-sidebar-item :value="1" label="项目组成员" icon="man-add" iconSize="24" iconPosition="top" <u-sidebar-item :value="1" label="项目组成员" icon="man-add" iconSize="24" iconPosition="top"
@ -29,7 +29,10 @@
<view class="querybox"> <view class="querybox">
<view class="querybox_title"> <view class="querybox_title">
<view style="color: #ca4341; ">*</view> <view style="color: #ca4341; ">*</view>
<view style="display: flex; flex-direction: column;">
<view>系统合同号</view> <view>系统合同号</view>
<view>(执行中的合同) </view>
</view>
</view> </view>
<csr-uni-data-select style="width: 400px;" :disabled="isedit" :filterable="true" <csr-uni-data-select style="width: 400px;" :disabled="isedit" :filterable="true"
@ -174,8 +177,8 @@
v-model:checked="formdata.fixedFireMonitorFireFlag"></u-checkbox> v-model:checked="formdata.fixedFireMonitorFireFlag"></u-checkbox>
</view> </view>
<view style="display: flex; padding-bottom: 30px; flex-direction: row; justify-content: space-around;"> <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="primary" text="关闭" @click="quxiaoxm()" style="width: 20%; margin-top: 60rpx;"></u-button>
<u-button type="success" text="保存" @click="baocunxm()" style="width: 20%; margin-top: 40rpx;"></u-button> <u-button type="success" text="保存" @click="baocunxm()" style="width: 20%; margin-top:60rpx;"></u-button>
</view> </view>
</scroll-view> </scroll-view>
@ -185,53 +188,59 @@
<scroll-view scroll-y="true" style="height: 100%;"> <scroll-view scroll-y="true" style="height: 100%;">
<u-button style="width:100px; float: left; margin-bottom: 10px;" type="success" icon="plus-circle" text="新增成员" <u-button style="width:100px; float: left; margin-bottom: 10px;" type="success" icon="plus-circle" text="新增成员"
@click="addchengyuan()" size="small"></u-button> @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"> :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 }"> <template #default=" { row, index }">
<!-- <sh-select @change="renyuanchange($event,row,index)" :localdata="renyuanlist" v-model="row.staffId" <!-- <sh-select @change="renyuanchange($event,row,index)" :localdata="renyuanlist" v-model="row.staffId"
labelKey="label" valueKey="value" search :delshow="false" /> --> 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" dataKey="nickName" dataValue="staffId" :localdata="renyuanlist"
@change="renyuanchange($event,row,index)" :clear="false"></csr-uni-data-select> @change="renyuanchange($event,row,index)" :clear="false"></csr-uni-data-select>
</template> </template>
</u-table-column> </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 }"> <template #default=" { row, index }">
<!-- <sh-select :localdata="jueselist" @change="juesechange($event,row,index)" v-model="row.roleId" <!-- <sh-select :localdata="jueselist" @change="juesechange($event,row,index)" v-model="row.roleId"
labelKey="label" valueKey="value" search :delshow="false" /> --> 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)" dataKey="name" dataValue="id" :localdata="jueselist" @change="juesechange($event,row,index)"
:clear="false"></csr-uni-data-select> :clear="false"></csr-uni-data-select>
</template> </template>
</u-table-column> </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 }"> <template #default=" { row, index }">
<!-- <sh-select :localdata="gangweilist" @change="gangweichange($event,row,index)" v-model="row.postId" <!-- <sh-select :localdata="gangweilist" @change="gangweichange($event,row,index)" v-model="row.postId"
labelKey="label" valueKey="value" search :delshow="false" /> --> 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)" dataKey="postName" dataValue="postId" :localdata="gangweilist" @change="gangweichange($event,row,index)"
:clear="false"></csr-uni-data-select> :clear="false"></csr-uni-data-select>
</template> </template>
</u-table-column> </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 }"> <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> </template>
</u-table-column> </u-table-column>
</u-table> </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> <u-button type="success" text="保存" @click="baocuncyxx()" style="width: 20%; margin-top: 100rpx;"></u-button>
</view> </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> </scroll-view>
</view> </view>
<view v-if="active === 2" class="xiangmnuxinxi home-page"> <view v-if="active === 2" class="xiangmnuxinxi home-page">
<!-- 建筑基本信息 --> <!-- 建筑基本信息 -->
<scroll-view scroll-y="true" style="height: 100%;"> <scroll-view scroll-y="true" style="height: 100%;">
<view v-for="(item, index) in buildingCmdsList" :key="index" <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-row style="width: 100%;margin-bottom: 20px;" :gutter="0">
<uni-col :xs="24" :sm="12" :md="12"> <uni-col :xs="24" :sm="12" :md="12">
<view class="querybox"> <view class="querybox">
@ -364,8 +373,10 @@
@click="delbulid(item,index)"></u-icon> @click="delbulid(item,index)"></u-icon>
</view> </view>
</view> </view>
<view style="display: flex; padding-bottom: 30px; flex-direction: row; justify-content: space-around;"> <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> <u-button type="success" text="保存" @click="baocunjzw()" style="width: 20%; margin-top: 40rpx;"></u-button>
</view> </view>
</scroll-view> </scroll-view>
@ -377,36 +388,37 @@
<scroll-view scroll-y="true" style="height: 100%;"> <scroll-view scroll-y="true" style="height: 100%;">
<u-button style="width:100px; float: left; margin-bottom: 10px;" type="success" icon="plus-circle" text="新增仪器" <u-button style="width:100px; float: left; margin-bottom: 10px;" type="success" icon="plus-circle" text="新增仪器"
@click="addyiqi()" size="small"></u-button> @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"> :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 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 }"> <template #default=" { row, index }">
<u-textarea style="width:150px" height="40" v-model="row.name" placeholder="请输入仪器名称"></u-textarea> <u-textarea style="width:150px" height="40" v-model="row.name" placeholder="请输入仪器名称"></u-textarea>
</template> </template>
</u-table-column> </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 }"> <template #default=" { row, index }">
<u-textarea v-model="row.type" style="width:130px" height="40" placeholder="请输入仪器名称"></u-textarea> <u-textarea v-model="row.type" style="width:130px" height="40" placeholder="请输入仪器名称"></u-textarea>
</template> </template>
</u-table-column> </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 }"> <template #default=" { row, index }">
<u-textarea v-model="row.no" style="width:100px" height="40" placeholder="请输入编号"></u-textarea> <u-textarea v-model="row.no" style="width:100px" height="40" placeholder="请输入编号"></u-textarea>
</template> </template>
</u-table-column> </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 }"> <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> </template>
</u-table-column> </u-table-column>
<u-table-column width="70" label="操作" align="center" headerAlign="center"> <u-table-column width="70" label="操作" align="center" headerAlign="center">
<template #default=" { row, index }"> <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> </template>
</u-table-column> </u-table-column>
</u-table> </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="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> <u-button type="success" text="保存" @click="baocunyqgj()" style="width: 20%; margin-top: 100rpx;"></u-button>
</view> </view>
</scroll-view> </scroll-view>
@ -520,6 +532,7 @@
remark: "", // remark: "", //
startDate: "" // startDate: "" //
}, },
buildingCmdsListold: [],
buildingCmdsList: [{ buildingCmdsList: [{
buildingId: null, // buildingId: null, //
projectId: null, // projectId: null, //
@ -553,6 +566,7 @@
postId: null, // ID postId: null, // ID
roleId: null, //ID roleId: null, //ID
}], }],
yqgjlistold: [],
yqgjlist: [{ yqgjlist: [{
instrumentId: null, // instrumentId: null, //
projectId: null, // projectId: null, //
@ -663,7 +677,7 @@
this.getsystemrole(); // this.getsystemrole(); //
this.getsystemuser(); // this.getsystemuser(); //
this.getsystempost(); // this.getsystempost(); //
if (this.objitem) { if (this.objitem.isedit == 1) {
if (this.objitem.projectid) { if (this.objitem.projectid) {
this.projectid = this.objitem.projectid; this.projectid = this.objitem.projectid;
this.projectName = this.objitem.projectName; this.projectName = this.objitem.projectName;
@ -749,6 +763,15 @@
}).then((res) => { }).then((res) => {
// debugger // debugger
this.renyuanlist = res.rows; this.renyuanlist = res.rows;
if (this.renyuanlist.length > 0) {
//debugger
if (this.renyuanlist[0].nickName == 'admin') {
this.renyuanlist.splice(0, 1);
}
}
}) })
}, },
getsystempost() { getsystempost() {
@ -886,6 +909,15 @@
//debugger //debugger
this.xththlist = this.parseObjectToArray(res.data.contracts); this.xththlist = this.parseObjectToArray(res.data.contracts);
this.xmfzrlist = this.parseObjectToArray(res.data.staffers); 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) { if (!this.isedit) {
this.getclassificationlist(this.buildingCmdsList[0], 0); // this.getclassificationlist(this.buildingCmdsList[0], 0); //
} }
@ -970,9 +1002,9 @@
// console.log('') // console.log('')
// } // }
// }); // });
// setTimeout(() => { setTimeout(() => {
// this.$emit("righteventclose"); // this.$emit("shaunxian"); //
// }, 300); }, 300);
}); });
} else { } else {
@ -985,9 +1017,9 @@
// console.log('') // console.log('')
// } // }
// }); // });
// setTimeout(() => { setTimeout(() => {
// this.$emit("righteventclose"); // this.$emit("shaunxian"); //
// }, 300); }, 300);
this.projectid = res.data.projectId; this.projectid = res.data.projectId;
this.isedit = true; this.isedit = true;
this.formdata.projectId = res.data.projectId; this.formdata.projectId = res.data.projectId;
@ -1007,7 +1039,10 @@
// postId: null, // ID // postId: null, // ID
// roleId: null, //ID // roleId: null, //ID
// }], // }],
if (!this.projectid) {
this.$modal.msgError(`请先保存项目信息!`)
return false;
}
for (let index = 0; index < this.xmcylist.length; index++) { for (let index = 0; index < this.xmcylist.length; index++) {
const element = this.xmcylist[index]; const element = this.xmcylist[index];
if (!element.staffId) { if (!element.staffId) {
@ -1087,7 +1122,10 @@
// jzfllist2: [], // jzfllist2: [],
// jzfllist3: [], // jzfllist3: [],
// }], // }],
if (!this.projectid) {
this.$modal.msgError(`请先保存项目信息!`)
return false;
}
for (let index = 0; index < this.buildingCmdsList.length; index++) { for (let index = 0; index < this.buildingCmdsList.length; index++) {
const element = this.buildingCmdsList[index]; const element = this.buildingCmdsList[index];
if (this.projectid) { if (this.projectid) {
@ -1145,7 +1183,7 @@
} }
let delIds = this.findDeletedIds(this.buildingCmdsListold, this.buildingCmdsList, 'buildingId');
//debugger //debugger
if (this.projectid != '' & this.isedit) { if (this.projectid != '' & this.isedit) {
// //
@ -1164,7 +1202,7 @@
}); });
} else { } else {
upsafety_hazardbuilding(this.buildingCmdsList).then(res => { upsafety_hazardbuilding(delIds, this.buildingCmdsList).then(res => {
// debugger // debugger
this.$modal.msgSuccess("添加成功!"); this.$modal.msgSuccess("添加成功!");
// uni.navigateBack({ // 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() { baocunyqgj() {
// //
// yqgjlist: [{ // yqgjlist: [{
@ -1193,6 +1234,13 @@
// status: "", // 0 1 // status: "", // 0 1
// remark: "" // // 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++) { for (let index = 0; index < this.yqgjlist.length; index++) {
const element = this.yqgjlist[index]; const element = this.yqgjlist[index];
@ -1217,7 +1265,12 @@
//debugger //debugger
if (this.projectid != '' & this.isedit) { if (this.projectid != '' & this.isedit) {
// //
upsafety_hazardinstrument(this.yqgjlist).then(res => {
// let dataform={
// delIds:this.yqgjlist,
// }
upsafety_hazardinstrument(delIds, this.yqgjlist, ).then(res => {
//debugger //debugger
this.$modal.msgSuccess("修改成功!"); this.$modal.msgSuccess("修改成功!");
// uni.navigateBack({ // uni.navigateBack({
@ -1305,6 +1358,8 @@
s.jzfllist2 = []; s.jzfllist2 = [];
s.jzfllist3 = []; s.jzfllist3 = [];
} }
this.buildingCmdsListold = JSON.parse(JSON.stringify(datalist));
this.buildingCmdsList = datalist; this.buildingCmdsList = datalist;
this.buildingCmdsList.map((element, index) => { this.buildingCmdsList.map((element, index) => {
this.getclassificationlist(element, 0); // this.getclassificationlist(element, 0); //
@ -1362,6 +1417,7 @@
projectId: this.projectid projectId: this.projectid
}).then((res) => { }).then((res) => {
// debugger // debugger
this.yqgjlistold = JSON.parse(JSON.stringify(res.rows || []));
this.yqgjlist = res.rows || [{ this.yqgjlist = res.rows || [{
instrumentId: null, // instrumentId: null, //
projectId: this.projectid, // 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> </style>

View File

@ -96,7 +96,7 @@
<view class="zhixing_center"> <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" :cellStyle="{padding:'10px 10px 0px 10px'}" :data="tableData" :ellipsis="false" height="450" :border="true"
@select="handleSelectionChange" style="width:100%"> @select="handleSelectionChange" style="width:100%">
<!-- :span-method="spanMethodWithColspan" --> <!-- :span-method="spanMethodWithColspan" -->
@ -253,7 +253,8 @@
getprojectlist, getprojectlist,
getprojectlistdefaultCondtion, getprojectlistdefaultCondtion,
getprojectinfo, getprojectinfo,
setsafety_hazardprojectstatus setsafety_hazardprojectstatus,
delsafety_hazardproject
} from "@/apis/xiangmu" } from "@/apis/xiangmu"
import { import {
@ -688,12 +689,18 @@
//this.activeitem.projectId //this.activeitem.projectId
this.$modal.confirm('确定要删除此条信息吗?').then(() => { this.$modal.confirm('确定要删除此条信息吗?').then(() => {
// debugger // debugger
delquestionnaire(checkTableIds).then((res) => { delsafety_hazardproject(checkTableIds).then((res) => {
// debugger // debugger
if (res.data.failedDetailString) {
this.$modal.msgError(res.data.failedDetailString);
} else {
this.$modal.msgSuccess("删除成功!"); this.$modal.msgSuccess("删除成功!");
setTimeout(() => { setTimeout(() => {
this.getlistinfo(); // this.getlistinfo(); //
}, 300); }, 1000);
}
}) })
}); });
}, },
@ -951,7 +958,7 @@
this.shanchujiancha(); this.shanchujiancha();
}, },
openright(item) { openright() {
// /debugger // /debugger
// uni.navigateTo({ // 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}`, // 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.id3 = item.standardCheckTable3Id;
// item.id4 = item.standardCheckTable4Id; // item.id4 = item.standardCheckTable4Id;
// this.rowitem = item; // this.rowitem = item;
let item2 = {
isedit: 0,
}
this.rowitem = item2;
this.sjnum = Math.random(); this.sjnum = Math.random();
this.$refs.showright.open(); this.$refs.showright.open();
}, },

View File

@ -129,8 +129,11 @@
width: columns[3].width + 'px', width: columns[3].width + 'px',
minWidth: columns[3].minWidth + 'px' minWidth: columns[3].minWidth + 'px'
}"> }">
<u-tag style="width:40px; text-align: center; margin: 0 auto;" v-if="item.status" <!-- <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> :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>
<view class="table-body-cell" :style="{ <view class="table-body-cell" :style="{
width: columns[4].width + 'px', width: columns[4].width + 'px',
@ -726,7 +729,40 @@
this.addshow = true; 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() { onShow() {

View File

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

View File

@ -20,7 +20,7 @@
<view style="color: #ca4341; margin-right:5px;">*</view> <view style="color: #ca4341; margin-right:5px;">*</view>
<view>项目编号</view> <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" dataKey="lablename" dataValue="projectId" :localdata="xmpickerConfig.options" @change="changexmbh"
:clear="false" style="width: 400px;"></csr-uni-data-select> :clear="false" style="width: 400px;"></csr-uni-data-select>
</view> </view>
@ -156,8 +156,10 @@
</view> </view>
<u-modal content="" :closeOnClickOverlay="true" title="图片预览" confirmText="关闭" width="600px" :show="imgboxshow" <u-modal content="" :closeOnClickOverlay="true" title="图片预览" confirmText="关闭" width="600px" :show="imgboxshow"
@confirm="() => imgboxshow = false"> @confirm="() => imgboxshow = false">
<view class="slot-content" style="width: 100%;min-height: 200px; max-height: 200px; overflow-y: auto;"> <view class="slot-content"
<u-album :urls="imgurlslist" style="margin-top: 20px;" autoWrap showMore multipleSize="100"></u-album> 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> </view>
</u-modal> </u-modal>
@ -648,7 +650,7 @@ width: 100%;align-items: left; border-top:1px solid #eee;">
res.rows = res.rows || []; res.rows = res.rows || [];
for (let s of res.rows) { for (let s of res.rows) {
s.title = s.info + ` -${s.createBy}`; 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; this.bglslist = res.rows;

View File

@ -510,7 +510,7 @@ width: 100%;align-items: left; border-top:1px solid #eee;">
res.rows = res.rows || []; res.rows = res.rows || [];
for (let s of res.rows) { for (let s of res.rows) {
s.title = s.info + ` -${s.createBy}`; 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; this.bglslist = res.rows;

View File

@ -17,9 +17,9 @@
<view style="color: #ca4341; margin-right:5px;">*</view> <view style="color: #ca4341; margin-right:5px;">*</view>
<view>项目编号</view> <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" :clear="false" dataKey="lablename" dataValue="projectId" :localdata="xmpickerConfig.options" :clear="true"
style="width: 400px;"></csr-uni-data-select> style="width: 400px;" @change="changexmbh"></csr-uni-data-select>
</view> </view>
@ -78,7 +78,7 @@
</uni-table> --> </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" :cellStyle="{padding:'10px 10px 0px 10px'}" :data="tableData" :ellipsis="false" height="480" :border="true"
@select="handleSelectionChange" style="width:100%"> @select="handleSelectionChange" style="width:100%">
<!-- :span-method="spanMethodWithColspan" --> <!-- :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) { changexthth(e) {
// //
//debugger //debugger
@ -804,47 +821,46 @@
this.xmpickerConfig.options = res.data.projects || []; this.xmpickerConfig.options = res.data.projects || [];
if (this.xmdwlist.length > 0) { 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.projectId = this.xmdwlist[0].projectId;
// this.queryParams.projectname = this.xmdwlist[0].lablename; // 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 + // setprojectcurrent(this.queryParams.projectId).then((res) => {
`${res2.data.name}`); // //
} else { // this.userStore.setproject(this.xmdwlist[0].projectId, this.xmdwlist[0].lablename);
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);
// });
// }
// this.getlistinfo(); //
// });
setprojectcurrent(this.queryParams.projectId).then((res) => {
//
this.userStore.setproject(this.xmdwlist[0].projectId, this.xmdwlist[0].lablename);
});
} }
// else {
// this.getlistinfo(); //
// }
} else { this.getlistinfo(); //
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(); //
}) })
}, },
clickcell(row, column, cell, event) { clickcell(row, column, cell, event) {

View File

@ -29,6 +29,7 @@ interface userInfoStoreInt {
xththstr: string xththstr: string
projectid: string projectid: string
projectname: string projectname: string
androidappVersion: string
} }
// 创建小仓库 // 创建小仓库
@ -54,7 +55,8 @@ export default defineStore(
xththid: '', xththid: '',
xththstr: '', xththstr: '',
projectid: '', projectid: '',
projectname: '' projectname: '',
androidappVersion: ''
}) })
//debugger //debugger
userInfo.value.token = getToken() userInfo.value.token = getToken()
@ -75,6 +77,7 @@ export default defineStore(
userInfo.value.xththid = storage.get(constant.xththid) userInfo.value.xththid = storage.get(constant.xththid)
userInfo.value.projectid = storage.get(constant.projectid) userInfo.value.projectid = storage.get(constant.projectid)
userInfo.value.projectname = storage.get(constant.projectname) userInfo.value.projectname = storage.get(constant.projectname)
userInfo.value.androidappVersion = storage.get(constant.androidappVersion)
const token = computed(() => { const token = computed(() => {
// debugger // debugger
@ -131,6 +134,9 @@ export default defineStore(
const projectname = computed(() => { const projectname = computed(() => {
return userInfo.value.projectname return userInfo.value.projectname
}) })
const androidappVersion = computed(() => {
return userInfo.value.androidappVersion
})
const parentmenutitle = computed(() => { const parentmenutitle = computed(() => {
return userInfo.value.parentmenutitle return userInfo.value.parentmenutitle
@ -178,6 +184,11 @@ export default defineStore(
userInfo.value.childrenmenutitle = childrenmenutitle userInfo.value.childrenmenutitle = childrenmenutitle
storage.set(constant.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 }) { function userLogin(dataInfo: { username: string; password: string; code: string; uuid: string; mianlogin: boolean }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
@ -298,7 +309,8 @@ export default defineStore(
xththid: '', xththid: '',
xththstr: '', xththstr: '',
projectid: '', projectid: '',
projectname: '' projectname: '',
androidappVersion: ''
} }
uni.clearStorageSync() uni.clearStorageSync()
goToPage({ goToPage({
@ -348,7 +360,9 @@ export default defineStore(
xththstr, xththstr,
projectid, projectid,
projectname, projectname,
setproject setproject,
androidappVersion,
setandroidappVersion
} }
}, },
{ {

View File

@ -15,7 +15,8 @@ const constant = {
xththid: 'vuex_xththid', xththid: 'vuex_xththid',
xththstr: 'vuex_xththstr', xththstr: 'vuex_xththstr',
projectid: 'vuex_projectid', projectid: 'vuex_projectid',
projectname: 'vuex_projectname' projectname: 'vuex_projectname',
androidappVersion: 'vuex_androidappVersion'
} }
export default constant export default constant

View File

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

View File

@ -1,5 +1,6 @@
import { defineConfig, loadEnv } from 'vite' import { defineConfig, loadEnv } from 'vite'
import uni from '@dcloudio/vite-plugin-uni' import uni from '@dcloudio/vite-plugin-uni'
// import Components from 'unplugin-vue-components/vite' // import Components from 'unplugin-vue-components/vite'
import AutoImport from 'unplugin-auto-import/vite' import AutoImport from 'unplugin-auto-import/vite'
import path from 'path' import path from 'path'
@ -16,6 +17,7 @@ export default defineConfig(({ mode }) => {
transpileDependencies: ['uview-plus'], transpileDependencies: ['uview-plus'],
plugins: [ plugins: [
uni(), uni(),
AutoImport({ AutoImport({
imports: ['vue', 'uni-app'], imports: ['vue', 'uni-app'],
// 生成自动导入的TS声明文件 // 生成自动导入的TS声明文件