From e713b378b01d189f972cfb5b9eae749ee95a8b51 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 29 十月 2022 13:48:00 +0800
Subject: [PATCH] 1.解决两个账号登录,是否被挤掉的问题
---
src/views/sbgl/djjl.vue | 181 +++++++++++++++++++++++++++++++++------------
1 files changed, 133 insertions(+), 48 deletions(-)
diff --git a/src/views/sbgl/djjl.vue b/src/views/sbgl/djjl.vue
index 9f1d18b..9bbc170 100644
--- a/src/views/sbgl/djjl.vue
+++ b/src/views/sbgl/djjl.vue
@@ -11,12 +11,12 @@
<el-form
ref="form"
:model="form"
- label-width="80px"
+ label-width="100px"
inline
style="display: flex;justify-content: space-between"
>
- <div class="elForm">
- <el-form-item label="鐢熶骇杞﹂棿" style=" display: flex;">
+ <div class="elForm" style="justify-content: flex-start">
+ <el-form-item label-width="70px" label="鐢熶骇杞﹂棿" style=" display: flex;">
<el-select v-model="form.wkshopcode" style="width: 200px" placeholder="璇烽�夋嫨">
<el-option
v-for="item in wkshopSelectArr"
@@ -35,11 +35,21 @@
<el-form-item label="鏍囧噯鍚嶇О" style=" display: flex;">
<el-input v-model="form.stanedname" placeholder="璇疯緭鍏�" style="width: 200px" />
</el-form-item>
- <el-form-item label="鐐规浜哄憳" style=" display: flex;">
+ <el-form-item v-show="isExpandForm" label-width="70px" label="鐐规浜哄憳" style=" display: flex;">
<el-input v-model="form.checkuser" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
- <el-form-item v-show="isExpandForm" label="鐐规鏃堕棿" style=" display: flex;">
- <el-input v-model="form.checkdate" style="width: 200px" placeholder="璇疯緭鍏�" />
+ <el-form-item v-show="isExpandForm" label="鐐规鏃堕棿" style=" display: flex;font-size:14px;align-items: center">
+ <el-date-picker
+ v-model="form.checkdate"
+ type="daterange"
+ :clearable="false"
+ class="timeMini"
+ range-separator="~"
+ start-placeholder="寮�濮嬫棩鏈�"
+ style="width: 200px;display: flex;line-height: 34px ;height: 34px;"
+ end-placeholder="缁撴潫鏃ユ湡"
+ size="mini"
+ />
</el-form-item>
<!-- <el-form-item v-show="isExpandForm" label="鐐规缁撴灉" style=" display: flex;">-->
<!-- <el-select v-model="form.isOK" style="width: 200px" placeholder="璇烽�夋嫨">-->
@@ -52,22 +62,34 @@
<!-- </el-select>-->
<!-- </el-form-item>-->
</div>
- <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2">
+ <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}">
<el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
<el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
</div>
</el-form>
+ <div
+ class="bodyTopFormExpand"
+ >
+ <svg-icon
+ v-show="mouseHoverType==='mouseout'"
+ style="cursor: pointer"
+ :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
+ @mouseenter="mouseHoverType=$event.type"
+ />
+ <svg-icon
+ v-show="mouseHoverType==='mouseenter'"
+ style="cursor: pointer"
+ :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
+ @click="isExpandForm=!isExpandForm"
+ @mouseout="mouseHoverType=$event.type"
+ />
+ </div>
</div>
- <div
- class="bodyTopFormExpand"
- @click="isExpandForm=!isExpandForm"
- >
- <i
- :class="!isExpandForm?'el-icon-arrow-down':'el-icon-arrow-up'"
- :style="{color:'#42B983'}"
- /></div>
- <div class="elTableDiv" style="margin-top: 0">
+
+ <div class="elTableDiv">
<el-table
+ ref="tableDataRef"
+ class="tableFixed"
:data="tableData"
:height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
border
@@ -85,7 +107,7 @@
label="搴忓彿"
/>
<el-table-column
- prop="org_code"
+ prop="djwo"
label="鐐规鍗曞彿"
sortable="custom"
/>
@@ -95,45 +117,51 @@
sortable="custom"
/>
<el-table-column
- prop="description"
+ prop="eqp_code"
label="璁惧缂栧彿"
sortable="custom"
/>
<el-table-column
- prop="parentorg_name"
+ prop="eqp_name"
label="璁惧鍚嶇О"
sortable="custom"
/>
<el-table-column
- prop="lm_user"
+ prop="stanedcode"
label="鐐规鏍囧噯缂栫爜"
+ width="160"
sortable="custom"
/>
<el-table-column
- prop="lm_date"
+ prop="stanedname"
label="鐐规鏍囧噯鍚嶇О"
width="160"
sortable="custom"
/>
<el-table-column
- prop="lm_date"
+ prop="chk_user"
label="鐐规浜哄憳"
width="160"
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.chk_user&&row.chk_user!=='null'">{{ row.chk_user }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
- prop="djjg"
+ prop="chk_result"
label="鐐规缁撴灉"
width="160"
sortable="custom"
>
<template slot-scope="{row}">
- <div v-if="row.djjg==='Y'" style="display: flex;align-items: center"><div style="margin-right: 5px;width:10px;height: 10px;border-radius: 50%;background-color: #42b983" />姝e父</div>
- <div v-if="row.djjg==='N'" style="display: flex;align-items: center"><div style="margin-right: 5px;width:10px;height: 10px;border-radius: 50%;background-color: red" />寮傚父</div>
+ <div v-if="row.chk_result==='OK'" style="display: flex;align-items: center"><div style="margin-right: 5px;width:10px;height: 10px;border-radius: 50%;background-color: #42b983" />姝e父</div>
+ <div v-if="row.chk_result==='NG'" style="display: flex;align-items: center"><div style="margin-right: 5px;width:10px;height: 10px;border-radius: 50%;background-color: red" />寮傚父</div>
</template>
</el-table-column>
<el-table-column
- prop="lm_date"
+ prop="chk_date"
label="鐐规鏃堕棿"
width="160"
sortable="custom"
@@ -196,30 +224,36 @@
@sort-change="sortChange"
>
<el-table-column
- prop="RowNum"
+ prop="seq"
width="50"
fixed
label="搴忓彿"
/>
<el-table-column
- prop="RowNum"
+ prop="itemcode"
label="閮ㄤ綅缂栫爜"
/>
<el-table-column
- prop="RowNum"
+ prop="itemname"
label="閮ㄤ綅鍚嶇О"
/>
<el-table-column
- prop="RowNum"
+ prop="result"
label="鐐规缁撴灉"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.result==='OK'" style="display: flex;align-items: center"><div style="margin-right: 5px;width:10px;height: 10px;border-radius: 50%;background-color: #42b983" />姝e父</div>
+ <div v-if="row.result==='NG'" style="display: flex;align-items: center"><div style="margin-right: 5px;width:10px;height: 10px;border-radius: 50%;background-color: red" />寮傚父</div>
+ </template>
+ </el-table-column>
<el-table-column
- prop="RowNum"
+ prop="chk_value"
label="鏁板��"
/>
<el-table-column
- prop="bz"
+ prop="remark"
label="澶囨敞"
+ show-tooltip-when-overflow
/>
</el-table>
</div>
@@ -251,7 +285,7 @@
import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz'
import { getCookie } from '@/utils/auth'
import ImportPicker from '@/components/ImportPicker'
-import { validateCode } from '@/utils/global'
+import { handleDatetime, validateCode } from '@/utils/global'
import { DeviceCheckSubTakeSearch, DeviceCheckTakeOutExcel, DeviceCheckTakeSearch } from '@/api/sbgl'
import { ShopSearch } from '@/api/dzkb'
@@ -262,6 +296,7 @@
},
data() {
return {
+ mouseHoverType: 'mouseout',
isExpandForm: false,
mainHeight: 0,
tableHeight: 0,
@@ -272,7 +307,7 @@
stanedname: '', // 鏍囧噯鍚嶇О
checkuser: '', // 鐐规浜哄憳
checkdate: '', // 鐐规鏃堕棿
- prop: 'eqp_code', // 鎺掑簭瀛楁
+ prop: 'chk_date', // 鎺掑簭瀛楁
order: 'desc', // 鎺掑簭瀛楁
page: 1, // 绗嚑椤�
rows: 20 // 姣忛〉澶氬皯鏉�
@@ -321,13 +356,27 @@
})
},
async getDeviceCheckTakeSearch() {
- const res = await DeviceCheckTakeSearch(this.form)
- this.tableData = res.data
- // this.tableData = [
- // { RowNum: 1, djjg: 'N' }
- // ]
- this.total = res.count
+ let tempDate = this.form.checkdate
+ if (tempDate.length > 0) {
+ tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
+ }
+ const data = {
+ wkshopcode: this.form.wkshopcode,
+ eqpcode: this.form.eqpcode,
+ eqpname: this.form.eqpname,
+ stanedname: this.form.stanedname,
+ checkuser: this.form.checkuser,
+ checkdate: tempDate,
+ prop: this.form.prop, // 鎺掑簭瀛楁
+ order: this.form.order, // 鎺掑簭瀛楁
+ page: this.form.page, // 绗嚑椤�
+ rows: this.form.rows // 姣忛〉澶氬皯鏉�
+ }
+
+ const res = await DeviceCheckTakeSearch(data)
+ this.tableData = res.data
+ this.total = res.count
return { code: res.code }
},
// 鑾峰彇鎵ц杞﹂棿涓嬫媺鏁扮粍
@@ -381,11 +430,9 @@
this.operation = operation
this.dialogVisible = true
- // const res = await DeviceCheckSubTakeSearch({djwo:row.id})
+ const res = await DeviceCheckSubTakeSearch({ djwo: row.djwo })
- this.tableDataDialog = [
- { bz: '1231' }
- ]
+ this.tableDataDialog = res.data
// this.$nextTick(() => {
// this.dialogForm.OrgCode = row.org_code
// this.dialogForm.OrgName = row.org_name
@@ -448,14 +495,28 @@
})
},
async download() {
- const { data: res } = await DeviceCheckTakeOutExcel(this.form)
+ let tempDate = this.form.checkdate
+ if (tempDate.length > 0) {
+ tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
+ }
+ const data = {
+ wkshopcode: this.form.wkshopcode,
+ eqpcode: this.form.eqpcode,
+ eqpname: this.form.eqpname,
+ stanedname: this.form.stanedname,
+ checkuser: this.form.checkuser,
+ checkdate: tempDate
+ }
+ const { data: res } = await DeviceCheckTakeOutExcel(data)
window.location.href = res
},
// 鑾峰彇椤甸潰楂樺害
getHeight() {
this.$nextTick(() => {
this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 245
+ this.tableHeight = this.mainHeight - 255
+
+ this.$refs.tableDataRef.doLayout()
})
},
tableRowClassName({ row, rowIndex }) {
@@ -469,6 +530,21 @@
<!--鍏叡椤甸潰鏍峰紡-->
<style lang="scss" scoped>
$main_color: #42b983;
+::v-deep .el-range__icon{
+ line-height: 28px !important;
+}
+::v-deep .el-range-separator{
+ line-height: 28px !important;
+}
+::v-deep .el-range-input{
+ font-size: 14px;
+}
+::v-deep .el-range-separator{
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
::v-deep .el-button--text {
font-size: 14px;
cursor: pointer;
@@ -570,6 +646,15 @@
align-items: center;
justify-content: center;
}
+
+.tableFixed{
+ ::v-deep .el-table__fixed-right{
+ height: 100% !important;
+ }
+ ::v-deep .el-table__fixed{
+ height: 100% !important;
+ }
+}
</style>
<style>
--
Gitblit v1.9.3