This commit is contained in:
DESKTOP-VMMLSOQ\wangzg 2024-08-06 00:17:35 +08:00
parent b11b73b2e6
commit 790e9a7ef0
14 changed files with 369 additions and 119 deletions

View File

@ -69,8 +69,8 @@ https://1x.antdv.com/components/icon/
#### 清洁运输
清洁运输 /cleanTravel/home
厂区车辆台账 /cleanTravel/ledger
清洁运输 /cleanTravel/home 联调完成
厂区车辆台账 /cleanTravel/ledger 联调完成
清洁运输趋势 /cleanTravel/trend
磅秤台账 /cleanTravel/bangcheng (已做)待联调

View File

@ -21,7 +21,7 @@
.bg {
width: 100%;
box-sizing: border-box;
height: 100%;
height: 100vh;
box-sizing: border-box;
background: url('~/assets/images/new/大背景.png') center no-repeat;
background-size: 100% 100%;

View File

@ -90,6 +90,9 @@
</a-tree-select>
<a-range-picker v-bind="menuItem.props || {}" v-decorator="gtDecorator(menuItem)"
v-else-if="menuItem.type === 'dateRange'" format="YYYY-MM-DD"/>
<a-date-picker style="width: 100%" v-decorator="gtDecorator(menuItem)" v-bind="menuItem.props || {}"
v-else-if="menuItem.type === 'date'" format="YYYY-MM-DD"/>
</a-form-item>
</a-form>
</a-modal>
@ -100,6 +103,7 @@ export default {
name: "user",
data() {
return {
cacheData: [],
isValidate: false,
tableDataSource: [],
form: this.$form.createForm(this, {name: `form_${new Date().valueOf()}`}),
@ -155,6 +159,11 @@ export default {
type: Object,
default: () => ({})
},
customSearch: {
type: Function,
default: () => null
}
},
computed: {
searchItems() {
@ -179,8 +188,8 @@ export default {
this.handleSearch()
},
methods: {
viewDetails(data){
this.$emit('viewDetails',data)
viewDetails(data) {
this.$emit('viewDetails', data)
},
gtDecorator(menuItem) {
if (menuItem.rules) {
@ -252,6 +261,11 @@ export default {
reset() {
this.form.resetFields();
},
doSearch () {
if (this.customSearch) {
this.tableDataSource = this.customSearch(JSON.parse(JSON.stringify(this.cacheData)))
}
},
async handleSearch(e) {
e && e.preventDefault();
const values = this.form.getFieldsValue()
@ -263,9 +277,11 @@ export default {
})
if (noPage) {
this.page = false
this.cacheData = data
this.tableDataSource = data
} else {
this.page.total = data.total || 0
this.cacheData = data.items
this.tableDataSource = data.items
}
},

View File

@ -1,9 +1,9 @@
<template>
<div class="cusdesc">
<div class="desc" v-for="(col, index) in columns" :key="index">
<div class="desc" v-for="(col, index) in columns" :key="index" :style="{ width: col.width || '50%' }">
<div class="desc-title">{{ col.title }}:</div>
<div class="desc-value">{{ data[col.key] }}</div>
<div class="desc-value">{{ data[col.key || col.dataIndex] }}</div>
</div>
</div>
</template>
@ -37,7 +37,11 @@ export default {
text-align: left;
vertical-align: top;
.desc {
width: 100%;
margin-top: 16px;
display: flex;
justify-content: flex-start;
align-items: center;
&:first-child {
margin-top: 0;
}

View File

@ -2,7 +2,7 @@
<template>
<div class="custom-table">
<Curd v-bind="$attrs" v-on="$listeners"></Curd>
<Curd v-bind="$attrs" v-on="$listeners" ref="curd"></Curd>
</div>
</template>
<script>
@ -10,11 +10,24 @@ import Curd from "./Curd.vue";
export default {
name: "CustomTable",
components: {Curd}
components: {Curd},
methods : {
doSearch () {
this.$refs.curd.doSearch()
},
}
}
</script>
<style scoped lang="less">
.custom-table {
/deep/ .ant-table-header {
background-color: transparent !important;
border-bottom: 0px ;
}
/deep/ .ant-table-fixed-header > .ant-table-content > .ant-table-scroll > .ant-table-body {
background-color: transparent !important;
}
/deep/ .ant-table-thead > tr > th {
background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
color: rgba(255, 255, 255, 1);

View File

@ -5,7 +5,15 @@
<div class="header-content">
<div class="time"><a-icon type="clock-circle" style="margin-right: 10px;" />{{ time }}</div>
<div class="tq">{{ tq }}</div>
<p class="_title">{{ title }}一体化平台</p>
<p class="_title" v-if="customTitle">{{ customTitle }}</p>
<p class="_title" v-else>{{ customTitle || title }}一体化平台</p>
<div class="back" v-if="showBack" @click="() => $router.go(-1)">返回</div>
<div class="btn-box">
<div class="btn" :key="btn.key" v-for="btn in btns" @click="$emit('click', btn)">
{{ btn.title }}
</div>
</div>
</div>
</div>
</template>
@ -27,6 +35,20 @@ export default {
return ''
}
},
props: {
customTitle: {
type: String,
default: ''
},
showBack: {
type: Boolean,
default: false
},
btns: {
type: Array,
default: () => []
}
},
data () {
return {
time: moment().format('YYYY-MM-DD HH:mm:ss'),
@ -56,6 +78,39 @@ export default {
box-sizing: border-box;
padding-top: 5px;
position: relative;
.btn-box {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
position: absolute;
top: 30px;
left: 50%;
transform: translateX(-50%);
.btn {
height: 30px;
pointer-events: auto;
color: #fff;
padding: 5px 10px;
background-color: #1890ff;
cursor: pointer;
margin-left: 10px;
&:first-child {
margin-left: 0;
}
}
}
.back {
position: absolute;
right: 10px;
top: 40px;
border-radius: 10px;
padding: 5px 20px;
color: #fff;
background-color: #1890ff;
cursor: pointer;
}
.time {
position: absolute;
left: 20px;

View File

@ -2,7 +2,7 @@
<template>
<new-bg>
<flex-col>
<system-title/>
<system-title />
<ModuleContent padding="20px">
<flex-col>
<web2-title>清洁运输</web2-title>
@ -27,9 +27,9 @@
<img :src="selectedRecord.imgUrl" alt="" class="car-preview">
<butgroup2>
<cus-button2 flex>进出场抓拍图</cus-button2>
<cus-button2>行驶证-正面</cus-button2>
<cus-button2>行驶证-反面</cus-button2>
<cus-button2>环保清单</cus-button2>
<!-- <cus-button2>行驶证-正面</cus-button2>-->
<!-- <cus-button2>行驶证-反面</cus-button2>-->
<!-- <cus-button2>环保清单</cus-button2>-->
</butgroup2>
<ModuleContent padding="20px 27px" class="desc">
<cus-desc :data="selectedRecord" :columns="descColumns"></cus-desc>
@ -75,7 +75,9 @@
hide-button
:columns="columns"
:api-conf="apiConf"
:tableProps="tableProps"
:table-props="tableProps"
:custom-search="customSearch"
ref="cusTable"
/>
</div>
@ -93,10 +95,10 @@
<cus-button>
<nuxt-link to="/cleanTravel/trend">清洁运输趋势</nuxt-link>
</cus-button>
<cus-button>
<!-- <cus-button>
<nuxt-link to="/cleanTravel/bangcheng">磅秤台账</nuxt-link>
</cus-button>
<cus-button>门禁监控</cus-button>
<cus-button>门禁监控</cus-button>-->
</butgroup>
</flex-col>
</ModuleContent>
@ -148,6 +150,7 @@ export default {
const self = this
return {
tableProps: {
scroll: {y: 500},
customRow (record) {
return {
on: {
@ -163,7 +166,7 @@ export default {
}
},
apiConf: {
listApi: { api: '/api/Transport/list', method: 'get' },
listApi: { api: '/api/Transport/list', method: 'get', noPage: true },
},
selectedRecord: {},
bgStr,
@ -178,19 +181,37 @@ export default {
dataSource: [],
descColumns: [
{
title: '设备掉线',
dataIndex: 'deviceName',
width: '33.333%'
},
{
title: '故障异常',
dataIndex: 'errorName',
width: '33.333%'
},
{
title: '异常报警',
dataIndex: 'errorImg',
width: '33.333%'
title: '车牌号',
dataIndex: 'carNumber',
width: '100%'
},{
title: '车牌颜色',
dataIndex: 'carColorString',
width: '100%'
},{
title: '车辆类型',
dataIndex: 'carType',
width: '100%'
},{
title: '车辆类型',
dataIndex: 'carType',
width: '100%'
},{
title: '排放等级',
dataIndex: 'effluent',
width: '100%'
},{
title: 'VIN',
dataIndex: 'vin',
width: '100%'
},{
title: '发动机号',
dataIndex: 'entryExitPictureUrl',
width: '100%'
},{
title: '注册日期',
dataIndex: 'registrationDate',
width: '100%'
}
],
columns: [
@ -236,6 +257,15 @@ export default {
title: state => state.system.title,
})
},
watch : {
searchCarNum () {
this.$nextTick(() => {
if (this.$refs.cusTable) {
this.$refs.cusTable.doSearch()
}
})
}
},
mounted() {
this.getCount()
this.getDataSource()
@ -343,6 +373,11 @@ export default {
})
}
},
customSearch (data = []) {
if (!this.searchCarNum) return data
return data.filter(item => item.carNumber.indexOf(this.searchCarNum) >= 0)
}
}
}
</script>

View File

@ -11,31 +11,30 @@
<a-row :gutter="16">
<a-col :span="6">
<a-card title="运输车辆" size="small">
<p>card content</p>
<p>{{ headCount.t1 || 0 }}</p>
</a-card>
</a-col>
<a-col :span="6">
<a-card title="国Ⅵ输车辆" size="small">
<p>card content</p>
<p>{{ headCount.t2 || 0 }}</p>
</a-card>
</a-col>
<a-col :span="6">
<a-card title="非道路工程机械" size="small">
<p>card content</p>
<p>{{ headCount.t3 || 0 }}</p>
</a-card>
</a-col>
<a-col :span="6">
<a-card title="燃油运输车辆" size="small">
<p>card content</p>
<p>{{ headCount.t4 || 0 }}</p>
</a-card>
</a-col>
</a-row>
<a-divider />
<Curd
hide-action
hide-search
hide-button
hide-action
:columns="columns"
:api-conf="apiConf"
:form-items="formItems"
@ -58,6 +57,7 @@ export default {
},
data () {
return {
headCount: {},
isEdit: false,
roles: [],
columns: [
@ -88,7 +88,7 @@ export default {
{
dataIndex: 'emissions',
key: 'emissions',
title: '燃油车'
title: '燃油车标准'
},
{
dataIndex: 'createDateTime',
@ -98,6 +98,7 @@ export default {
],
apiConf: {
listApi: { api: '/api/Ledger/list', method: 'get' },
addApi: {api: '/api/Ledger/add', method: 'post',}
}
}
},
@ -110,19 +111,68 @@ export default {
key: 'time',
label: '日期',
isSearch: true,
hide: true,
placeholder: ['请选择开始日期', '请选择结束日期'],
rules: [
{ required: true, message: '请选择时间范围' }
],
fields: ['startTime', 'endTime']
},
{
type: 'date',
key: 'outTime',
label: '日期',
placeholder: '请选择日期'
},
{
type: 'input',
key: 'carNum',
label: '车牌号',
placeholder: '请输入车牌号'
},
{
type: 'input',
key: 'carModel',
label: '车型',
placeholder: '请输入车型'
},
{
type: 'select',
key: 'newCar',
label: '新能源',
placeholder: '是否新能源',
children: [
{ label: '是', value: '是' },
{ label: '否', value: '否' },
]
},
{
type: 'select',
key: 'emissions',
label: '燃油车标准',
placeholder: '',
},
{
type: 'date',
key: 'createDateTime',
label: '出厂日期',
placeholder: '',
}
]
}
},
created() {
this.$http.get('/api/Ledger/HeaderCount').then(({data}) => {
this.headCount = data || {}
})
},
methods: {
add () {
},
editHandler (isEdit) {
this.isEdit = isEdit
},

View File

@ -1,6 +1,10 @@
<!--峰煤监控系统-->
<template>
<new-bg>
<flex-col>
<system-title />
<div class="center-panel">
<Map type="middle" @pointClick="pointClick" />
</div>
@ -97,6 +101,7 @@
</BFC>
</ModuleContent>
</flex-col>
</flex-col>
</new-bg>
</template>

15
pages/test.vue Normal file
View File

@ -0,0 +1,15 @@
<script>
export default {
name: "test",
}
</script>
<template>
<div></div>
</template>
<style scoped lang="less">
</style>

View File

@ -15,6 +15,7 @@
<div class="car-washing-machine-name">西门洗车</div>
<div class="state-icon">
正常
</div>
</div>

View File

@ -1,94 +1,142 @@
<template>
<div class="paifang" style="height: 100vh;overflow: hidden">
<a-page-header
:ghost="false"
style="border-bottom: 1px solid rgb(235, 237, 240)"
title="有组织排放"
@back="() => $router.go(-1)"
/>
<a-row :gutter="16">
<a-col :span="6">
<a-card title="全厂有组织排放源" size="small">
<p>card content</p>
</a-card>
</a-col>
<a-col :span="6">
<a-card title="全厂重要排放源" size="small">
<p>card content</p>
</a-card>
</a-col>
<a-col :span="6">
<a-card title="当前区域排放源" size="small">
<p>card content</p>
</a-card>
</a-col>
<a-col :span="6">
<a-card title="当前区域其中重要排放源" size="small">
<p>card content</p>
</a-card>
</a-col>
</a-row>
<a-row style="height: calc(100% - 147px);margin-top: 16px;" :gutter="16">
<a-col :span="6" style="height: 100%;">
<a-card title="工序步骤" size="small">
<a-button type="primary" block>
Primary
</a-button>
<a-button type="primary" block class="mt16">
Primary
</a-button>
<a-button type="primary" block class="mt16">
Primary
</a-button>
<a-button type="primary" block class="mt16">
Primary
</a-button>
<a-button type="primary" block class="mt16">
Primary
</a-button>
<a-button type="primary" block class="mt16">
Primary
</a-button>
<new-bg>
<flex-col>
<system-title @click="changeTab" show-back custom-title="有组织排放" :btns="btns"/>
</a-card>
<ModuleContent padding="0px 20px 20px">
<div style="height: 144px;width: 100%;">
<ModuleContent2 bg bg-str :border="false">
<butgroup2 style="height: 100%;">
<ModuleContent2 bg bg-color border>
<miaoshu title="全厂有组织排放源" :value="count.comeCount" color="rgba(42, 207, 255, 1)"></miaoshu>
</ModuleContent2>
<ModuleContent2 bg bg-color border style="margin-left: 16px;">
<miaoshu title="全厂重要排放源" :value="count.outCount" color="rgba(255, 171, 87, 1)"></miaoshu>
</ModuleContent2>
<ModuleContent2 bg bg-color border style="margin-left: 16px;">
<miaoshu title="当前区域排放源" :value="count.inCount" color="rgba(122, 175, 255, 1)"></miaoshu>
</ModuleContent2>
<ModuleContent2 bg bg-color border style="margin-left: 16px;">
<miaoshu title="当前区域其中重要排放源" :value="count.addCount" color="rgba(76, 243, 129, 1)"></miaoshu>
</ModuleContent2>
</butgroup2>
</ModuleContent2>
</div>
<div class="paifang" style="height: calc(100% - 144px);overflow: hidden">
<a-row style="height: 100%;margin-top: 16px;" :gutter="16">
<a-col :span="3" style="height: 100%;">
<web3-title>工序步骤</web3-title>
<div class="gongxu-box">
<div class="gongxu-item" v-for="item in gongxu" :key="item.id">
{{ item.name }}
</div>
</div>
</a-col>
<a-col :span="12" style="height: 100%;">
<a-col :span="17" style="height: 100%;">
<div style="height: 100%;position: relative">
<div class="map-cv" style="height: calc(100% - 80px);position: relative">
<Map></Map>
</div>
<butgroup>
<cus-button>
<nuxt-link to="/youzuzhi/paifangtongji">环保排放统计</nuxt-link>
</cus-button>
<!-- <cus-button>
<nuxt-link to="/cleanTravel/bangcheng">磅秤台账</nuxt-link>
</cus-button>
<cus-button>门禁监控</cus-button>-->
</butgroup>
</div>
</a-col>
<a-col :span="6" style="height: 100%;">
<a-table :columns="columns" :data-source="data" />
<a-col :span="4" style="height: 100%;">
<web3-title>排放源清单</web3-title>
<a-table :columns="columns" :data-source="data"/>
</a-col>
</a-row>
</div>
</ModuleContent>
</flex-col>
</new-bg>
</template>
<script>
import Map from "../../components/Map.vue";
import NewBg from "../../components/NewBg.vue";
import SystemTitle from "../../components/smallCommon/SystemTitle.vue";
import FlexCol from "../../components/FlexCol.vue";
import ModuleContent from "../../components/ModuleContent.vue";
import Butgroup2 from "../../components/smallCommon/butgroup2.vue";
import Miaoshu from "../../components/smallCommon/miaoshu.vue";
import ModuleContent2 from "../../components/smallCommon/ModuleContent2.vue";
import Web3Title from "../../components/smallCommon/Web3Title.vue";
import CusButton from "../../components/smallCommon/CusButton.vue";
import Butgroup from "../../components/smallCommon/butgroup.vue";
export default {
name: "paifang",
components: {
Butgroup, CusButton,
Web3Title,
ModuleContent2, Miaoshu, Butgroup2,
ModuleContent,
FlexCol,
SystemTitle,
NewBg,
Map
},
data () {
data() {
return {
btns: [
{ title: 'VOC', key: '1' },
{ title: 'CEMS', key: '2' },
],
count: {},
data: [],
gongxu: [],
columns: [
{ title: '名词', key: 'name' },
{ title: 'NO', key: 'NO' },
{ title: 'SO2', key: 'SO2' },
{ title: 'TSP', key: 'TSP' },
{title: '名词', key: 'name'},
{title: 'NO', key: 'NO'},
{title: 'SO2', key: 'SO2'},
{title: 'TSP', key: 'TSP'},
]
}
},
mounted() {
this.getData(1)
},
methods: {
changeTab (tab) {
this.getData(tab)
},
getData (deviceType) {
this.$http.get('/api/Organized/listanddevice', {
organizedType: 1,
deviceType: deviceType
}).then(({data}) => {
this.gongxu = data || []
})
}
}
}
</script>
<style scoped lang="less">
.mt16 {
.mt16 {
margin-top: 16px;
}
.gongxu-box {
height: calc(100% - 48px);
overflow-y: auto;
.gongxu-item {
cursor: pointer;
padding: 16px 0;
color: #fff;
font-size: 18px;
border-bottom: 1px solid rgba(238, 238, 238, 0.54);
}
}
</style>

View File

@ -1,15 +1,11 @@
<template>
<new-bg>
<flex-col>
<system-title show-back custom-title="有组织排放统计"/>
<ModuleContent padding="0px 20px 20px">
<div class="paifangtongji" style="height: 100vh;overflow: hidden">
<a-page-header
:ghost="false"
style="border-bottom: 1px solid rgb(235, 237, 240)"
title="有组织排放统计"
@back="() => $router.go(-1)"
/>
<a-row :gutter="16">
<a-col :span="18">
@ -19,11 +15,20 @@
</a-col>
</a-row>
</div>
</ModuleContent>
</flex-col>
</new-bg>
</template>
<script>
import FlexCol from "../../components/FlexCol.vue";
import SystemTitle from "../../components/smallCommon/SystemTitle.vue";
import NewBg from "../../components/NewBg.vue";
import ModuleContent from "../../components/ModuleContent.vue";
export default {
name: "paifangtongji",
components: {ModuleContent, NewBg, SystemTitle, FlexCol},
data () {
return {
data: [],

View File

@ -1,6 +1,7 @@
import axios from 'axios' //引用axios
import { message } from 'ant-design-vue';
import Vue from 'vue'
import checkTypes from "../utils/checkTypes";
axios.defaults.withcredentials =true
// create an axios instance
const service = axios.create({
@ -23,7 +24,9 @@ service.interceptors.request.use(
service.interceptors.response.use(
response => {
const res = response.data //res is my own data
if (!checkTypes.isObject(res)) {
return { data: res }
}
if (`${res.code}` === '0') {
return res
} else {