123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749 |
- <template>
- <div class="heat-lay">
- <div class="heat-lay-flex">
- <div class="heat-lay-item" style="width: 190%">
- <div class="heat-item-style1">
- <div class="heat-item-style1-title">今日新增安装单</div>
- <div class="duplicatelay">
- <div
- id="lingshou1"
- style="cursor: pointer"
- @click="
- openPopUp($event, 'lingshou1', '今日新增安装单-零售(台/单)')
- "
- >
- <div class="heat-item-style1-num1-2">零售</div>
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c1">
- {{ info.machineTotalR || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 台 </span>
- </div>
- <div class="heat-item-style1-num2">
- <span class="heat-item-style1-num2-1 c2">
- {{ info.orderTotalR || 0 }}
- </span>
- <span class="heat-item-style1-num2-2">单</span>
- </div>
- </div>
- <div
- id="gongcheng1"
- style="cursor: pointer"
- @click="
- openPopUp($event, 'gongcheng1', '今日新增安装单-工程(台/单)')
- "
- >
- <div class="heat-item-style1-num1-2">工程</div>
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c1">
- {{ info.machineTotalP || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 台 </span>
- </div>
- <div class="heat-item-style1-num2">
- <span class="heat-item-style1-num2-1 c2">
- {{ info.orderTotalP || 0 }}
- </span>
- <span class="heat-item-style1-num2-2">单</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="averticalBart"></div>
- <div class="heat-lay-item" style="width: 190%">
- <div class="heat-item-style1">
- <div class="heat-item-style1-title">今日完工安装单</div>
- <div class="duplicatelay">
- <div
- id="lingshou2"
- style="cursor: pointer"
- @click="
- openPopUp($event, 'lingshou2', '今日完工安装单-零售(台/单)')
- "
- >
- <div class="heat-item-style1-num1-2">零售</div>
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c1">
- {{ info.machineCompleteR || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 台 </span>
- </div>
- <div class="heat-item-style1-num2">
- <span class="heat-item-style1-num2-1 c2">
- {{ info.orderCompleteR || 0 }}
- </span>
- <span class="heat-item-style1-num2-2">单</span>
- </div>
- </div>
- <div
- id="gongcheng2"
- style="cursor: pointer"
- @click="
- openPopUp($event, 'gongcheng2', '今日完工安装单-工程(台/单)')
- "
- >
- <div class="heat-item-style1-num1-2">工程</div>
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c1">
- {{ info.machineCompleteP || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 台 </span>
- </div>
- <div class="heat-item-style1-num2">
- <span class="heat-item-style1-num2-1 c2">
- {{ info.orderCompleteP || 0 }}
- </span>
- <span class="heat-item-style1-num2-2">单</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="averticalBart"></div>
- <div class="heat-lay-item" style="width: 190%">
- <div class="heat-item-style1">
- <div class="heat-item-style1-title">安装未完工累计</div>
- <div class="duplicatelay">
- <div
- id="lingshou3"
- style="cursor: pointer"
- @click="
- openPopUp($event, 'lingshou3', '安装未完工累计-零售(台/单)')
- "
- >
- <div class="heat-item-style1-num1-2">零售</div>
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c4">
- {{ info.machineOpenR || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 台 </span>
- </div>
- <div class="heat-item-style1-num2">
- <span class="heat-item-style1-num2-1 c3">
- {{ info.orderOpenR || 0 }}
- </span>
- <span class="heat-item-style1-num2-2">单</span>
- </div>
- </div>
- <div
- id="gongcheng3"
- style="cursor: pointer"
- @click="
- openPopUp($event, 'gongcheng3', '安装未完工累计-工程(台/单)')
- "
- >
- <div class="heat-item-style1-num1-2">工程</div>
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c4">
- {{ info.machineOpenP || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 台 </span>
- </div>
- <div class="heat-item-style1-num2">
- <span class="heat-item-style1-num2-1 c3">
- {{ info.orderOpenP || 0 }}
- </span>
- <span class="heat-item-style1-num2-2">单</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="averticalBart"></div>
- <div class="heat-lay-item">
- <div
- id="jinrshifucq"
- class="heat-item-style1"
- style="cursor: pointer"
- @click="openPopUp($event, 'jinrshifucq', '今日出勤师傅')"
- >
- <div class="heat-item-style1-title">今日出勤师傅</div>
- <br />
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c2">
- {{ info.cqry || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 人 </span>
- </div>
- </div>
- </div>
- <div class="averticalBart"></div>
- <div class="heat-lay-item" style="cursor: pointer" @click="jinrhaop(0)">
- <div class="heat-item-style1">
- <div class="heat-item-style1-title">今日差评数</div>
- <br />
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c4">
- {{ info.badNum || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 单 </span>
- </div>
- </div>
- </div>
- </div>
- <div class="horizontalLine"></div>
- <div class="heat-lay-flex">
- <div class="heat-lay-item" style="width: 190%">
- <div class="heat-item-style1">
- <div class="heat-item-style1-title">今日新增维修单</div>
- <div class="duplicatelay">
- <div
- id="weixiu1"
- style="cursor: pointer"
- @click="openPopUp($event, 'weixiu1', '今日新增维修单-维修(单)')"
- >
- <div class="heat-item-style1-num1-2">维修</div>
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c1">
- {{ info.newwx || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 单 </span>
- </div>
- </div>
- <div
- id="qingxi1"
- style="cursor: pointer"
- @click="openPopUp($event, 'qingxi1', '今日新增清洗单-清洗(单)')"
- >
- <div class="heat-item-style1-num1-2">清洗</div>
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c1">
- {{ info.newqx || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 单 </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="averticalBarb"></div>
- <div class="heat-lay-item" style="width: 190%">
- <div class="heat-item-style1">
- <div class="heat-item-style1-title">今日完工维修单</div>
- <div class="duplicatelay">
- <div
- id="weixiu2"
- style="cursor: pointer"
- @click="openPopUp($event, 'weixiu2', '今日完工维修单-维修(单)')"
- >
- <div class="heat-item-style1-num1-2">维修</div>
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c1">
- {{ info.completewx || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 单 </span>
- </div>
- </div>
- <div
- id="qingxi2"
- style="cursor: pointer"
- @click="openPopUp($event, 'qingxi2', '今日完工清洗单-清洗(单)')"
- >
- <div class="heat-item-style1-num1-2">清洗</div>
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c1">
- {{ info.completeqx || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 单 </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="averticalBarb"></div>
- <div class="heat-lay-item" style="width: 190%">
- <div class="heat-item-style1">
- <div class="heat-item-style1-title">维修未完工累计</div>
- <div class="duplicatelay">
- <div
- id="weixiu3"
- style="cursor: pointer"
- @click="openPopUp($event, 'weixiu3', '维修未完工累计-维修(单)')"
- >
- <div class="heat-item-style1-num1-2">维修</div>
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c4">
- {{ info.openwx || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 单 </span>
- </div>
- </div>
- <div
- id="qingxi3"
- style="cursor: pointer"
- @click="openPopUp($event, 'qingxi3', '清洗未完工累计-清洗(单)')"
- >
- <div class="heat-item-style1-num1-2">清洗</div>
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c4">
- {{ info.openqx || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 单 </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="averticalBarb"></div>
- <div class="heat-lay-item">
- <div class="heat-item-style1">
- <div class="heat-item-style1-title">今日回收工单</div>
- <br />
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c1">
- {{ info.hsgd || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> 单 </span>
- </div>
- </div>
- </div>
- <div class="averticalBarb"></div>
- <!-- style="cursor: pointer" @click="jinrhaop(1)" -->
- <div class="heat-lay-item">
- <div class="heat-item-style1">
- <div class="heat-item-style1-title">今日好评率</div>
- <br />
- <div class="heat-item-style1-num1">
- <span class="heat-item-style1-num1-1 c2">
- {{ info.goodRate || 0 }}
- </span>
- <span class="heat-item-style1-num1-2"> % </span>
- </div>
- </div>
- </div>
- </div>
- <Teleport to="body">
- <popUp
- :show="show"
- :top="top"
- :left="left"
- :title="title"
- :item="item"
- :style="style"
- @col="
- (bool) => {
- show = bool;
- if (!bool) {
- style = {};
- item = [];
- renshu = false;
- timeId2 && timeId2();
- }
- }
- "
- >
- <div v-if="renshu">
- <div v-for="(item, index) in renshuliev" :key="index">
- <br />
- <div style="display: flex; justify-content: space-between">
- <span class="subheading">{{ item.typeName }}:</span
- ><span class="jinge">{{ item.numbers }}人</span>
- </div>
- </div>
- </div>
- </popUp>
- <el-dialog
- width="70%"
- v-model="dialogVisible"
- :before-close="handleClose"
- style="z-index: 10000000000"
- >
- <table border="1" style="width: 100%">
- <thead>
- <tr>
- <th>类型</th>
- <th>工单号</th>
- <th>网点名称</th>
- <th>主服务人员编号</th>
- <th>主服务人员名称</th>
- <th>评价述</th>
- </tr>
- </thead>
- <tbody>
- <tr v-for="(item, index) in cplie" :key="index">
- <td class="xiaolie">{{ item.type }}</td>
- <td class="xiaolie300">{{ item.workerOrderNo }}</td>
- <td class="xiaolie320">{{ item.websitName }}</td>
- <td class="xiaolie150">{{ item.wonumber }}</td>
- <td class="xiaolie120">{{ item.woname }}</td>
- <td>{{ item.tips }}</td>
- </tr>
- </tbody>
- </table>
- <el-pagination
- layout="prev, pager, next"
- :page-size="pageSize"
- :current-page="pageNum"
- :total="total"
- @current-change="currentChange"
- />
- </el-dialog>
- </Teleport>
- </div>
- </template>
- <script>
- import {
- getCommonly,
- getQuery15,
- getQuery22,
- getQuery23_1,
- } from '@/api/bigView.js';
- import popUp from '@/components/pop-up.vue';
- import bus from '@/utils/eventBus.js';
- export default {
- components: { popUp },
- data() {
- return {
- info: {},
- show: false,
- top: 0,
- left: 0,
- title: '',
- item: [],
- timeId2: null,
- renshu: false,
- style: {},
- renshuliev: [],
- dialogVisible: false,
- cplie: [],
- total: 0,
- pageNum: 1,
- pageSize: 10,
- typenum: null,
- };
- },
- watch: {
- dialogVisible() {
- if (this.dialogVisible) {
- bus.emit('autoplay', false);
- } else {
- bus.emit('autoplay', true);
- }
- },
- },
- mounted() {
- this.timeId = getCommonly((res) => {
- this.info = res.data;
- }, 60000);
- },
- beforeUnmount() {
- this.timeId();
- },
- methods: {
- currentChange(a) {
- this.pageNum = a;
- this.jinrhaop();
- },
- jinrhaop() {
- getQuery23_1({
- params: {
- typeCode: 0,
- pageNum: this.pageNum,
- pageSize: this.pageSize,
- },
- }).then((res) => {
- if (!this.dialogVisible) {
- this.dialogVisible = true;
- }
- this.total = res.data.total;
- this.cplie = res.data.records;
- });
- },
- handleClose() {
- this.pageNum = 1;
- this.dialogVisible = false;
- },
- openPopUp(e, id, title) {
- if (id === 'jinrshifucq') {
- getQuery22((res) => {
- var { height, top, left } = document
- .getElementById(id)
- .getBoundingClientRect();
- this.renshuliev = res.data;
- this.title = title;
- this.top = top + height;
- this.left = left;
- this.show = true;
- this.renshu = true;
- this.style = {
- width: 'auto',
- };
- });
- } else {
- this.timeId2 = getQuery15((res) => {
- var list = [
- { city: '广州公司' },
- { city: '佛山公司' },
- { city: '天猫优品' },
- ];
- var keys = [];
- var gz = [];
- var fs = [];
- res.data.map((item) => {
- var { city, ...obj } = item;
- var ind = ~['广州市', '清远市', '韶关市'].indexOf(city)
- ? 0
- : ~['佛山市', '肇庆市', '云浮市'].indexOf(city)
- ? 1
- : 2;
- if (ind === 0) {
- gz.push(item);
- }
- if (ind === 1) {
- fs.push(item);
- }
- keys = Object.keys(obj);
- keys.map((key) => {
- if (list[ind][key] === undefined) {
- list[ind][key] = 0;
- }
- list[ind][key] += obj[key];
- });
- });
- list.map((obj) => {
- if (Object.keys(obj).length === 1) {
- keys.map((key) => {
- obj[key] = 0;
- });
- }
- });
- gz.sort((a, b) => {
- return (
- ['广州市', '清远市', '韶关市'].indexOf(a.city) -
- ['广州市', '清远市', '韶关市'].indexOf(b.city)
- );
- });
- fs.sort((a, b) => {
- return (
- ['佛山市', '肇庆市', '云浮市'].indexOf(a.city) -
- ['佛山市', '肇庆市', '云浮市'].indexOf(b.city)
- );
- });
- this.item = [list[0], ...gz, list[1], ...fs, list[2]].map((item) => {
- var obj = {
- area: item.city,
- };
- if (id === 'lingshou1') {
- obj.amount = item.insMacNewR;
- obj.bills = item.insNewR;
- } else if (id === 'lingshou2') {
- obj.amount = item.insMacFinishR;
- obj.bills = item.insFinishR;
- } else if (id === 'lingshou3') {
- obj.amount = item.insMacOpenR;
- obj.bills = item.insOpenR;
- } else if (id === 'gongcheng1') {
- obj.amount = item.insMacNewP;
- obj.bills = item.insNewP;
- } else if (id === 'gongcheng2') {
- obj.amount = item.insMacFinishP;
- obj.bills = item.insFinishP;
- } else if (id === 'gongcheng3') {
- obj.amount = item.insMacOpenP;
- obj.bills = item.insOpenP;
- } else if (id === 'weixiu1') {
- obj.amount = item.repNew;
- } else if (id === 'weixiu2') {
- obj.amount = item.repFinish;
- } else if (id === 'weixiu3') {
- obj.amount = item.repOpen;
- } else if (id === 'qingxi1') {
- obj.amount = item.repNewqx;
- } else if (id === 'qingxi2') {
- obj.amount = item.repFinishqx;
- } else if (id === 'qingxi3') {
- obj.amount = item.repOpenqx;
- }
- return obj;
- });
- var { height, top, left } = document
- .getElementById(id)
- .getBoundingClientRect();
- this.title = title;
- this.top = top + height;
- this.left = left;
- this.show = true;
- }, 100000000000000);
- }
- },
- },
- };
- </script>
- <style scoped lang="scss">
- table {
- width: 100%;
- border-collapse: collapse;
- }
- table caption {
- font-size: 2em;
- font-weight: bold;
- margin: 1em 0;
- }
- th,
- td {
- border: 1px solid #ddd;
- text-align: center;
- padding: 6px 6px;
- }
- table thead tr {
- background-color: #008c8c;
- color: #fff;
- }
- table tbody tr:nth-child(odd) {
- background-color: #eee;
- }
- table tbody tr:hover {
- background-color: #ccc;
- }
- table tfoot tr td {
- text-align: right;
- padding-right: 20px;
- }
- .xiaolie {
- width: 80px;
- }
- .xiaolie300 {
- width: 220px;
- }
- .xiaolie320 {
- width: 280px;
- }
- .xiaolie150 {
- width: 150px;
- }
- .xiaolie120 {
- width: 100px;
- }
- .heat-lay {
- width: 100%;
- height: 220px;
- & > div:nth-child(1) {
- height: 128px;
- }
- & > div:nth-child(3) {
- height: 82px;
- }
- .horizontalLine {
- width: 100%;
- height: 1px;
- border-radius: 2px;
- background: linear-gradient(to right, #082570, #156ccf, #156ccf, #082570);
- }
- .averticalBart {
- height: 100%;
- min-width: 1px;
- border-radius: 2px;
- background: linear-gradient(#082570, #156ccf);
- }
- .averticalBarb {
- height: 100%;
- min-width: 1px;
- border-radius: 2px;
- background: linear-gradient(#156ccf, #082570);
- }
- .heat-lay-item {
- height: 100%;
- width: 100%;
- box-sizing: border-box;
- padding: 8px 8px;
- }
- .heat-lay-flex {
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: row;
- align-items: center;
- }
- .heat-item-style1-num1-2 {
- font-size: 16px;
- font-family: Source Han Sans CN, Source Han Sans CN-Regular;
- font-weight: 400;
- // margin-left: 10px;
- color: #8ab1dc;
- }
- .heat-item-style1 {
- width: 100%;
- height: 100%;
- .heat-item-style1-title {
- font-size: 16px;
- font-family: Source Han Sans CN, Source Han Sans CN-Regular;
- font-weight: 400;
- // text-align: center;
- color: #8ab1dc;
- margin-bottom: 5px;
- }
- .heat-item-style1-num1,
- .heat-item-style1-num2 {
- width: 100%;
- height: auto;
- display: flex;
- flex-direction: row;
- align-items: center;
- // justify-content: flex-end;
- .heat-item-style1-num1-1 {
- font-size: 22px;
- font-family: Source Han Sans CN, Source Han Sans CN-Medium;
- font-weight: 500;
- }
- .heat-item-style1-num2-1 {
- font-size: 16px;
- font-family: Source Han Sans CN, Source Han Sans CN-Regular;
- font-weight: 400;
- }
- .heat-item-style1-num2-2 {
- font-size: 16px;
- font-family: Source Han Sans CN, Source Han Sans CN-Regular;
- font-weight: 400;
- color: #8ab1dc;
- }
- .c1 {
- color: #3be9ff;
- }
- .c2 {
- color: #3ce783;
- }
- .c3 {
- color: #e15960;
- }
- .c4 {
- color: #ff9900;
- }
- }
- }
- .duplicatelay {
- width: 100%;
- height: auto;
- display: flex;
- justify-content: space-between;
- & > div {
- width: 100%;
- }
- }
- }
- .subheading {
- font-size: 18px;
- font-family: Source Han Sans CN, Source Han Sans CN-Medium;
- font-weight: 500;
- color: #93b0d8;
- line-height: 25px;
- text-align: right;
- }
- .jinge {
- font-size: 18px;
- font-family: Source Han Sans CN, Source Han Sans CN-Medium;
- font-weight: 500;
- color: #ffffff;
- line-height: 25px;
- text-align: right;
- }
- </style>
|