Parcourir la source

init

newStyle
lancer il y a 2 ans
Parent
révision
8b3d00fbf1
6 fichiers modifiés avec 367 ajouts et 45 suppressions
  1. +8
    -0
      src/api/modules/api.js
  2. +50
    -43
      src/views/Equipment/equipmentDetailList.vue
  3. +283
    -0
      src/views/Equipment/record.vue
  4. +3
    -1
      src/views/Equipment/state.vue
  5. +7
    -1
      src/views/Statistics/TrendAnalysis.vue
  6. +16
    -0
      src/views/building/Count.vue

+ 8
- 0
src/api/modules/api.js Voir le fichier

@@ -668,3 +668,11 @@ export function wifiInsert(data) {
data
})
}
// 获取领用记录列表
export function equipReceiveFindByPage(query) {
return request({
url: '/autoSR/equipReceive/findByPage',
method:'get',
params:query
})
}

+ 50
- 43
src/views/Equipment/equipmentDetailList.vue Voir le fichier

@@ -61,6 +61,7 @@
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
>
</el-date-picker>
<div style="margin-left: 10px; margin-top: 8px">
@@ -85,6 +86,7 @@
placeholder="选择日期"
format="yyyy - MM - dd "
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
>
</el-date-picker>
</div>
@@ -631,6 +633,7 @@
</template>

<script>
import * as echarts from "echarts";
export default {
data() {
return {
@@ -658,6 +661,12 @@ export default {
imei: "",
total:10,
recording: "",
},
pickerOptions: {
disabledDate(time) {
//根据当前日期 --- 禁止选中之后的日期
return time.getTime() > Date.now();
},
},
details: {
equipmentQuantity: "",
@@ -724,7 +733,7 @@ export default {
};
},
mounted() {
return;
// return;
let theRequest=this.$route.query
// console.log(theRequest,'123') //此时的theRequest就是我们需要的参数;
if (theRequest.houseId) {
@@ -733,6 +742,7 @@ export default {
this.timeType = theRequest.timeType;
} else {
this.flag = false;
// console.log(1);
this.timeType = 4;
}
if (theRequest.startDate) {
@@ -749,19 +759,11 @@ export default {
// this.getTableList()
},
methods: {
//情空时间选择器
clearTime() {
// let str=''
if (this.selectTime1) {
this.$refs.time.valueOnOpen = "";
console.log(this.$refs.time);
}
},
radioChange() {
this.clearTime();
this.selectTime = "";
this.selectTime1 = "";
this.compareList = [];
this.$set(this, "time", null);
},
goinfo(row, idx) {
console.log(row, "信息");
@@ -775,7 +777,7 @@ export default {
// "&flag=" +
// idx;
this.$router.push({
url:'',
path:'/Equipment/equipmentOnlineRecordList',
query:{
houseId:this.houseId,
startDate: row.createTime,
@@ -943,19 +945,21 @@ export default {
},
//获取楼盘数据
getHouseList() {
axios({
url: `${jypath}/equipment/onlinerecord/findAllProperties`,
method: "get",
}).then((res) => {
this.$api.api
.findHouseByUser({
orgType: localStorage.getItem("orgType"),
})
.then((res) => {
// console.log(res.data.obj)
if (res.data.res == 1) {
this.houseList = res.data.obj;
this.houseList = res.data;
if (!this.flag) {
// console.log(this.flag.'12')
this.houseId = res.data.obj[0].id;
console.log(this.flag,'12')
this.houseId = res.data[0].id;
}
// console.log(this.flag,'12')
this.tabtimetap(this.timeType);
// return
this.getTableList();
// this.getdetail()
// res.data.obj.results.forEach((item,index)=>{
@@ -963,7 +967,7 @@ export default {
// })
// this.tableData=res.data.obj.results;
// this.page.total = res.data.obj.totalRecord;
}
});
},
handleSizeChange(val) {
@@ -990,24 +994,25 @@ export default {
getcompare() {
this.compareFlag = 0;
let obj = {
pageSize: this.pageSize,
pageNum: this.pageNum,
current: this.pageNum,
pageSize: this.pageNum,
startDate: this.page.openTime,
endDate: this.page.closeTime,
houseId: this.houseId,
timeType: this.timeType,
contrastStartDate: this.selectTime,
contrastEndDate: this.selectTime1,
orgType: localStorage.getItem("orgType"),
};
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
axios({
url: `${jypath}/zk/equipment/detail/usageTrendContrast`,
url: `autoSR/zk/equipment/detail/usageTrendContrast`,
method: "get",
params: obj,
})
.then((res) => {
// console.log(res)
this.total = res.data.obj.first.totalRecord;
this.total = res.data.first.totalRecord;
// 数据处理
let arr = [];
if (this.pageNum == 1) {
@@ -1015,22 +1020,22 @@ export default {
name: "项目合计",
first: this.details,
second: this.details1,
contrast: res.data.obj.total,
contrast: res.data.total,
// time:'',
// time1:''
};
arr.push(obj1);
}
res.data.obj.first.results.map((item, index) => {
res.data.first.records.map((item, index) => {
let obj = {};
//当他为0的时候
obj.name =
res.data.obj.first.results[index].createTime.substring(5, 10) +
res.data.first.records[index].createTime.substring(5, 10) +
"VS" +
res.data.obj.second.results[index].createTime.substring(5, 10);
obj.first = res.data.obj.first.results[index];
obj.second = res.data.obj.second.results[index];
obj.contrast = res.data.obj.contrast[index];
res.data.second.records[index].createTime.substring(5, 10);
obj.first = res.data.first.records[index];
obj.second = res.data.second.records[index];
obj.contrast = res.data.contrast[index];
// obj.time=''
// obj.time1=''
arr.push(obj);
@@ -1110,19 +1115,20 @@ export default {
timeType: this.timeType,
contrastStartDate: this.selectTime,
contrastEndDate: this.selectTime1,
orgType: localStorage.getItem("orgType"),
};
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
axios({
url: `${jypath}/zk/equipment/detail/usageTrend`,
url: `autoSR/zk/equipment/detail/usageTrend`,
method: "get",
params: obj,
}).then((res) => {
// console.log(res)
if (res.data.res == 1) {
this.details = res.data.obj.first;
if (res.data.obj.second) {
this.details1 = res.data.obj.second;
this.compare = res.data.obj.contrast;
if (res.code == 0) {
this.details = res.data.first;
if (res.data.second) {
this.details1 = res.data.second;
this.compare = res.data.contrast;
}
let itemobj = {
objopts: [
@@ -1217,26 +1223,27 @@ export default {
var url = "";
this.tableData = [];
let obj = {
pageNum: this.page.pageNum,
current: this.page.pageNum,
pageSize: this.page.pageSize,
startDate: this.page.openTime,
endDate: this.page.closeTime,
houseId: this.houseId,
timeType: this.timeType,
orgType: localStorage.getItem("orgType"),
};
obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType);
axios({
url: `${jypath}/zk/equipment/detail/equipmentCountDetail`,
url: `autoSR/zk/equipment/detail/equipmentCountDetail`,
method: "get",
params: obj,
}).then((res) => {
// console.log(res)
if (res.data.res == 1) {
res.data.obj.results.forEach((item, index) => {
if (res.code == 0) {
res.data.records.forEach((item, index) => {
item.index = index + 1;
});
this.tableData = res.data.obj.results;
this.page.total = res.data.obj.totalRecord;
this.tableData = res.data.records;
this.page.total = res.data.totalRecord;
}
});
},


+ 283
- 0
src/views/Equipment/record.vue Voir le fichier

@@ -0,0 +1,283 @@
<template>
<div class="box-center">
<!-- 头 -->
<div class="app-top">
<div class="app-titel" style="margin-top: 5px">
<div class="div-lab">
<el-input
v-model="changeValue"
clearable
placeholder="请输入"
@change="selectChange"
style="width: 363px"
>
<el-select
v-model="selflag"
slot="prepend"
class="input-with-select"
style="width: 115px"
placeholder="请选择"
@change="selChange"
>
<el-option label="设备编号" value="1"></el-option>
<el-option label="领用人" value="2"></el-option>
</el-select>
</el-input>
</div>

<div class="div-lab">
<div class="label">归还状态</div>
<el-select
class="div-inp"
multiple
clearable
collapse-tags
v-model="searchForm.receiveType"
placeholder="请选择"
>
<el-option
v-for="item in returnList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div style="margin-left: 20px">
<el-button style="background: #2671e2; color: #ffffff" @click="screen"
>筛选</el-button
>
</div>
<div style="margin-left: 20px">
<el-button @click="clascreen">清空筛选条件</el-button>
</div>
</div>
</div>

<!-- 表格 -->
<div class="cen-tab">
<el-table :data="tableData" stripe style="width: 100%">
<el-table-column prop="equipImei" label="设备编号" align="center">
</el-table-column>
<el-table-column prop="userName" label="领用人" align="center">
</el-table-column>
<el-table-column prop="phone" label="领用人手机" align="center">
</el-table-column>

<el-table-column
prop="receiveBeginTime"
label="领用时间"
align="center"
>
</el-table-column>
<el-table-column prop="receiveEndTime" label="归还时间" align="center">
</el-table-column>
<el-table-column prop="receiveType" label="归还状态" align="center">
<template slot-scope="{ row }">
{{
row.receiveType == 1
? "未领用"
: row.receiveType == 2
? "使用中"
: "已归还"
}}
</template>
</el-table-column>
<!-- <el-table-column prop="date" label="备注" align="center">
</el-table-column> -->
<!-- scope -->
</el-table>
<div style="display: flex; justify-content: flex-end; margin-top: 10px">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10, 20, 30, 40]"
:page-size="size"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</div>
</div>
</div>
</template>

<script>
export default {
data() {
return {
currentPage: 4,
value: "",
input: "",
tableData: [],
multipleSelection: [],
changeValue: "",
dialogVisible: false,
houseList: [],
ruleForm: {
correctWord: "",
wrongWord: "",
memo: "",
},
searchForm: {
equipImei: "",
userName: "",
receiveType: "",
},
returnList: [
{
value: "1",
label: "未领用",
},
{
value: "2",
label: "使用中",
},
{
value: "3",
label: "已归还",
},
],
currentPage: 1,
selflag: "1",
editFlag: false,
size: 10,
total: 10,
rules: {
correctWord: [
{ required: true, message: "请填写正确词", trigger: "change" },
],
wrongWord: [
{ required: true, message: "请填写错误词", trigger: "change" },
],
},
};
},
mounted() {
// 获取楼盘列表
this.equipReceiveFindByPage();
},
methods: {
selectChange(e) {
this.searchForm.equipImei = "";
this.searchForm.userName = "";
if (!e) retun;
if (this.selflag == 1) {
// 设备编号
this.searchForm.equipImei = e;
}
if (this.selflag == 2) {
// 领用人
this.searchForm.userName = e;
}
},
selChange() {
this.changeValue = "";
this.searchForm.equipImei = "";
this.searchForm.userName = "";
},
screen() {
this.currentPage = 1;
this.equipReceiveFindByPage();
},
clascreen() {
this.searchForm.equipImei = "";
this.searchForm.userName = "";
this.searchForm.receiveType = "";
this.equipReceiveFindByPage();
},
// 获取常错词列表
equipReceiveFindByPage() {
let obj = {
current: this.currentPage,
size: this.size,
...this.searchForm,
};
this.$api.api.equipReceiveFindByPage(obj).then((res) => {
console.log(res);
this.tableData = res.data.records;
this.total = res.data.total;
});
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.size = val;
this.equipReceiveFindByPage();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.currentPage = val;
this.equipReceiveFindByPage();
},
},
};
</script>

<style scoped="scoped" lang="scss" >
.box-center {
width: 100%;
padding: 15px;
min-width: 1200px;
padding-bottom: 100px;
}
.cen-tab {
width: 100%;
padding: 15px;
background: #ffffff;
margin-top: 15px;
}
.tophove {
color: #ffffff;
background: #2671e2;
}
.app-top {
width: 100%;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 4px;
padding-top: 15px;
padding-bottom: 15px;
.app-titel {
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
.label {
font-size: 14px;
font-weight: 400;
color: #32363d;
line-height: 32px;
margin-left: 15px;
min-width: 100px;
}
.toptimeqhuan {
height: 30px;
background: #ffffff;
display: flex;
align-items: center;
}
.toptimeqhuan div {
padding-left: 20px;
padding-right: 20px;
text-align: center;
line-height: 30px;
font-size: 14px;
margin-right: 15px;
border-radius: 4px;
border: 1px solid #e0e0e0;
}
}
}
.div-lab {
display: flex;
margin: 5px;
}
.div-inp {
width: 250px;
}
</style>

+ 3
- 1
src/views/Equipment/state.vue Voir le fichier

@@ -775,7 +775,7 @@ export default {
this.onLineCount = res.data.onLineCount;
this.offLineCount = res.data.offLineCount;
this.workingCount = res.data.workingCount;
this.total = res.data.total;
this.total = res.data.list.total;
});
},
//批量
@@ -1153,10 +1153,12 @@ export default {
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.size = val;
this.getTableList();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.currentPage = val;
this.getTableList();
},
},
};


+ 7
- 1
src/views/Statistics/TrendAnalysis.vue Voir le fichier

@@ -44,7 +44,7 @@
</el-date-picker>
</div>
<div style="margin-left: 26px">
<el-checkbox v-model="checked">对比时间段</el-checkbox>
<el-checkbox v-model="checked" @change="radioChange">对比时间段</el-checkbox>
</div>
<div style="margin-left: 26px">
<div v-if="checked">
@@ -343,6 +343,12 @@ export default {
this.selectTime = e;
this.selectTime1 = this.timestampToTime(new Date(e).getTime() + num);
}
},
radioChange() {
this.selectTime = "";
this.selectTime1 = "";
// this.compareList = [];
this.$set(this, "time", null);
},
confirmtime(e) {
this.timeType = "-1";


+ 16
- 0
src/views/building/Count.vue Voir le fichier

@@ -0,0 +1,16 @@
<template>
<div>
楼盘
</div>
</template>

<script>
export default {

}
</script>

<style lang="" scoped >


</style>

Chargement…
Annuler
Enregistrer