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

@ -56,7 +56,7 @@ https://1x.antdv.com/components/icon/
首页 /home 首页 /home
#### 有组织 #### 有组织
有组织排放 /youzuzhi/paifang 待联调 有组织排放 /youzuzhi/paifang 待联调
有组织排放统计 /youzuzhi/paifangtongji 待联调 有组织排放统计 /youzuzhi/paifangtongji 待联调
@ -69,9 +69,9 @@ https://1x.antdv.com/components/icon/
#### 清洁运输 #### 清洁运输
清洁运输 /cleanTravel/home 清洁运输 /cleanTravel/home 联调完成
厂区车辆台账 /cleanTravel/ledger 厂区车辆台账 /cleanTravel/ledger 联调完成
清洁运输趋势 /cleanTravel/trend 清洁运输趋势 /cleanTravel/trend
磅秤台账 /cleanTravel/bangcheng (已做)待联调 磅秤台账 /cleanTravel/bangcheng (已做)待联调
#### 视频广场 #### 视频广场

View File

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

View File

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

View File

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

View File

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

View File

@ -5,7 +5,15 @@
<div class="header-content"> <div class="header-content">
<div class="time"><a-icon type="clock-circle" style="margin-right: 10px;" />{{ time }}</div> <div class="time"><a-icon type="clock-circle" style="margin-right: 10px;" />{{ time }}</div>
<div class="tq">{{ tq }}</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>
</div> </div>
</template> </template>
@ -27,6 +35,20 @@ export default {
return '' return ''
} }
}, },
props: {
customTitle: {
type: String,
default: ''
},
showBack: {
type: Boolean,
default: false
},
btns: {
type: Array,
default: () => []
}
},
data () { data () {
return { return {
time: moment().format('YYYY-MM-DD HH:mm:ss'), time: moment().format('YYYY-MM-DD HH:mm:ss'),
@ -56,6 +78,39 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding-top: 5px; padding-top: 5px;
position: relative; 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 { .time {
position: absolute; position: absolute;
left: 20px; left: 20px;

View File

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

View File

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

View File

@ -1,6 +1,10 @@
<!--峰煤监控系统--> <!--峰煤监控系统-->
<template> <template>
<new-bg> <new-bg>
<flex-col>
<system-title />
<div class="center-panel"> <div class="center-panel">
<Map type="middle" @pointClick="pointClick" /> <Map type="middle" @pointClick="pointClick" />
</div> </div>
@ -97,6 +101,7 @@
</BFC> </BFC>
</ModuleContent> </ModuleContent>
</flex-col> </flex-col>
</flex-col>
</new-bg> </new-bg>
</template> </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="car-washing-machine-name">西门洗车</div>
<div class="state-icon"> <div class="state-icon">
正常 正常
</div> </div>
</div> </div>

View File

@ -1,94 +1,142 @@
<template> <template>
<div class="paifang" style="height: 100vh;overflow: hidden"> <new-bg>
<a-page-header <flex-col>
:ghost="false" <system-title @click="changeTab" show-back custom-title="有组织排放" :btns="btns"/>
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>
</a-card> <ModuleContent padding="0px 20px 20px">
</a-col> <div style="height: 144px;width: 100%;">
<a-col :span="12" style="height: 100%;"> <ModuleContent2 bg bg-str :border="false">
<div style="height: 100%;position: relative"> <butgroup2 style="height: 100%;">
<Map></Map> <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>
</a-col>
<a-col :span="6" style="height: 100%;"> <div class="paifang" style="height: calc(100% - 144px);overflow: hidden">
<a-table :columns="columns" :data-source="data" /> <a-row style="height: 100%;margin-top: 16px;" :gutter="16">
</a-col> <a-col :span="3" style="height: 100%;">
</a-row> <web3-title>工序步骤</web3-title>
</div> <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="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="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> </template>
<script> <script>
import Map from "../../components/Map.vue"; 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 { export default {
name: "paifang", name: "paifang",
components: { components: {
Butgroup, CusButton,
Web3Title,
ModuleContent2, Miaoshu, Butgroup2,
ModuleContent,
FlexCol,
SystemTitle,
NewBg,
Map Map
}, },
data () { data() {
return { return {
btns: [
{ title: 'VOC', key: '1' },
{ title: 'CEMS', key: '2' },
],
count: {},
data: [], data: [],
gongxu: [],
columns: [ columns: [
{ title: '名词', key: 'name' }, {title: '名词', key: 'name'},
{ title: 'NO', key: 'NO' }, {title: 'NO', key: 'NO'},
{ title: 'SO2', key: 'SO2' }, {title: 'SO2', key: 'SO2'},
{ title: 'TSP', key: 'TSP' }, {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> </script>
<style scoped lang="less"> <style scoped lang="less">
.mt16 { .mt16 {
margin-top: 16px; 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> </style>

View File

@ -1,15 +1,11 @@
<template> <template>
<new-bg>
<flex-col>
<system-title show-back custom-title="有组织排放统计"/>
<ModuleContent padding="0px 20px 20px">
<div class="paifangtongji" style="height: 100vh;overflow: hidden"> <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-row :gutter="16">
<a-col :span="18"> <a-col :span="18">
@ -19,11 +15,20 @@
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
</ModuleContent>
</flex-col>
</new-bg>
</template> </template>
<script> <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 { export default {
name: "paifangtongji", name: "paifangtongji",
components: {ModuleContent, NewBg, SystemTitle, FlexCol},
data () { data () {
return { return {
data: [], data: [],

View File

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