Commit c265c85a authored by ww-xxy's avatar ww-xxy

优化暂离报表

parent 0640c16f
<template> <template>
<!-- 窗口评价报表搜索 --> <!-- 窗口评价报表搜索 -->
<div class="search-form"> <div class="search-form">
<a-space direction="vertical" size="middle"> <a-space direction="vertical" size="middle">
<a-button block class="export-btn" icon="upload" @click="handleExport"> <a-button block class="export-btn" icon="upload" @click="handleExport">
导出 导出
</a-button> </a-button>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time" /> <a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time" />
<a-input <a-input
allowClear allowClear
placeholder="请输入工作人员姓名搜索" placeholder="请输入工作人员姓名搜索"
v-model="searchForm.workman_name" v-model="searchForm.workman_name"
/> />
<a-button block class="search-btn" icon="search" @click="handleSearch"> <a-button block class="search-btn" icon="search" @click="handleSearch">
搜索 搜索
</a-button> </a-button>
</a-space> </a-space>
</div> </div>
</template> </template>
<script>
import storage from "@/utils/js/Storage";
import { mapMutations } from "vuex";
import { getDatingList, getBumenList, getOptonList } from "@/api/dataAdmin";
import { debounce } from "lodash";
export default {
name: "staffLeft-search",
data() {
return {
siteId: storage.get(2, "siteId"),
datingList: [], // 大厅列表
deptList: [], // 部门列表
evaChoose: [], //评价选项
evaFrom: [], // 评价来源
evaDates: [], // 评价日期
optonList: [], // 评价选项列表
// 搜索数据
searchForm: {
workman_name: "",
type: "ckpj",
time: [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
], // 时间区间
},
};
},
created() {
this.getDatingListArr();
this.getBumenListArr();
this.getOptonList();
},
methods: {
...mapMutations("search", ["set_searForm", "set_isExport", "reset"]),
// 获取大厅列表
async getDatingListArr() {
let res = await getDatingList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.code == 1) {
let { data } = res.data;
this.datingList = data;
}
},
// // 获取部门列表
async getBumenListArr() {
let res = await getBumenList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.code == 1) {
let { data } = res.data;
this.deptList = data;
}
},
// 获取评价选项
async getOptonList() {
let res = await getOptonList();
if (res.code == 1) {
this.optonList = res.data;
}
},
// 搜索 <script>
handleSearch() { import storage from "@/utils/js/Storage";
let option_id = this.evaChoose.join(","); import { mapMutations } from "vuex";
let pjxt = this.evaFrom.join(","); import { getDatingList, getBumenList, getOptonList } from "@/api/dataAdmin";
this.searchForm.option_id = option_id; import { debounce } from "lodash";
this.searchForm.pjxt = pjxt; export default {
this.set_searForm(this.searchForm); name: "staffLeft-search",
data() {
return {
siteId: storage.get(2, "siteId"),
datingList: [], // 大厅列表
deptList: [], // 部门列表
evaChoose: [], //评价选项
evaFrom: [], // 评价来源
evaDates: [], // 评价日期
optonList: [], // 评价选项列表
// 搜索数据
searchForm: {
workman_name: "",
type: "ckpj",
time: [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
], // 时间区间
}, },
};
// 导出 },
handleExport: debounce( created() {
function () { this.getDatingListArr();
this.$bus.$emit("export"); this.getBumenListArr();
}, this.getOptonList();
2000, },
{ methods: {
leading: true, ...mapMutations("search", ["set_searForm", "set_isExport", "reset"]),
trailing: false, // 获取大厅列表
} async getDatingListArr() {
), let res = await getDatingList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.code == 1) {
let { data } = res.data;
this.datingList = data;
}
},
// // 获取部门列表
async getBumenListArr() {
let res = await getBumenList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.code == 1) {
let { data } = res.data;
this.deptList = data;
}
}, },
beforeDestroy() {
this.reset(); // 获取评价选项
async getOptonList() {
let res = await getOptonList();
if (res.code == 1) {
this.optonList = res.data;
}
}, },
};
</script> // 搜索
handleSearch() {
<style lang="less" scoped> let option_id = this.evaChoose.join(",");
</style> let pjxt = this.evaFrom.join(",");
this.searchForm.option_id = option_id;
\ No newline at end of file this.searchForm.pjxt = pjxt;
this.set_searForm(this.searchForm);
},
// 导出
handleExport: debounce(
function () {
this.$bus.$emit("export");
},
2000,
{
leading: true,
trailing: false,
}
),
},
beforeDestroy() {
this.reset();
},
};
</script>
<style lang="less" scoped>
</style>
<template> <template>
<!-- 窗口评价报表搜索 --> <!-- 窗口评价报表搜索 -->
<div class="search-form"> <div class="search-form">
<a-space direction="vertical" size="middle"> <a-space direction="vertical" size="middle">
<a-button block class="export-btn" icon="upload" @click="handleExport"> <a-button block class="export-btn" icon="upload" @click="handleExport">
导出 导出
</a-button> </a-button>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time" /> <a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time" />
<a-input <a-input
allowClear allowClear
placeholder="请输入窗口编号搜索" placeholder="请输入窗口编号搜索"
v-model="searchForm.window_num" v-model="searchForm.window_num"
/> />
<a-button block class="search-btn" icon="search" @click="handleSearch"> <a-button block class="search-btn" icon="search" @click="handleSearch">
搜索 搜索
</a-button> </a-button>
</a-space> </a-space>
</div> </div>
</template> </template>
<script>
import storage from "@/utils/js/Storage";
import { mapMutations } from "vuex";
import { getDatingList, getBumenList, getOptonList } from "@/api/dataAdmin";
import { debounce } from "lodash";
export default {
name: "windowLeft-search",
data() {
return {
siteId: storage.get(2, "siteId"),
datingList: [], // 大厅列表
deptList: [], // 部门列表
evaChoose: [], //评价选项
evaFrom: [], // 评价来源
evaDates: [], // 评价日期
optonList: [], // 评价选项列表
// 搜索数据
searchForm: {
window_num: "",
time: [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
], // 时间区间
},
};
},
created() {
this.getDatingListArr();
this.getBumenListArr();
this.getOptonList();
},
methods: {
...mapMutations("search", ["set_searForm", "set_isExport", "reset"]),
// 获取大厅列表
async getDatingListArr() {
let res = await getDatingList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.code == 1) {
let { data } = res.data;
this.datingList = data;
}
},
// // 获取部门列表
async getBumenListArr() {
let res = await getBumenList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.code == 1) {
let { data } = res.data;
this.deptList = data;
}
},
// 获取评价选项
async getOptonList() {
let res = await getOptonList();
if (res.code == 1) {
this.optonList = res.data;
}
},
// 搜索 <script>
handleSearch() { import storage from "@/utils/js/Storage";
this.set_searForm(this.searchForm); import { mapMutations } from "vuex";
import { getDatingList, getBumenList, getOptonList } from "@/api/dataAdmin";
import { debounce } from "lodash";
export default {
name: "windowLeft-search",
data() {
return {
siteId: storage.get(2, "siteId"),
datingList: [], // 大厅列表
deptList: [], // 部门列表
evaChoose: [], //评价选项
evaFrom: [], // 评价来源
evaDates: [], // 评价日期
optonList: [], // 评价选项列表
// 搜索数据
searchForm: {
window_num: "",
time: [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
], // 时间区间
}, },
};
// 导出 },
handleExport: debounce( created() {
function () { this.getDatingListArr();
this.$bus.$emit("export"); this.getBumenListArr();
}, this.getOptonList();
2000, },
{ methods: {
leading: true, ...mapMutations("search", ["set_searForm", "set_isExport", "reset"]),
trailing: false, // 获取大厅列表
} async getDatingListArr() {
), let res = await getDatingList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.code == 1) {
let { data } = res.data;
this.datingList = data;
}
},
// // 获取部门列表
async getBumenListArr() {
let res = await getBumenList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.code == 1) {
let { data } = res.data;
this.deptList = data;
}
}, },
beforeDestroy() {
this.reset(); // 获取评价选项
async getOptonList() {
let res = await getOptonList();
if (res.code == 1) {
this.optonList = res.data;
}
}, },
};
</script> // 搜索
handleSearch() {
<style lang="less" scoped> this.set_searForm(this.searchForm);
</style> },
\ No newline at end of file // 导出
handleExport: debounce(
function () {
this.$bus.$emit("export");
},
2000,
{
leading: true,
trailing: false,
}
),
},
beforeDestroy() {
this.reset();
},
};
</script>
<style lang="less" scoped>
</style>
...@@ -7,70 +7,69 @@ ...@@ -7,70 +7,69 @@
:visible="Visible" :visible="Visible"
@close="onClose" @close="onClose"
> >
<!-- 头部 --> <!-- 头部 -->
<div class="header"> <div class="header">
<div class="elapsed-time"> <div class="elapsed-time">
<p class="elapsed-time-title"> <p class="elapsed-time-title">
<span>累计次数</span> <span>累计次数</span>
</p> </p>
<p class="time"> <p class="time">{{ detailsInfo.total }}</p>
{{detailsInfo.total}}
</p>
</div>
<div class="elapsed-time">
<p class="elapsed-time-title">
<span>累计时长</span>
</p>
<p class="time">
<span>{{allTime}}</span>
</p>
</div>
<div class="elapsed-time">
<p class="elapsed-time-title">
<span>最近暂离时间</span>
</p>
<p class="time">
{{createTime}}
</p>
</div>
</div> </div>
<!-- 步骤条 --> <div class="elapsed-time">
<a-steps direction="vertical"> <p class="elapsed-time-title">
<a-step :title="(index+1)" v-for="(item,index) in detailsInfo.data" :key="item.stopid"> <span>累计时长</span>
<a-icon type="environment" slot="icon" /> </p>
<div slot="description" class="transact-step"> <p class="time">
<a-row :gutter="[0, 8]"> <span>{{ allTime }}</span>
<a-col :span="12"> </p>
<span>窗口编号:</span>{{ item.window_num || "--" }} </div>
</a-col> <div class="elapsed-time">
<a-col :span="12"> <p class="elapsed-time-title">
<span>工作人员:</span>{{ item.workman_name || "--" }} <span>最近暂离时间</span>
</a-col> </p>
</a-row> <p class="time">
<a-row :gutter="[0, 8]"> {{ createTime }}
<a-col :span="12"> </p>
<span>暂离时间:</span </div>
>{{ item.workman_name || "--" }} </div>
</a-col> <!-- 步骤条 -->
<a-col :span="12"> <a-steps direction="vertical">
<span>回归时间:</span <a-step
>{{ item.end_time || "--" }} :title="index + 1"
</a-col> v-for="(item, index) in detailsInfo.data"
</a-row> :key="item.stopid"
<a-row :gutter="[0, 8]"> >
<a-col :span="12"> <a-icon type="environment" slot="icon" />
<span>暂离时长:</span> <div slot="description" class="transact-step">
{{item.zl_time || "--"}} <a-row :gutter="[0, 8]">
</a-col> <a-col :span="12">
<a-col :span="12"> <span>窗口编号:</span>{{ item.window_num || "--" }}
<span>暂离原因:</span> </a-col>
{{ item.stoptitle || "--" }} <a-col :span="12">
</a-col> <span>工作人员:</span>{{ item.workman_name || "--" }}
</a-row> </a-col>
</div> </a-row>
</a-step> <a-row :gutter="[0, 8]">
</a-steps> <a-col :span="12">
<span>暂离时间:</span>{{ item.create_time || "--" }}
</a-col>
<a-col :span="12">
<span>回归时间:</span>{{ item.end_time || "--" }}
</a-col>
</a-row>
<a-row :gutter="[0, 8]">
<a-col :span="12">
<span>暂离时长:</span>
{{ item.zl_time + " 分钟" || "--" }}
</a-col>
<a-col :span="12">
<span>暂离原因:</span>
{{ item.stoptitle || "--" }}
</a-col>
</a-row>
</div>
</a-step>
</a-steps>
</a-drawer> </a-drawer>
</div> </div>
</template> </template>
...@@ -204,4 +203,4 @@ export default { ...@@ -204,4 +203,4 @@ export default {
color: #656565; color: #656565;
} }
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment