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

优化暂离报表

parent 0640c16f
<template>
<!-- 窗口评价报表搜索 -->
<div class="search-form">
<a-space direction="vertical" size="middle">
<a-button block class="export-btn" icon="upload" @click="handleExport">
导出
</a-button>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time" />
<a-input
allowClear
placeholder="请输入工作人员姓名搜索"
v-model="searchForm.workman_name"
/>
<a-button block class="search-btn" icon="search" @click="handleSearch">
搜索
</a-button>
</a-space>
</div>
</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;
}
},
<!-- 窗口评价报表搜索 -->
<div class="search-form">
<a-space direction="vertical" size="middle">
<a-button block class="export-btn" icon="upload" @click="handleExport">
导出
</a-button>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time" />
<a-input
allowClear
placeholder="请输入工作人员姓名搜索"
v-model="searchForm.workman_name"
/>
<a-button block class="search-btn" icon="search" @click="handleSearch">
搜索
</a-button>
</a-space>
</div>
</template>
// 搜索
handleSearch() {
let option_id = this.evaChoose.join(",");
let pjxt = this.evaFrom.join(",");
this.searchForm.option_id = option_id;
this.searchForm.pjxt = pjxt;
this.set_searForm(this.searchForm);
<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"),
], // 时间区间
},
// 导出
handleExport: debounce(
function () {
this.$bus.$emit("export");
},
2000,
{
leading: true,
trailing: false,
}
),
};
},
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;
}
},
beforeDestroy() {
this.reset();
// 获取评价选项
async getOptonList() {
let res = await getOptonList();
if (res.code == 1) {
this.optonList = res.data;
}
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
// 搜索
handleSearch() {
let option_id = this.evaChoose.join(",");
let pjxt = this.evaFrom.join(",");
this.searchForm.option_id = option_id;
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>
<!-- 窗口评价报表搜索 -->
<div class="search-form">
<a-space direction="vertical" size="middle">
<a-button block class="export-btn" icon="upload" @click="handleExport">
导出
</a-button>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time" />
<a-input
allowClear
placeholder="请输入窗口编号搜索"
v-model="searchForm.window_num"
/>
<a-button block class="search-btn" icon="search" @click="handleSearch">
搜索
</a-button>
</a-space>
</div>
</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;
}
},
<!-- 窗口评价报表搜索 -->
<div class="search-form">
<a-space direction="vertical" size="middle">
<a-button block class="export-btn" icon="upload" @click="handleExport">
导出
</a-button>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time" />
<a-input
allowClear
placeholder="请输入窗口编号搜索"
v-model="searchForm.window_num"
/>
<a-button block class="search-btn" icon="search" @click="handleSearch">
搜索
</a-button>
</a-space>
</div>
</template>
// 搜索
handleSearch() {
this.set_searForm(this.searchForm);
<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"),
], // 时间区间
},
// 导出
handleExport: debounce(
function () {
this.$bus.$emit("export");
},
2000,
{
leading: true,
trailing: false,
}
),
};
},
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;
}
},
beforeDestroy() {
this.reset();
// 获取评价选项
async getOptonList() {
let res = await getOptonList();
if (res.code == 1) {
this.optonList = res.data;
}
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
// 搜索
handleSearch() {
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>
......@@ -7,70 +7,69 @@
:visible="Visible"
@close="onClose"
>
<!-- 头部 -->
<div class="header">
<div class="elapsed-time">
<p class="elapsed-time-title">
<span>累计次数</span>
</p>
<p class="time">
{{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 class="header">
<div class="elapsed-time">
<p class="elapsed-time-title">
<span>累计次数</span>
</p>
<p class="time">{{ detailsInfo.total }}</p>
</div>
<!-- 步骤条 -->
<a-steps direction="vertical">
<a-step :title="(index+1)" v-for="(item,index) in detailsInfo.data" :key="item.stopid">
<a-icon type="environment" slot="icon" />
<div slot="description" class="transact-step">
<a-row :gutter="[0, 8]">
<a-col :span="12">
<span>窗口编号:</span>{{ item.window_num || "--" }}
</a-col>
<a-col :span="12">
<span>工作人员:</span>{{ item.workman_name || "--" }}
</a-col>
</a-row>
<a-row :gutter="[0, 8]">
<a-col :span="12">
<span>暂离时间:</span
>{{ item.workman_name || "--" }}
</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>
<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>
<!-- 步骤条 -->
<a-steps direction="vertical">
<a-step
:title="index + 1"
v-for="(item, index) in detailsInfo.data"
:key="item.stopid"
>
<a-icon type="environment" slot="icon" />
<div slot="description" class="transact-step">
<a-row :gutter="[0, 8]">
<a-col :span="12">
<span>窗口编号:</span>{{ item.window_num || "--" }}
</a-col>
<a-col :span="12">
<span>工作人员:</span>{{ item.workman_name || "--" }}
</a-col>
</a-row>
<a-row :gutter="[0, 8]">
<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>
</div>
</template>
......@@ -204,4 +203,4 @@ export default {
color: #656565;
}
}
</style>
\ No newline at end of file
</style>
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