Browse Source

init

newStyle
lancer 2 years ago
parent
commit
c992031597
5 changed files with 1989 additions and 55 deletions
  1. +1353
    -0
      src/views/Equipment/equipmentDetailList.vue
  2. +515
    -0
      src/views/Equipment/equipmentOnlineRecordList.vue
  3. +8
    -8
      src/views/ReceivingRecords/index.vue
  4. +39
    -25
      src/views/Statistics/TrendAnalysis.vue
  5. +74
    -22
      src/views/Template/wrongword.vue

+ 1353
- 0
src/views/Equipment/equipmentDetailList.vue
File diff suppressed because it is too large
View File


+ 515
- 0
src/views/Equipment/equipmentOnlineRecordList.vue View File

@@ -0,0 +1,515 @@
<template>
<div>
<div class="toptab">
<div
@click="tapclickyab(0)"
:class="{ activecllasscet: activeTotal == 0 }"
:style="{ background: activeTotal == 0 ? '#2671E2' : '#ffffff' }"
>
设备在线记录
</div>
<div
@click="tapclickyab(1)"
:class="{ activecllasscet: activeTotal == 1 }"
:style="{ background: activeTotal == 1 ? '#2671E2' : '#ffffff' }"
>
设备指派记录
</div>
</div>
<div class="titlebox" v-if="activeTotal == 0">
<div
style="
background: #ffffff;
padding-left: 18px;
display: flex;
padding-top: 18px;
"
>
<span style="line-height: 40px" class="demonstration">在线时间:</span>
<el-date-picker
@change="confirmtime()"
v-model="customtime"
type="daterange"
range-separator="-"
:default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
<span class="demonstration" style="margin-left: 18px; line-height: 40px"
>楼盘名称:</span
>
<div style="width: 200px">
<!-- <el-input v-model="page.houseName"></el-input>-->
<el-select v-model="page.houseName" placeholder="请选择">
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.propertyName"
:value="item.id"
>
</el-option>
</el-select>
</div>
</div>
<div
style="
background: #ffffff;
padding-left: 18px;
display: flex;
padding-top: 18px;
"
>
<span style="line-height: 40px" class="demonstration">领用人:</span>
<div style="width: 200px">
<el-input v-model="page.accountName"></el-input>
</div>
<span class="demonstration" style="margin-left: 18px; line-height: 40px"
>设备编号:</span
>
<div style="width: 200px">
<el-input v-model="page.imei"></el-input>
</div>
</div>
<div
style="
background: #ffffff;
padding-left: 18px;
display: flex;
padding-top: 18px;
"
>
<div style="margin-left: 20px">
<el-button
@click="screening()"
style="background: #2671e2; color: #ffffff"
>筛选</el-button
>
</div>
<div style="margin-left: 20px">
<el-button @click="empty()">清空筛选条件</el-button>
</div>
</div>
</div>
<div class="tablebox" v-if="activeTotal == 0">
<template>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="index" label="序号" width="100" align="center">
</el-table-column>
<el-table-column prop="imei" label="设备编号" align="center">
</el-table-column>
<el-table-column prop="accountName" label="领用人" align="center">
</el-table-column>
<el-table-column prop="openTime" label="在线时间" align="center">
</el-table-column>
<el-table-column prop="closeTime" label="离线时间" align="center">
</el-table-column>
<el-table-column prop="offStatusName" label="离线原因" align="center">
</el-table-column>
</el-table>
</template>
<div style="display: flex; justify-content: flex-end; margin-top: 10px">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage4"
:page-sizes="[6, 10, 14, 20]"
:page-size="6"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total"
>
</el-pagination>
</div>
</div>

<div class="titlebox" v-if="activeTotal == 1">
<div
style="
background: #ffffff;
padding-left: 18px;
display: flex;
padding-top: 18px;
"
>
<span style="line-height: 40px" class="demonstration">指派时间:</span>
<el-date-picker
@change="confirmtime()"
v-model="customtime"
type="daterange"
range-separator="-"
:default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
<span class="demonstration" style="margin-left: 18px; line-height: 40px"
>楼盘名称:</span
>
<div style="width: 200px">
<!-- <el-input v-model="page.houseName"></el-input>-->
<el-select v-model="page.houseName" placeholder="请选择">
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.propertyName"
:value="item.id"
>
</el-option>
</el-select>
</div>
</div>
<div
style="
background: #ffffff;
padding-left: 18px;
display: flex;
padding-top: 18px;
"
>
<span style="line-height: 40px" class="demonstration">领用人:</span>
<div style="width: 200px">
<el-input v-model="page.accountName"></el-input>
</div>
<span class="demonstration" style="margin-left: 18px; line-height: 40px"
>设备编号:</span
>
<div style="width: 200px">
<el-input v-model="page.imei"></el-input>
</div>
<span class="demonstration" style="margin-left: 18px; line-height: 40px"
>录音结果:</span
>
<div style="width: 200px">
<el-select v-model="page.recording" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
</div>
<div
style="
background: #ffffff;
padding-left: 18px;
display: flex;
padding-top: 18px;
"
>
<div style="margin-left: 20px">
<el-button
@click="screening()"
style="background: #2671e2; color: #ffffff"
>筛选</el-button
>
</div>
<div style="margin-left: 20px">
<el-button @click="empty()">清空筛选条件</el-button>
</div>
</div>
</div>
<div class="tablebox" v-if="activeTotal == 1">
<template>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="index" label="序号" width="100" align="center">
</el-table-column>
<el-table-column prop="imei" label="设备编号" align="center">
</el-table-column>
<el-table-column prop="agentName" label="领用人" align="center">
</el-table-column>
<!-- <el-table-column-->
<!-- prop="id"-->
<!-- label="接待记录ID"-->
<!-- align="center">-->
<!-- </el-table-column>-->

<el-table-column prop="staTime" label="指派时间" align="center">
</el-table-column>
<el-table-column prop="endTime" label="结束时间" align="center">
<template slot-scope="scope">
{{ scope.row.endTime.substring(0, 19) }}
</template>
</el-table-column>
<el-table-column prop="recordingName" label="录音结果" align="center">
</el-table-column>
<el-table-column
prop="recordingReasonName"
label="未完整录音原因"
align="center"
>
</el-table-column>
<el-table-column prop="" label="操作" align="center">
<template slot-scope="{ row }">
<el-button
v-if="row.recording != 0"
@click.native.prevent="goinfo(row)"
type="text"
size="small"
>接待详情</el-button
>
</template>
</el-table-column>
</el-table>
</template>
<div style="display: flex; justify-content: flex-end; margin-top: 10px">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage4"
:page-sizes="[6, 10, 14, 20]"
:page-size="6"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total"
>
</el-pagination>
</div>
</div>
</div>
</template>

<script>
export default {
data() {
return {
activeTotal: 0,
customtime: "",
tableData: [],
currentPage4: 1,
houseList: [],
flag: false,
page: {
pageNum: 1,
pageSize: 6,
openTime: "",
closeTime: "",
houseName: "",
accountName: "",
imei: "",
total:10,
recording: "",
},
options: [
{
value: "0",
label: "无录音",
},
{
value: "1",
label: "部分录音",
},
{
value: "2",
label: "完整录音",
},
],
};
},
mounted() {
return
let theRequest=this.$route.query
console.log(theRequest, "123"); //此时的theRequest就是我们需要的参数;
if (theRequest.houseId) {
this.activeTotal = theRequest.flag;
this.flag = true;
this.page.openTime = theRequest.startDate;
this.page.closeTime = theRequest.endDate;
this.customtime = [theRequest.startDate, theRequest.endDate];
this.page.houseName = theRequest.houseId;
} else {
let num = 24 * 3600 * 1000 * 6;
let time1 = this.timestampToTime(new Date().getTime() - num);
console.log(this.timestampToTime(new Date().getTime()), time1);
this.page.openTime = time1.trim();
this.page.closeTime = this.timestampToTime(new Date().getTime()).trim();
this.customtime = [this.page.openTime, this.page.closeTime];
}

// this.activeTotal=0;
// this.customtime=[] ;
this.tableData = [];
this.tableData1 = [];
this.getHouseList();
},
methods: {
timestampToTime(timestamp) {
var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
// var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000

var yyyy = date.getFullYear() + "-";

var MM =
(date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) + "-";

// var dd = date.getDate() + ' ';
var dd =
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";

// var HH = date.getHours() + ':';
// var HH = (date.getHours() < 10 ? '0'+(date.getHours()) : date.getHours()) + ':';
//
// // var mm = date.getMinutes() + ':';
// var mm = (date.getMinutes() < 10 ? '0'+(date.getMinutes()) : date.getMinutes()) + ':';
//
// // var ss = date.getSeconds();
// var ss = (date.getSeconds() < 10 ? '0'+(date.getSeconds()) : date.getSeconds());

// return yyyy+MM+dd+HH+mm+ss;
return yyyy + MM + dd;
},
//时间补0
Zeropadding(s) {
return s < 10 ? "0" + s : s;
},
tapclickyab(i) {
this.activeTotal = i;
this.getTableList();
},
screening() {
this.page.pageNum = 1;
this.page.pageSize = 6;
this.getTableList();
},
goinfo(row) {
console.log(row);
location.href = "${jypath}/zk/file/receptionDetails";
localStorage.setItem("AudioListId", row.id);
localStorage.setItem("AudioIdx", 0);
},
empty() {
this.page = {
pageNum: 1,
pageSize: 6,
openTime: "",
closeTime: "",
houseName: this.houseList[0].id,
accountName: "",
imei: "",
total: "",
};
this.customtime = "";
this.getTableList();
},
//时间选择
confirmtime() {
console.log(this.customtime);
// const d = new Date(this.customtime[0])
// this.page.openTime = d.getFullYear() + '-' + this.Zeropadding((d.getMonth() + 1)) + '-' + this.Zeropadding(d.getDate())
// const c = new Date(this.customtime[1])
// this.page.closeTime = c.getFullYear() + '-' + this.Zeropadding((c.getMonth() + 1)) + '-' + this.Zeropadding(c.getDate())
this.page.openTime = this.customtime[0];
this.page.closeTime = this.customtime[1];
},
handleSizeChange(val) {
console.log("每页条" + val);
this.page.pageSize = val;
this.getTableList();
},
handleCurrentChange(val) {
console.log("当前页" + val);
this.page.pageNum = val;
this.getTableList();
},
//获取楼盘数据
getHouseList() {
axios({
url: `${jypath}/equipment/onlinerecord/findAllProperties`,
method: "get",
}).then((res) => {
// console.log(res.data.obj)
if (res.data.res == 1) {
this.houseList = res.data.obj;
if (!this.flag) {
this.page.houseName = res.data.obj[0].id;
}
this.getTableList();
// res.data.obj.results.forEach((item,index)=>{
// item.index=index+1
// })
// this.tableData=res.data.obj.results;
// this.page.total = res.data.obj.totalRecord;
}
});
},
//获取table数据、
getTableList() {
console.log(this.activeTotal, "888888888888888888888");
var url = "";
let obj = {
pageNum: this.page.pageNum,
pageSize: this.page.pageSize,
imei: this.page.imei,
};
this.tableData = [];
if (this.activeTotal == 0) {
url = `${jypath}/equipment/onlinerecord/findByPage`;
obj.openTime = this.page.openTime;
obj.closeTime = this.page.closeTime;
obj.houseId = this.page.houseName;
obj.accountName = this.page.accountName;
} else {
url = `${jypath}/equipment/onlinerecord/assignmentRecord`;
obj.staDate = this.page.openTime;
obj.endDate = this.page.closeTime;
obj.projectId = this.page.houseName;
obj.agentName = this.page.accountName;
obj.recording = this.page.recording;
}
axios({
url: url,
method: "post",
data: obj,
}).then((res) => {
// console.log(res)
if (res.data.res == 1) {
if (!res.data.obj.results) return;
res.data.obj.results.forEach((item, index) => {
item.index = index + 1;
});
this.tableData = res.data.obj.results;
this.page.total = res.data.obj.totalRecord;
}
});
},
},
};
</script>

<style scoped >
.toptab {
width: 100%;
display: flex;
}
.toptab div {
padding-left: 30px;
padding-right: 30px;
padding-top: 10px;
padding-bottom: 10px;
font-size: 14px;
}
.activecllasscet {
color: #ffffff;
}
.titlebox {
width: 100%;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 8px;
margin-top: 20px;
padding-bottom: 18px;
}
.tablebox {
width: 100%;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 8px;
margin-top: 20px;
padding: 18px;
}
</style>

+ 8
- 8
src/views/ReceivingRecords/index.vue View File

@@ -159,14 +159,14 @@
<!-- 表格 -->
<div class="cen-tab">
<el-table :data="tableData" stripe height="400" style="width: 100%">
<el-table-column prop="date" label="接待开始时间" align="center">
<el-table-column prop="staTime" label="接待开始时间" align="center">
</el-table-column>
<el-table-column prop="name" label="顾问" align="center">
<el-table-column prop="agentName" label="顾问" align="center">
</el-table-column>
<el-table-column prop="address" label="客户" align="center">
<el-table-column prop="name" label="客户" align="center">
</el-table-column>

<el-table-column prop="date" label="录音时长" align="center">
<el-table-column prop="mm" label="录音时长" align="center">
</el-table-column>
<el-table-column prop="name" label="录音类型" align="center">
</el-table-column>
@@ -181,10 +181,10 @@
</el-table-column>
<!-- scope -->
<el-table-column label="操作" align="center">
<template slot-scope="">
<div style="color: #2671e2">查看</div>
<div style="color: #2671e2">下载文本</div>
<div style="color: #2671e2">下载录音</div>
<template slot-scope="{row}">
<el-button type="text">查看</el-button>
<el-button type="text">下载文本</el-button>
<el-button type="text">下载录音</el-button>
</template>
</el-table-column>
</el-table>


+ 39
- 25
src/views/Statistics/TrendAnalysis.vue View File

@@ -31,12 +31,15 @@
</div>
<div style="margin-left: 26px">
<el-date-picker
@change="confirmtime()"
@change="confirmtime"
v-model="customtime"
type="daterange"
range-separator="-"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
>
</el-date-picker>
</div>
@@ -60,6 +63,7 @@
placeholder="选择日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
>
</el-date-picker>
</div>
@@ -182,9 +186,8 @@ import * as echarts from "echarts";
export default {
data() {
return {
customtime: "",
timeType: 4,
time: '',
time: "",
customtime: [],
page: {
pageNum: 1,
@@ -197,6 +200,12 @@ export default {
total: "",
recording: "",
},
pickerOptions: {
disabledDate(time) {
//根据当前日期 --- 禁止选中之后的日期
return time.getTime() > Date.now();
},
},
selectTime1: "",
selectTime: "",
aliasclass: 1,
@@ -284,9 +293,7 @@ export default {
this.timestampToTime(new Date().getTime() - num),
this.timestampToTime(new Date().getTime()),
];
console.log(this.customtime);
// this.$refs.time.valueIsEmpty=true
console.log(this.$refs.time);
this.$set(this, "time", null);
// this.getTableList();
// this.getdetail();
},
@@ -337,7 +344,7 @@ export default {
this.selectTime1 = this.timestampToTime(new Date(e).getTime() + num);
}
},
confirmtime() {
confirmtime(e) {
this.timeType = "-1";
// if(this.customtime==''){ }else{
// const d = new Date(this.customtime[0])
@@ -348,34 +355,41 @@ export default {
this.checked = false;
this.selectTime = "";
this.selectTime1 = "";
this.$set(this, "time", null);
console.log(e);
if (!e) return;
this.page.openTime = this.customtime[0];
this.page.closeTime = this.customtime[1];
// this.getTableList()
// this.getdetail()
},
timestampToTime(timestamp) {
var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
// var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
timestampToTime(timestamp) {
var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
// var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000

var yyyy = date.getFullYear() + '-';
var yyyy = date.getFullYear() + "-";

var MM = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
var MM =
(date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) + "-";

// var dd = date.getDate() + ' ';
var dd = (date.getDate() < 10 ? '0'+(date.getDate()) : date.getDate()) + ' ';
// var dd = date.getDate() + ' ';
var dd =
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";

// var HH = date.getHours() + ':';
// var HH = (date.getHours() < 10 ? '0'+(date.getHours()) : date.getHours()) + ':';
//
// // var mm = date.getMinutes() + ':';
// var mm = (date.getMinutes() < 10 ? '0'+(date.getMinutes()) : date.getMinutes()) + ':';
//
// // var ss = date.getSeconds();
// var ss = (date.getSeconds() < 10 ? '0'+(date.getSeconds()) : date.getSeconds());
// var HH = date.getHours() + ':';
// var HH = (date.getHours() < 10 ? '0'+(date.getHours()) : date.getHours()) + ':';
//
// // var mm = date.getMinutes() + ':';
// var mm = (date.getMinutes() < 10 ? '0'+(date.getMinutes()) : date.getMinutes()) + ':';
//
// // var ss = date.getSeconds();
// var ss = (date.getSeconds() < 10 ? '0'+(date.getSeconds()) : date.getSeconds());

// return yyyy+MM+dd+HH+mm+ss;
return yyyy+MM+dd;
},
// return yyyy+MM+dd+HH+mm+ss;
return yyyy + MM + dd;
},
SwitchCARDS() {
var chartDom = document.getElementById("main");
var myChart = echarts.init(chartDom);


+ 74
- 22
src/views/Template/wrongword.vue View File

@@ -21,7 +21,7 @@
</div>
<div style="margin-left: 20px">
<el-button
@click="editorinfo()"
@click="addinfo()"
style="background: #2671e2; color: #ffffff"
>新增</el-button
>
@@ -34,20 +34,20 @@
<el-table :data="tableData" stripe height="400" style="width: 100%">
<el-table-column prop="date" label="公司" align="center">
</el-table-column>
<el-table-column prop="name" label="正确词" align="center">
<el-table-column prop="correctWord" label="正确词" align="center">
</el-table-column>
<el-table-column prop="address" label="错误词" align="center">
<el-table-column prop="wrongWord" label="错误词" align="center">
</el-table-column>

<el-table-column prop="date" label="创建时间" align="center">
<el-table-column prop="createTime" label="创建时间" align="center">
</el-table-column>

<el-table-column prop="date" label="备注" align="center">
</el-table-column>
<!-- <el-table-column prop="date" label="备注" align="center">
</el-table-column> -->
<!-- scope -->
<el-table-column label="操作" align="center">
<template slot-scope="">
<div style="color: #2671e2">修改</div>
<el-button type="text" @click="edit(row)">修改</el-button>
</template>
</el-table-column>
</el-table>
@@ -65,27 +65,31 @@
</div>
</div>

<el-dialog title="绑定" :visible.sync="dialogVisible">
<el-dialog
:title="editFlag ? '修改常错词' : '新增常错词'"
:visible.sync="dialogVisible"
>
<el-form
:model="ruleForm"
:rules="rules"
label-position="labelPosition"
ref="ruleForm"
label-width="140px"
style="width: 60%; margin: 0 auto"
>
<el-form-item label="正确词" prop="areaName">
<el-input v-model="ruleForm.areaName"></el-input>
<el-form-item label="正确词" prop="correctWord">
<el-input v-model="ruleForm.correctWord"></el-input>
</el-form-item>
<el-form-item label="错误词" prop="areaName">
<el-input v-model="ruleForm.areaName"></el-input>
<el-form-item label="错误词" prop="wrongWord">
<el-input v-model="ruleForm.wrongWord"></el-input>
</el-form-item>
<el-form-item label="描述:" prop="areaName">
<el-input type="textarea" v-model="ruleForm.areaName"></el-input>
<el-form-item label="描述:" prop="desc">
<el-input type="textarea" v-model="ruleForm.desc"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="editor()">保存</el-button>
<el-button type="primary" @click="addSure()">保存</el-button>
</div>
</el-dialog>
</div>
@@ -102,21 +106,68 @@ export default {
multipleSelection: [],
dialogVisible: false,
ruleForm: {
areaName: "",
provinceItem: [],
correctWord: "",
wrongWord: "",
desc: "",
},
searchForm:{},
searchForm: {},
currentPage: 1,
editFlag: false,
size: "",
total: 10,

rules: {
correctWord: [
{ required: true, message: "请填写正确词", trigger: "change" },
],
wrongWord: [
{ required: true, message: "请填写错误词", trigger: "change" },
],
},
};
},
mounted() {
// 列表获取
this.correctFindbypage()
this.correctFindbypage();
},
methods: {
edit(row) {
this.ruleForm = Object.assign({}, row);
this.editFlag = true;
this.dialogVisible = true;
},
addSure() {
// console.log(this.addressOptions)
this.$refs.ruleForm.validate((valid) => {
if (valid) {
console.log(this.ruleForm);
// 编辑
return
if (this.editFlag) {
console.log("编辑");
this.$api.api.editZkhouse(this.ruleForm).then((res) => {
console.log(res);
if (res.code == 0) {
this.dialogVisible = false;
this.$message.success("编辑成功");
this.zkhousePage();
}
});
} else {
// 添加
console.log("添加");
return
this.$api.api.addZkhouse(this.ruleForm).then((res) => {
console.log(res);
if (res.code == 0) {
this.dialogVisible = false;
this.$message.success("新增常错词成功");
this.zkhousePage();
}
});
}
}
});
},
// 获取常错词列表
correctFindbypage() {
let obj = {
@@ -126,11 +177,12 @@ export default {
};
this.$api.api.correctFindbypage(obj).then((res) => {
console.log(res);
this.tableData = res.data.records;
this.tableData = res.data.records;
this.total = res.data.total;
});
},
editorinfo() {
addinfo() {
this.editFlag = false;
this.dialogVisible = true;
},
editor() {


Loading…
Cancel
Save