From 3d98a5d6dcc2e1f9b59a89570fa086548366ed72 Mon Sep 17 00:00:00 2001
From: 李旭东 <woaiguo66@sina.com>
Date: 星期五, 27 十月 2023 15:50:42 +0800
Subject: [PATCH] 环境监测和焊接烟尘增加
---
sz_app/api/module/system.js | 2
sz_app/pages/spotCheck/deviceSpot.vue | 340 ++++++++++++++++++
web/src/views/GreenBuild/EnvironMonitor.vue | 102 +++++
web/src/api/index.js | 4
sz_app/api/api.js | 4
web/src/views/GreenBuild/WeldSmoke.vue | 106 +++++
sz_app/api/http.js | 2
web/.env.production | 3
web/src/api/modules/green.js | 14
web/src/views/EquipmentManage/EquipSpot.vue | 4
web/src/views/Basics/MouldIndex.vue | 4
sz_app/pages/spotCheck/index.vue | 255 ++++++++++++++
sz_app/pages.json | 21 +
sz_app/pages/spotCheck/spotDetail.vue | 133 +++++++
web/.env.development | 1
sz_app/api/module/spot.js | 46 ++
sz_app/manifest.json | 2
17 files changed, 1,029 insertions(+), 14 deletions(-)
diff --git a/sz_app/api/api.js b/sz_app/api/api.js
index 72fb3af..e0a7797 100644
--- a/sz_app/api/api.js
+++ b/sz_app/api/api.js
@@ -9,6 +9,7 @@
import cistern from './module/cistern.js'; // 管片入池
import putbank from './module/putbank.js'; // 管片入库
import exit from './module/exit.js'; // 管片出库
+import spot from './module/spot.js'; // 点检
export default {
system,
@@ -17,5 +18,6 @@
ductpiece,
cistern,
putbank,
- exit
+ exit,
+ spot
};
diff --git a/sz_app/api/http.js b/sz_app/api/http.js
index fedc918..6ffb703 100644
--- a/sz_app/api/http.js
+++ b/sz_app/api/http.js
@@ -1,7 +1,7 @@
function Request() {}
// export const basrUrl = 'https://pipe.thhy-tj.com/api';
// export const basrUrl = 'http://192.168.0.170:8880';
-export const basrUrl = 'http://111.30.93.212:8880';
+export const basrUrl = 'http://111.30.93.212:8089/suapi';
Request.prototype = {
post: function(url, params) {
return new Promise(function(resolve, reject) {
diff --git a/sz_app/api/module/spot.js b/sz_app/api/module/spot.js
new file mode 100644
index 0000000..2aa2063
--- /dev/null
+++ b/sz_app/api/module/spot.js
@@ -0,0 +1,46 @@
+import axios from '../http.js';
+
+export default {
+ /**
+ * 点检接口
+ */
+
+ // 查询字典信息
+ searchDictionary: params => {
+ return axios({
+ url: '/engineering/dict/dictList',
+ method: 'post',
+ ...params,
+ header: {
+ pageNum: params.pageNum,
+ pageSize: params.pageSize
+ }
+ })
+ },
+ // 查询设备点检列表信息
+ searchSpotCheckList: (params) =>
+ axios({
+ method: 'post',
+ url: '/m/checkDevice/findList',
+ ...params,
+ header: {
+ pageNum: params.pageNum,
+ pageSize: params.pageSize
+ }
+ }),
+ // 添加设备点检信息
+ insertSpotCheckInfo: (params) =>
+ axios.post('m/checkDevice/addCheckDevice', params),
+ // 修改设备点检信息
+ updateSpotCheckInfo: (params) =>
+ axios.post('m/checkDevice/addCheckDevice', params),
+ //删除设备点检信息
+ deleteSpotCheckInfo: (params) =>
+ axios.post('/m/checkDevice/delete', params),
+ // 获取点检详情
+ getSpotCheckDetail: (params) =>
+ axios.post('m/checkDevice/checkDeviceInfo', params),
+ // 获取全部设备信息
+ getAllDeviceData: () =>
+ axios.post('/m/checkDevice/deviceList'),
+}
\ No newline at end of file
diff --git a/sz_app/api/module/system.js b/sz_app/api/module/system.js
index 6d2dcef..87e2009 100644
--- a/sz_app/api/module/system.js
+++ b/sz_app/api/module/system.js
@@ -6,7 +6,7 @@
*/
// 登录
userLogin: params =>
- axios.post(`/m/login`, params),
+ axios.post(`/usercore/login`, params),
// 退出登录
logingOut: params =>
axios.post('/usercore/login/logout', params),
diff --git a/sz_app/manifest.json b/sz_app/manifest.json
index 3fd69af..06963e0 100644
--- a/sz_app/manifest.json
+++ b/sz_app/manifest.json
@@ -1,6 +1,6 @@
{
"name" : "智慧管片",
- "appid" : "__UNI__EBC4C2D",
+ "appid" : "__UNI__D1E1AF0",
"description" : "",
"versionName" : "1.1.1",
"versionCode" : 111,
diff --git a/sz_app/pages.json b/sz_app/pages.json
index 7f051d2..2abc331 100644
--- a/sz_app/pages.json
+++ b/sz_app/pages.json
@@ -85,6 +85,27 @@
"navigationBarTextStyle": "white",
"navigationBarTitleText": "管片出库"
}
+ },{
+ "path": "pages/spotCheck/index",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTextStyle": "white"
+ }
+ },
+ {
+ "path": "pages/spotCheck/spotDetail",
+ "style": {
+ "navigationBarBackgroundColor": "#1976FF",
+ "navigationBarTextStyle": "white",
+ "navigationBarTitleText": "点检详情"
+ }
+ },{
+ "path": "pages/spotCheck/deviceSpot",
+ "style": {
+ "navigationBarBackgroundColor": "#1976FF",
+ "navigationBarTextStyle": "white",
+ "navigationBarTitleText": "设备点检"
+ }
}
],
"globalStyle": {
diff --git a/sz_app/pages/spotCheck/deviceSpot.vue b/sz_app/pages/spotCheck/deviceSpot.vue
new file mode 100644
index 0000000..917dcff
--- /dev/null
+++ b/sz_app/pages/spotCheck/deviceSpot.vue
@@ -0,0 +1,340 @@
+<template>
+ <view class="device_spot">
+ <view class="header_semicircle"></view>
+ <view class="device_spot_content">
+ <view class="device_item">
+ <view class="device_item_title">
+ <span>HSHS-001</span>
+ </view>
+ <view class="device_item_value">
+ <span class="label">设备名称:</span>
+ <span>混凝土搅拌机</span>
+ </view>
+ <view class="device_item_value">
+ <span class="label">型号规格:</span>
+ <span>混凝土搅拌机</span>
+ </view>
+ <view class="device_item_value">
+ <span class="label">设备类型:</span>
+ <span>混凝土搅拌机</span>
+ </view>
+ </view>
+ <view class="device_form">
+ <u-form
+ ref="form"
+ labelWidth="auto"
+ :model="formSpot"
+ :rules="rulesSpot">
+ <u-form-item
+ labelPosition="left"
+ label="点检时间"
+ prop="checkTime"
+ borderBottom
+ @click="ckickTime()">
+ <u-input
+ v-model="formSpot.checkTime"
+ border="none"
+ placeholder="请选择点检时间"
+ disabled
+ disabledColor="#FFFFFF"
+ inputAlign="right">
+ </u-input>
+ <u-icon
+ slot="right"
+ name="calendar"
+ ></u-icon>
+ </u-form-item>
+ <u-form-item
+ labelPosition="left"
+ label="点检类型"
+ prop="checkTypeName"
+ borderBottom
+ @click="clickCheckType()">
+ <u-input
+ v-model="formSpot.checkTypeName"
+ border="none"
+ placeholder="请选择点检类型"
+ disabled
+ disabledColor="#FFFFFF"
+ inputAlign="right">
+ </u-input>
+ <u-icon
+ slot="right"
+ name="arrow-right"
+ ></u-icon>
+ </u-form-item>
+ <u-form-item label="点检内容及结果" labelPosition="top" prop="checkContent">
+ <view style="margin: 5px 0; width: 100%;">
+ <u-textarea
+ v-model="formSpot.checkContent"
+ height="100"
+ border="surround"
+ placeholder="请输入点检内容及结果">
+ </u-textarea>
+ </view>
+ </u-form-item>
+ <u-form-item label="上传照片" labelPosition="top" prop="checkContent">
+ <view style="margin: 5px 0; width: 100%;">
+ <u-upload
+ :fileList="fileList"
+ name="1"
+ accept="image"
+ uploadIcon="plus"
+ @afterRead="afterRead"
+ @delete="deleteImage"
+ ></u-upload>
+ </view>
+ </u-form-item>
+ <view class="login_content_button">
+ <u-button
+ type="primary"
+ :color="colorStyle"
+ @click="submitForm()">提交</u-button>
+ </view>
+ </u-form>
+ </view>
+ </view>
+ <u-datetime-picker
+ :show="showTime"
+ v-model="defaultTime"
+ mode="datetime"
+ @cancel="cancelTime"
+ @confirm="confirmTime">
+ </u-datetime-picker>
+ <u-picker
+ :show="showCheckType"
+ :columns="checkTypeData"
+ keyName="dictName"
+ closeOnClickOverlay
+ @cancel="cancelCheckType()"
+ @confirm="confirmCheckType()"
+ @close="showCheckType = false"
+ ></u-picker>
+ </view>
+</template>
+
+<script>
+ import baseUrl from '../../api/http.js';
+import { changeTime, throttle } from '../../plugins/public.js';
+ export default {
+ data() {
+ return {
+ formSpot: {
+ checkTime: '',
+ checkTypeName: '',
+ },
+ rulesSpot: {
+ checkTime: [{
+ required: true,
+ message: '请选择点检时间',
+ trigger: 'blur',
+ }],
+ checkTypeName: [{
+ required: true,
+ message: '请选择点检类型',
+ trigger: 'blur',
+ }],
+ checkContent: [{
+ required: true,
+ message: '请输入点检内容及结果',
+ trigger: 'blur',
+ }]
+ },
+ fileList: [],
+ colorStyle: 'linear-gradient(to right, rgb(79, 142, 244), rgb(85, 109, 254))',
+ showTime: false,
+ defaultTime: Number(new Date()),
+ deviceId: ''
+ }
+ },
+ onReady() {
+ this.$refs.form.setRules(this.rulesSpot);
+ },
+ onLoad(option) {
+ this.deviceId = option.deviceId;
+ this.getChackAllTypes();
+ },
+ methods: {
+ // 获取点检类型
+ async getChackAllTypes(){
+ const { data } = await this.$api.spot.searchDictionary({
+ pageNum: 1,
+ pageSize: 100000000,
+ dictType: 'check_type'
+ });
+ this.checkTypeData = data.list;
+ },
+ // 读取图片后
+ afterRead(event) {
+ console.log(event);
+ this.fileList.push({
+ status: 'loading',
+ message: '上传中',
+ })
+ uni.uploadFile({
+ url: `${baseUrl}/file/file/upload`,
+ fileType: 'image',
+ filePath: event.file.url,
+ name: 'file',
+ success: (res) => {
+ const data = JSON.parse(res.data);
+ this.$set(this.fileList, this.fileList.length - 1, {
+ id: this.fileList.length + 1,
+ status: 'success',
+ message: '',
+ data: data.data,
+ url: `http://filemanage.thhy-tj.com:8888/${data.data}`
+ })
+ },
+ fail: (error) => {
+ uni.$u.toast('上传失败!');
+ }
+ })
+ },
+ // 删除图片
+ deleteImage(event) {
+ this.fileList.splice(event.index, 1);
+ },
+ // 选择时间
+ ckickTime() {
+ this.showTime = true;
+ this.$set(this.formSpot, 'checkTime', '');
+ },
+ // 点击取消选择时间
+ cancelTime() {
+ this.showTime = false;
+ this.$set(this.formSpot, 'checkTime', '');
+ },
+ // 点击选择时间
+ confirmTime({ value }) {
+ this.$set(this.formSpot, 'checkTime', changeTime(value));
+ this.showTime = false;
+ },
+ // 选择点检类型
+ clickCheckType() {
+ this.showCheckType = true;
+ this.$set(this.formSpot, 'checkTypeName', '');
+ this.$set(this.formSpot, 'checkType', '');
+ },
+ // 点击取消选择时间
+ cancelCheckType() {
+ this.showCheckType = false;
+ this.$set(this.formSpot, 'checkTypeName', '');
+ this.$set(this.formSpot, 'checkType', '');
+ },
+ // 点击选择点检类型
+ confirmCheckType({ value }) {
+ this.showCheckType = false;
+ this.$set(this.formSpot, 'checkTypeName', value[0].checkTypeName);
+ this.$set(this.formSpot, 'checkType', value[0].checkType);
+ },
+ // 提交点检信息
+ submitForm: throttle(function() {
+ this.$refs.form.validate().then((valid) => {
+ if(valid) {
+ const params = Object.assign({}, this.formSpot);
+ delete params.checkTypeName;
+ params.deviceId = this.deviceId;
+ if(this.fileList.length > 0) {
+ params.fileList = this.fileList.map(item => {
+ return {
+ file: item.data
+ }
+ })
+ }
+ this.$api.spot.insertSpotCheckInfo(params).then(res => {
+ if(res.success) {
+ uni.$u.toast('添加成功!');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 1500)
+ } else {
+ uni.$u.toast(res.statusMsg);
+ }
+ })
+ }
+ })
+ }, 3000),
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+.device_spot {
+ position: relative;
+ width: 100%;
+ height: 100vh;
+ background: rgba(246, 246, 246, 1);
+
+ .header_semicircle {
+ width: 100%;
+ height: 100px;
+ background: #1977FF;
+ border-radius: 0 0 50% 50%;
+ }
+
+ .device_spot_content {
+ position: absolute;
+ top: 10px;
+ left: 50%;
+ transform: translateX(-50%);
+ display: flex;
+ flex-direction: column;
+ padding: 15px;
+ width: calc(100% - 60px);
+ height: calc(100% - 40px);
+ background: #FFFFFF;
+ border-radius: 6px;
+ overflow-y: auto;
+ box-shadow: 0px 0px 6px 0px rgba(0,0,0,0.04);
+
+ .device_item {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ padding: 10px 15px;
+ // height: 280px;
+ background: #F6FAFF;
+ border-radius: 4px;
+ border-top: 3px solid rgba(25, 119, 255, 1);
+
+ .device_item_title {
+ position: relative;
+ padding: 0 10px;
+ margin: 5px 0;
+ color: rgba(25, 119, 255, 1);
+ font-size: 18px;
+
+ &:before {
+ content: "";
+ position: absolute;
+ top: 50%;
+ left: 0%;
+ transform: translateY(-50%);
+ width: 3px;
+ height: 80%;
+ background-color: rgba(25, 119, 255, 1);
+ }
+ }
+
+ .device_item_value {
+ margin: 5px 0;
+ }
+
+ .label {
+ display: inline-block;
+ color: #999999;
+ white-space: nowrap;
+ }
+
+ .value {
+ color: #1977FF;
+ }
+ }
+
+ .device_form {
+ // margin-top: 20px;
+ }
+ }
+}
+</style>
\ No newline at end of file
diff --git a/sz_app/pages/spotCheck/index.vue b/sz_app/pages/spotCheck/index.vue
new file mode 100644
index 0000000..bc8c683
--- /dev/null
+++ b/sz_app/pages/spotCheck/index.vue
@@ -0,0 +1,255 @@
+<template>
+ <view class="spot_index">
+ <u-navbar
+ title="点检列表"
+ bgColor="#1977FF"
+ :autoBack="true"
+ :placeholder="true"
+ leftIconColor="#FFFFFF"
+ :titleStyle="{
+ color: '#FFFFFF'
+ }">
+ <view slot="right">
+ <span @click="scanDevice()">点检</span>
+ </view>
+ </u-navbar>
+ <view class="header_semicircle"></view>
+ <scroll-view class="spot_content" :scroll-top="scrollTop" refresher-enabled="true" scroll-y="true" refresher-background="#EAEAEA"
+ @scrolltolower="scrolltoLower" :refresher-triggered="triggered" @refresherrefresh="refresherrefresh">
+ <view
+ class="spot_item"
+ v-for="item in spotList"
+ :key="item.id"
+ @click="navgetToDetail(item)">
+ <view class="spot_item_title">
+ <span>设备编号:{{item.bigNumber}}</span>
+ <span>详情</span>
+ </view>
+ <view class="spot_item_content">
+ <view class="">
+ <span class="label">设备名称:</span>
+ <span>{{item.bigDeviceName}}</span>
+ </view>
+ <view class="">
+ <span class="label">型号规格:</span>
+ <span>{{item.bigDeviceModel}}</span>
+ </view>
+ <view class="">
+ <span class="label">设备类型:</span>
+ <span>{{item.bigTypeStr}}</span>
+ </view>
+ <view class="">
+ <span class="label">点检时间:</span>
+ <span class="value">{{item.checkTime}}</span>
+ </view>
+ <view class="">
+ <span class="label">责任人:</span>
+ <span>{{item.adminUserName}}</span>
+ </view>
+ <view class="">
+ <span class="label">责任人电话:</span>
+ <span>{{item.adminUserPhone}}</span>
+ </view>
+ </view>
+ </view>
+ <u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
+ </scroll-view>
+ </view>
+</template>
+
+<script>
+import { throttle } from '../../plugins/public';
+ export default {
+ data() {
+ return {
+ scrollTop: 0,
+ triggered: true,
+ status: 'loading',
+ iconType: 'flower',
+ loadText: {
+ loading: '努力加载中',
+ nomore: '没有更多数据了'
+ },
+ showState: false,
+ columnData: [[{
+ label: '未匹配',
+ id: 1
+ },{
+ label: '匹配成功入模',
+ id: 2
+ },{
+ label: '匹配失败无法入模',
+ id: 3
+ }]],
+ pageNum: 1,
+ pageSize: 10,
+ loadPage: '',
+ spotList: [{id: 1}, {id: 2}, {id: 3}],
+ }
+ },
+ onShow() {
+ this.searchData();
+ },
+ methods: {
+ // 查询模具质检列表
+ async searchSpotCheckList() {
+ const { data } = await this.$api.spot.searchSpotCheckList({
+ pageNum: this.pageNum,
+ pageSize: this.pageSize
+ })
+ return data;
+ },
+ // 查询信息
+ searchData() {
+ this.triggered = true;
+ this.spotList = [];
+ this.searchSpotCheckList().then(data => {
+ this.spotList = data.list;
+ this.loadPage = data.pages;
+ this.triggered = false;
+ this.status = 'nomore';
+ }).catch(() => {
+ this.triggered = false;
+ this.status = 'nomore';
+ uni.$u.toast('没有更数据了');
+ })
+ },
+ //自定义下拉刷新
+ refresherrefresh: throttle(function() {
+ this.status = 'loading';
+ this.pageNum = 1;
+ this.searchData();
+ uni.$u.toast('刷新成功');
+ }, 500),
+ //触底刷新
+ scrolltoLower: throttle(function() {
+ this.status = 'loading';
+ if(this.pageNum >= this.loadPage) {
+ setTimeout(() => {
+ this.status = 'nomore'
+ uni.$u.toast('没有更多数据了');
+ },1000)
+ return
+ } else {
+ this.pageNum += 1;
+ this.searchSpotCheckList().then((data) => {
+ this.loadPage = data.pages;
+ this.spotList.push(...data.list);
+ this.status = 'nomore';
+ })
+ }
+ }, 3000),
+ // 点检
+ scanDevice() {
+ const that = this;
+ uni.$off('scancodedate');
+ uni.$on('scancodedate', function(data) {
+ console.log(data.code);
+ if(data.code) {
+ uni.navigateTo({
+ url: './deviceSpot'
+ })
+ }
+ // that.$api.spot.scanCheckMould({
+ // mouldNum: data.code
+ // }).then((res) => {
+ // if(res.success) {
+ // uni.$u.toast('扫描完成!');
+ // console.log(res,'===');
+ // } else {
+ // uni.$u.toast(res.statusMsg);
+ // }
+ // })
+ uni.$off('scancodedate');
+ })
+ },
+ // 跳转详情
+ navgetToDetail(item) {
+ uni.navigateTo({
+ url: './spotDetail?id=' + item.id
+ })
+ }
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+ .spot_index {
+ position: relative;
+ width: 100%;
+ height: 100vh;
+ background: rgba(246, 246, 246, 1);
+
+ .header_semicircle {
+ width: 100%;
+ height: 100px;
+ background: #1977FF;
+ border-radius: 0 0 50% 50%;
+ }
+
+ .spot_content {
+ position: absolute;
+ top: 70px;
+ left: 50%;
+ transform: translateX(-50%);
+ display: flex;
+ flex-direction: column;
+ width: calc(100% - 30px);
+ height: calc(100% - 70px);
+
+ .spot_item {
+ padding: 10px;
+ margin: 12px 0;
+ // width: 100%;
+ height: 250px;
+ background: #FFFFFF;
+ border-radius: 6px;
+ box-shadow: 0px 0px 6px 0px rgba(0,0,0,0.04);
+
+ &:first-child {
+ margin-top: 0;
+ }
+
+ .spot_item_title {
+ position: relative;
+ padding: 0 10px;
+ display: flex;
+ justify-content: space-between;
+ color: rgba(25, 119, 255, 1);
+ font-size: 16px;
+
+ &:before {
+ content: '';
+ position: absolute;
+ top: 50%;
+ left: 0;
+ transform: translateY(-50%);
+ width: 3px;
+ height: 80%;
+ background-color: rgba(25, 119, 255, 1);
+ }
+ }
+
+ .spot_item_content {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ padding: 10px;
+ margin-top: 10px;
+ height: calc(90% - 30px);
+ background: rgba(25,119,255,0.04);
+
+ .label {
+ display: inline-block;
+ width: 100px;
+ color: #999999;
+ }
+
+ .value {
+ color: #1977FF;
+ }
+ }
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/sz_app/pages/spotCheck/spotDetail.vue b/sz_app/pages/spotCheck/spotDetail.vue
new file mode 100644
index 0000000..3aeae43
--- /dev/null
+++ b/sz_app/pages/spotCheck/spotDetail.vue
@@ -0,0 +1,133 @@
+<template>
+ <view class="spot_detail">
+ <u-form
+ ref="form"
+ labelWidth="auto"
+ :model="formData"
+ :labelStyle="{
+ color: '#999999'
+ }">
+ <u-form-item labelPosition="left" label="设备编号" borderBottom>
+ <u-input
+ v-model="formData.bigDeviceModel"
+ border="none"
+ disabled
+ disabledColor="#FFFFFF"
+ inputAlign="right">
+ </u-input>
+ </u-form-item>
+ <u-form-item labelPosition="left" label="设备名称" borderBottom>
+ <u-input
+ v-model="formData.bigDeviceName"
+ border="none"
+ disabled
+ disabledColor="#FFFFFF"
+ inputAlign="right">
+ </u-input>
+ </u-form-item>
+ <u-form-item labelPosition="left" label="型号规格" borderBottom>
+ <u-input
+ v-model="formData.bigDeviceModel"
+ border="none"
+ disabled
+ disabledColor="#FFFFFF"
+ inputAlign="right">
+ </u-input>
+ </u-form-item>
+ <u-form-item labelPosition="left" label="设备类型" borderBottom>
+ <u-input
+ v-model="formData.bigTypeStr"
+ border="none"
+ disabled
+ disabledColor="#FFFFFF"
+ inputAlign="right">
+ </u-input>
+ </u-form-item>
+ <u-form-item labelPosition="left" label="点检时间" borderBottom>
+ <u-input
+ v-model="formData.checkTime"
+ border="none"
+ disabled
+ disabledColor="#FFFFFF"
+ inputAlign="right">
+ </u-input>
+ </u-form-item>
+ <u-form-item labelPosition="left" label="责任人" borderBottom>
+ <u-input
+ v-model="formData.adminUserName"
+ border="none"
+ disabled
+ disabledColor="#FFFFFF"
+ inputAlign="right">
+ </u-input>
+ </u-form-item>
+ <u-form-item labelPosition="left" label="责任人电话" borderBottom>
+ <u-input
+ v-model="formData.adminUserPhone"
+ border="none"
+ disabled
+ disabledColor="#FFFFFF"
+ inputAlign="right">
+ </u-input>
+ </u-form-item>
+ <u-form-item labelPosition="left" label="点检类型" borderBottom>
+ <u-input
+ v-model="formData.checkType"
+ border="none"
+ disabled
+ disabledColor="#FFFFFF"
+ inputAlign="right">
+ </u-input>
+ </u-form-item>
+ <u-form-item labelPosition="top" label="点检内容及结果" borderBottom>
+ <u-input
+ v-model="formData.checkContent"
+ border="none"
+ disabled
+ disabledColor="#FFFFFF"
+ inputAlign="left">
+ </u-input>
+ </u-form-item>
+ <u-form-item labelPosition="top" label="上传照片" borderBottom>
+ <view style="margin: 5px 0; width: 100%; display: flex;">
+ <u-image
+ v-for="item in formData.fileList"
+ :key="item.id"
+ :src="`http://filemanage.thhy-tj.com:8888${item.file}`"
+ width="100px"
+ height="100px"
+ radius="4">
+ </u-image>
+ </view>
+ </u-form-item>
+ </u-form>
+ </view>
+</template>
+
+<script>
+
+ export default {
+ data() {
+ return {
+ formData: {},
+ }
+ },
+ onLoad(option) {
+ console.log(option,'==');
+ this.$api.spot.getSpotCheckDetail({
+ id: option.id
+ }).then((res) => {
+ this.formData = res.success ? res.data : {};
+ })
+ },
+ methods: {
+
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+.spot_detail {
+ padding: 15px;
+}
+</style>
\ No newline at end of file
diff --git a/web/.env.development b/web/.env.development
index a2cd8ab..1644fb6 100644
--- a/web/.env.development
+++ b/web/.env.development
@@ -3,4 +3,5 @@
# VUE_APP_BASE_URL = 'https://logadd.com:8443/pipe'
# VUE_APP_BASE_URL = 'https://ssfp.thhy-tj.com/api'
VUE_APP_BASE_URL = 'http://111.30.93.212:8089/suapi'
+# VUE_APP_BASE_URL = 'http://192.168.0.247:8880'
# VUE_APP_BASE_URL = 'http://111.30.93.212:8089/pipesu'
\ No newline at end of file
diff --git a/web/.env.production b/web/.env.production
index 3dd7b05..8784e7a 100644
--- a/web/.env.production
+++ b/web/.env.production
@@ -1,3 +1,4 @@
# VUE_APP_BASE_URL = 'https://pipe.thhy-tj.com:8880'
-VUE_APP_BASE_URL = 'http://111.30.93.212:10100'
\ No newline at end of file
+VUE_APP_BASE_URL = 'http://111.30.93.212:8089/suapi'
+# VUE_APP_BASE_URL = 'http://111.30.93.247:8880'
\ No newline at end of file
diff --git a/web/src/api/index.js b/web/src/api/index.js
index d731477..9428f63 100644
--- a/web/src/api/index.js
+++ b/web/src/api/index.js
@@ -22,6 +22,7 @@
import Analyse from './modules/analyse'; // 数据分析模块
import Safety from './modules/safety'; // 安全管理模块
import Scan from './modules/scan'; // 扫码跳转到对应页面
+import Green from './modules/green'; // 扫码跳转到对应页面
export default {
System,
@@ -44,5 +45,6 @@
Report,
Analyse,
Safety,
- Scan
+ Scan,
+ Green
}
diff --git a/web/src/api/modules/green.js b/web/src/api/modules/green.js
new file mode 100644
index 0000000..5de779b
--- /dev/null
+++ b/web/src/api/modules/green.js
@@ -0,0 +1,14 @@
+/**
+ * 绿色施工
+ */
+import axios from '../request';
+
+export default {
+ // 查询环境监测
+ searchEnvironMonitorList: (params) =>
+ axios.post('/materials/helmet/dataValuesList ', params),
+ // 查询焊接烟尘信息
+ searchSmokeList: params =>
+ axios.post('/materials/helmet/dataSmockList', params),
+
+}
\ No newline at end of file
diff --git a/web/src/views/Basics/MouldIndex.vue b/web/src/views/Basics/MouldIndex.vue
index 661dd28..c4b7b51 100644
--- a/web/src/views/Basics/MouldIndex.vue
+++ b/web/src/views/Basics/MouldIndex.vue
@@ -192,10 +192,10 @@
</el-select>
</el-form-item>
<el-form-item label="模具检查预警值:" prop="supplierId">
- <el-input placeholder="请输入次数" v-model="input2" style="margin-right:15px">
+ <el-input placeholder="请输入次数" v-model="formMould.input2" style="margin-right:15px">
<template slot="append">次数</template>
</el-input>
- <el-input placeholder="请输入天数" v-model="input2">
+ <el-input placeholder="请输入天数" v-model="formMould.input2">
<template slot="append">天数</template>
</el-input>
</el-form-item>
diff --git a/web/src/views/EquipmentManage/EquipSpot.vue b/web/src/views/EquipmentManage/EquipSpot.vue
index 036c4b9..9feb288 100644
--- a/web/src/views/EquipmentManage/EquipSpot.vue
+++ b/web/src/views/EquipmentManage/EquipSpot.vue
@@ -179,8 +179,8 @@
bigNumber: this.bigNumber,
pageNum: this.pageNum,
pageSize: this.pageSize,
- startTime: this.timeData ? this.timeData[0] : '',
- endTime: this.timeData ? this.timeData[1] : ''
+ startTime: this.timeData ? this.timeData[0] + ' 00:00:00' : '',
+ endTime: this.timeData ? this.timeData[1] + ' 23:59:59' : ''
}).then(res => {
if(res.success) {
this.total = res.data.total;
diff --git a/web/src/views/GreenBuild/EnvironMonitor.vue b/web/src/views/GreenBuild/EnvironMonitor.vue
index 61c5bb7..e2954e0 100644
--- a/web/src/views/GreenBuild/EnvironMonitor.vue
+++ b/web/src/views/GreenBuild/EnvironMonitor.vue
@@ -1,3 +1,101 @@
<template>
- <div>环境监测</div>
-</template>
\ No newline at end of file
+ <div class="main">
+ <div class="main_header">
+ <div class="header_item">
+ <span class="header_label">时间范围:</span>
+ <el-date-picker
+ v-model="dataTime"
+ type="daterange"
+ range-separator="至"
+ start-placeholder="开始日期"
+ end-placeholder="结束日期"
+ value-format="yyyy-MM-dd">
+ </el-date-picker>
+ </div>
+ <div class="header_item">
+ <el-button icon="el-icon-search" @click="searchEnvironMonitorList(true)">查询</el-button>
+ <!-- <el-button icon="el-icon-search" v-if="showButton('search')">查询</el-button> -->
+ </div>
+ </div>
+ <div class="main_content">
+ <el-table
+ v-loading="loading"
+ :data="monitorList"
+ height="100%">
+ <el-table-column label="序号" align="center" >
+ <template #default="scope">
+ <div>
+ <span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column prop="uploadTime" label="采集时间" align="center" ></el-table-column>
+ <el-table-column prop="deviceName" label="设备" align="center"></el-table-column>
+ <el-table-column prop="pm25" label="PM2.5(微克/立方米)" width="200" align="center" ></el-table-column>
+ <el-table-column prop="pm10" label="PM10(微克/立方米)" width="200" align="center" ></el-table-column>
+ <el-table-column prop="tsp" label="TSP(微克/立方米)" width="200" align="center" ></el-table-column>
+ <el-table-column prop="temperature" label="温度(摄氏度)" align="center" ></el-table-column>
+ <el-table-column prop="humidity" label="湿度(%)" align="center" ></el-table-column>
+ <el-table-column prop="bigDeviceModel" label="大气压(千帕)" align="center" ></el-table-column>
+ <el-table-column prop="windSpeed" label="风速(米/秒)" align="center" ></el-table-column>
+ <el-table-column prop="windDirection" label="风向" align="center" ></el-table-column>
+ <el-table-column prop="noise" label="噪声(分贝)" align="center" ></el-table-column>
+ </el-table>
+ </div>
+ <div class="main_footer">
+
+ </div>
+ </div>
+</template>
+
+<script>
+import { buttonPinia } from '../../pinia';
+export default {
+ data() {
+ return {
+ dataTime: '',
+ pageNum: 1,
+ pageSize: 10,
+ total: 0,
+ loading: false,
+ monitorList: []
+ }
+ },
+ mounted() {
+ this.searchEnvironMonitorList(true);
+ },
+ methods: {
+ // 查询环境监测
+ searchEnvironMonitorList(bol) {
+ if(bol) {
+ this.pageNum = 1;
+ }
+ this.loading = true;
+ this.monitorList = [];
+ this.$api.Green.searchEnvironMonitorList({
+ strTime: this.dataTime ? this.dataTime[0] : '',
+ endTime: this.dataTime ? this.dataTime[1] : '',
+ pageNum: this.pageNum,
+ pageSize: this.pageSize
+ }).then(res => {
+ if(res.success) {
+ this.total = res.data.total;
+ this.monitorList = res.data.list;
+ }
+ this.loading = false;
+ }).catch(() => {
+ this.loading = false;
+ })
+ },
+ // 判断按钮权限信息
+ showButton(str) {
+ const pinia = buttonPinia();
+ return pinia.$state.buttonInfo.includes(str);
+ }
+ }
+};
+</script>
+
+<style lang="scss" scoped>
+@import '@/style/layout-main.scss';
+</style>
\ No newline at end of file
diff --git a/web/src/views/GreenBuild/WeldSmoke.vue b/web/src/views/GreenBuild/WeldSmoke.vue
index d9b1573..dc7e116 100644
--- a/web/src/views/GreenBuild/WeldSmoke.vue
+++ b/web/src/views/GreenBuild/WeldSmoke.vue
@@ -1,3 +1,105 @@
<template>
- <div>焊接烟尘</div>
-</template>
\ No newline at end of file
+ <div class="main">
+ <div class="main_header">
+ <div class="header_item">
+ <span class="header_label">时间范围:</span>
+ <el-date-picker
+ v-model="dataTime"
+ type="daterange"
+ range-separator="至"
+ start-placeholder="开始日期"
+ end-placeholder="结束日期"
+ value-format="yyyy-MM-dd">
+ </el-date-picker>
+ </div>
+ <div class="header_item">
+ <el-button icon="el-icon-search" @click="searchSmokeList(true)">查询</el-button>
+ <!-- <el-button icon="el-icon-search" v-if="showButton('search')">查询</el-button> -->
+ </div>
+ </div>
+ <div class="main_content">
+ <el-table
+ v-loading="loading"
+ :data="smokeList"
+ height="100%">
+ <el-table-column label="序号" align="center" >
+ <template #default="scope">
+ <div>
+ <span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column prop="bigDeviceName" label="采集时间" align="center" ></el-table-column>
+ <el-table-column prop="bigNumber" label="设备" align="center"></el-table-column>
+ <el-table-column prop="dc" label="粉尘浓度(mg/m³)" align="center" ></el-table-column>
+ <el-table-column prop="t" label="温度(℃)" align="center" ></el-table-column>
+ <el-table-column prop="dp" label="压差(pa)" align="center" ></el-table-column>
+ <el-table-column prop="oc" label="氧气浓度(%)" align="center" ></el-table-column>
+ <el-table-column prop="fans" label="风速(m/s)" align="center" ></el-table-column>
+ <el-table-column prop="alarm" label="设备报警" align="center" ></el-table-column>
+ <el-table-column label="风机启动" align="center" >
+ <template #default="{ row }">
+ <div>
+ {{row.fanrun ? row.fanrun == 1 ? '运行' : '未运行' : ''}}
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ <div class="main_footer">
+
+ </div>
+ </div>
+</template>
+
+<script>
+import { buttonPinia } from '../../pinia';
+export default {
+ data() {
+ return {
+ dataTime: '',
+ pageNum: 1,
+ pageSize: 10,
+ total: 0,
+ loading: false,
+ smokeList: []
+ }
+ },
+ mounted() {
+ this.searchSmokeList(true);
+ },
+ methods: {
+ // 查询焊接烟尘信息
+ searchSmokeList(bol) {
+ if(bol) {
+ this.pageNum = 1;
+ }
+ this.loading = true;
+ this.smokeList = [];
+ this.$api.Green.searchSmokeList({
+ strTime: this.dataTime ? this.dataTime[0] : '',
+ endTime: this.dataTime ? this.dataTime[1] : '',
+ pageNum: this.pageNum,
+ pageSize: this.pageSize
+ }).then(res => {
+ if(res.success) {
+ this.total = res.data.total;
+ this.smokeList = res.data.list;
+ }
+ this.loading = false;
+ }).catch(() => {
+ this.loading = false;
+ })
+ },
+ // 判断按钮权限信息
+ showButton(str) {
+ const pinia = buttonPinia();
+ return pinia.$state.buttonInfo.includes(str);
+ }
+ }
+};
+</script>
+
+<style lang="scss" scoped>
+@import '@/style/layout-main.scss';
+</style>
\ No newline at end of file
--
Gitblit v1.9.3