From f3335e01ea71614db9fa6aedf1d35e1202c3b12f Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 11 八月 2022 15:46:26 +0800
Subject: [PATCH] 修改登陆时传PC参数
---
src/views/jcsz/jsqd.vue | 359 +++++++++++++++++++++++++++--------------------------------
1 files changed, 167 insertions(+), 192 deletions(-)
diff --git a/src/views/jcsz/jsqd.vue b/src/views/jcsz/jsqd.vue
index ecc2490..fbbb524 100644
--- a/src/views/jcsz/jsqd.vue
+++ b/src/views/jcsz/jsqd.vue
@@ -1,7 +1,14 @@
<template>
<div>
<div class="body" :style="{height:mainHeight+'px'}">
- <div style="padding: 10px 5px 0 0">
+
+ <div class="bodyTopButtonGroup">
+ <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
+ <el-button icon="el-icon-setting" @click="settingButton">璁剧疆</el-button>
+ <el-button icon="el-icon-download" @click="upload">瀵煎叆</el-button>
+ </div>
+
+ <div class="bodyTopFormGroup">
<el-form
ref="form"
:model="form"
@@ -43,20 +50,14 @@
</div>
</el-form>
</div>
- <el-divider />
- <div style="margin-left: 10px;display: flex">
- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
- <el-button type="primary" icon="el-icon-setting" @click="settingButton">璁剧疆</el-button>
- <!-- <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
- </div>
- <el-divider />
+
<div class="elTableDiv">
<el-table
:data="tableData"
border
- stripe
+ :row-class-name="tableRowClassName"
:height="tableHeight+'px'"
- :style="{width: 100+'%',height:tableHeight+'px'}"
+ :style="{width: 100+'%',height: tableHeight+'px'}"
highlight-current-row
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@@ -102,11 +103,16 @@
label="鍒涘缓浜哄憳"
sortable="custom"
width="110"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.lm_user===null">/</div>
+ <div v-else>{{ row.lm_user }}</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="lm_date"
label="鍒涘缓鏃堕棿"
- min-width="160"
+ width="160"
sortable="custom"
/>
<el-table-column
@@ -116,8 +122,8 @@
sortable="custom"
>
<template slot-scope="{row}">
- <i v-if="row.is_user==='Y'" class="el-icon-user-solid" @click="userClick(row)" />
- <i v-if="row.is_user==='N'" class="el-icon-user-solid" style="color: #E4E7ED" @click="userClick(row)" />
+ <i v-if="row.is_user==='Y'" class="el-icon-user-solid" style="color:#42b983;cursor: pointer" @click="userClick(row)" />
+ <i v-if="row.is_user==='N'" class="el-icon-user-solid" style="color: rgb(180 ,181, 185);cursor: pointer" @click="userClick(row)" />
</template>
</el-table-column>
<el-table-column
@@ -128,17 +134,22 @@
>
<template slot-scope="{row}">
<i v-if="row.is_right==='Y'" class="el-icon-share" @click="rightClick(row)" />
- <i v-if="row.is_right==='N'" class="el-icon-share" style="color: #E4E7ED" @click="rightClick(row)" />
+ <i v-if="row.is_right==='N'" class="el-icon-share" style="color: rgb(180 ,181, 185)" @click="rightClick(row)" />
</template>
</el-table-column>
<el-table-column
label="鎿嶄綔"
fixed="right"
+ width="120"
>
<template slot-scope="{row}">
<div class="operationClass">
- <el-button type="text" @click="edit('edit',row)">缂栬緫</el-button>
- <el-button type="text" @click="del(row)">鍒犻櫎</el-button>
+ <el-tooltip class="item" effect="dark" content="缂栬緫" placement="top">
+ <i class="el-icon-edit-outline" @click="edit('edit',row)" />
+ </el-tooltip>
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
+ <i class="el-icon-delete" @click="del(row)" />
+ </el-tooltip>
</div>
</template>
</el-table-column>
@@ -151,7 +162,7 @@
:page.sync="form.page"
:limit.sync="form.rows"
align="right"
- layout="prev, pager, next,sizes"
+ layout="total ,prev, pager, next,sizes"
popper-class="select_bottom"
@pagination="getRoleSearch"
/>
@@ -216,12 +227,14 @@
<!-- <el-button type="primary" icon="el-icon-delete" @click="delSetting">鍒犻櫎</el-button>-->
</div>
<el-table
+ ref="RoleTypeCodeArr"
:data="RoleTypeCodeArr"
border
height="300"
highlight-current-row
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
+ :row-class-name="tableRowClassName"
@sort-change="sortChangeOfSetting"
>
<!-- :style="{width: 100+'%',height:tableHeight-300+'px'}"-->
@@ -272,7 +285,8 @@
:page.sync="formSetting.page"
:limit.sync="formSetting.rows"
align="right"
- layout="prev, pager, next,sizes"
+ style="margin-top: 10px"
+ layout="total ,prev, pager, next,sizes"
popper-class="select_bottom"
@pagination="getRoleTypeSearch"
/>
@@ -287,10 +301,10 @@
<el-dialog
title="瑙掕壊鍏宠仈鐢ㄦ埛"
:visible.sync="userDialogVisible"
- width="1500px"
+ width="900px"
:close-on-click-modal="false"
top="15vh"
- :fullscreen="isFullscreen"
+ :fullscreen="isIpad"
class="userDialogVisible"
@closed="handleCloseUser"
@close="handleCloseUser"
@@ -302,13 +316,19 @@
<div style="margin-bottom: 10px">
<i class="el-icon-s-operation" style="color:#42b983;" /> 鐢ㄦ埛鍒楄〃
</div>
- <div style="display: flex;min-height: 50px">
+ <div style="display: flex;min-height: 50px;margin-bottom: 10px">
<el-form ref="dialogFormUser" inline :model="dialogFormUser" label-width="80px">
<el-form-item label="鐢ㄦ埛缂栫爜">
- <el-input v-model="dialogFormUser.usercode" style="width: 200px" />
+ <el-input
+ v-model="dialogFormUser.usercode"
+ :style="{width:isIpad? '180px':'200px'}"
+ />
</el-form-item>
<el-form-item label="鐢ㄦ埛鍚嶇О">
- <el-input v-model="dialogFormUser.username" style="width: 200px" />
+ <el-input
+ v-model="dialogFormUser.username"
+ :style="{width:isIpad? '180px':'200px'}"
+ />
</el-form-item>
<el-form-item label="鎵�灞炵粍缁�">
<el-cascader
@@ -319,7 +339,7 @@
:append-to-body="false"
:options="StuOrgArr"
:props="defaultProps"
- style="width: 200px;"
+ :style="{width:isIpad? '180px':'200px'}"
@change="dialogCascaderChange"
/>
@@ -330,7 +350,7 @@
v-model="dialogFormUser.isrole"
filterable
:popper-append-to-body="false"
- style="width: 200px"
+ :style="{width:isIpad? '180px':'200px'}"
placeholder="璇烽�夋嫨"
>
<el-option
@@ -362,10 +382,11 @@
:data="dialogFormUserTable"
border
highlight-current-row
- height="300"
+ :height="isIpad?400:365"
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
:row-key="getRowKey"
+ :row-class-name="tableRowClassName"
@sort-change="sortChangeOfUser"
@selection-change="handleSelectionChange"
>
@@ -415,7 +436,8 @@
:page.sync="dialogFormUser.page"
:limit.sync="dialogFormUser.rows"
align="right"
- layout="prev, pager, next,sizes"
+ style="margin-top: 10px"
+ layout="total ,prev, pager, next,sizes"
popper-class="select_bottom"
@pagination="getRoleAssociationUser"
/>
@@ -433,7 +455,7 @@
:visible.sync="dialogVisibleRight"
width="800px"
top="15vh"
- :fullscreen="isFullscreen"
+ :fullscreen="isIpad"
:close-on-click-modal="false"
class="dialogVisibleRight"
@closed="handleCloseRight"
@@ -471,7 +493,7 @@
<div style="margin-bottom: 10px">
<i class="el-icon-s-operation" style="color:#42b983;" /> 鍔熻兘鏉冮檺
</div>
- <div style="height: 400px;overflow-y: scroll">
+ <div style="height: 393px;overflow-y: scroll">
<el-tree
v-if="dialogFormRight.rightCurrentCode==='PC'"
ref="rightPCRef"
@@ -504,11 +526,16 @@
</div>
</span>
</el-dialog>
+
+ <!--瀵煎叆缁勪欢-->
+ <import-picker ref="importPickerFunc" class="importPickerClass" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
+
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
+import ImportPicker from '@/components/ImportPicker'
import {
AddUpdateRole,
DeleteRole, RoleAssociationRight,
@@ -524,7 +551,7 @@
export default {
name: 'JSQD',
components: {
- Pagination
+ Pagination, ImportPicker
},
data() {
const validateName = (rule, value, callback) => {
@@ -538,15 +565,8 @@
}
}
}
- // const validateTypeCode = (rule, value, callback) => {
- // if (!value) {
- // return callback(new Error('璇烽�夋嫨涓婄骇'))
- // } else {
- // callback()
- // }
- // }
return {
- isFullscreen: false,
+ isIpad: false,
mainHeight: 0,
tableHeight: 0,
form: {
@@ -642,24 +662,42 @@
value: 'code'
},
PCTrue: false, // 鏄惁灞曠ず
- APPTrue: false// 鏄惁灞曠ず
+ APPTrue: false, // 鏄惁灞曠ず
+
+ title_value: '鏁版嵁瀵煎叆 / 瑙掕壊娓呭崟',
+ code: '1',
+ shows: false
+ }
+ },
+ watch: {
+ shows() {
+ if (!this.shows) {
+ this.getRoleSearch()
+ }
}
},
created() {
- this.getRoleSearch()
- this.getRoleTypeSearch2()
- this.getUserOrganization()
+ this.handleRequest()
},
mounted() {
window.addEventListener('resize', this.getHeight)
this.getHeight()
},
methods: {
+ handleRequest() {
+ this.getRoleSearch().then(res => {
+ if (res.code === '200') {
+ this.getRoleTypeSearch2()
+ this.getUserOrganization()
+ }
+ })
+ },
// 鑾峰彇瑙掕壊娓呭崟
async getRoleSearch() {
const res = await RoleSearch(this.form)
this.tableData = res.data
this.total = res.count
+ return { code: res.code }
},
// 鑾峰彇鐢ㄦ埛绫诲瀷
async getRoleTypeSearch() {
@@ -677,6 +715,9 @@
settingButton() {
this.settingDialogVisible = true
this.getRoleTypeSearch()
+ this.$nextTick(() => {
+ this.$refs.RoleTypeCodeArr.doLayout()
+ })
},
// 鑾峰彇鎵�灞炵粍缁�
async getUserOrganization() {
@@ -707,10 +748,6 @@
this.formSetting.order = order
this.formSetting.prop = prop
this.getRoleTypeSearch()
- },
-
- upload() {
-
},
// 鏌ヨ
search() {
@@ -801,12 +838,16 @@
// 鑾峰彇椤甸潰楂樺害
getHeight() {
this.$nextTick(() => {
- console.log(window.innerHeight)
- console.log(window.innerHeight)
- this.mainHeight = window.innerHeight - 250
- this.tableHeight = this.mainHeight - 100
- // this.isFullscreen = window.innerHeight < 800
+ this.mainHeight = window.innerHeight - 85
+ this.tableHeight = this.mainHeight - 200
+ if (window.innerHeight < 769) {
+ this.tableHeight = this.tableHeight - 40
+ }
+ this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
})
+ },
+ tableRowClassName({ row, rowIndex }) {
+ return 'custom-row'
},
/* 璁剧疆妯″潡*/
// 璁剧疆瀵硅瘽妗嗗叧闂簨浠�
@@ -882,6 +923,9 @@
this.userForm.roleName = row.role_name
this.dialogFormUser.rolecode = row.role_code
this.getRoleAssociationUser()
+ this.$nextTick(() => {
+ this.$refs.multipleTable.doLayout()
+ })
},
// 鑾峰彇瑙掕壊娓呭崟鍏宠仈鐢ㄦ埛
async getRoleAssociationUser() {
@@ -1088,9 +1132,11 @@
}
}
+ // 鐩墠涓�鏈熻偗瀹氭槸杩欎釜
if (this.PCTrue && !this.APPTrue) {
+ pcIsSelected1 = true
if (rightPCArrFlag === 'Y') {
- pcIsSelected1 = true
+ // pcIsSelected1 = true
pcIsSelected2 = true
const interval = setInterval(() => {
@@ -1105,8 +1151,9 @@
}
}, 100)
- this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
+ // this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
}
+ this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
}
if (!this.PCTrue && this.APPTrue) {
@@ -1430,6 +1477,14 @@
this.dialogFormRight.rightAPPArrSelected = ['APP']
}
}
+ },
+ // 瀵煎叆鎸夐挳
+ upload() {
+ this.shows = true
+ this.$refs.importPickerFunc.newDataFunc()
+ },
+ colos() {
+ this.shows = false
}
}
@@ -1438,58 +1493,10 @@
<style lang="scss" scoped>
$main_color: #42b983;
-::v-deep .el-button--primary {
- background-color: $main_color !important;
- height: 30px;
- display: flex;
- align-items: center;
- //border: 1px solid $main_color;
- border: none;
- padding: 0 20px;
-}
-
-::v-deep .el-button--primary:hover {
- border: none;
-}
-
-::v-deep .el-button--info {
- //background-color: $main_color !important;
- height: 30px;
- display: flex;
- align-items: center;
- padding: 0 20px;
-}
-
-::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
- background-color: $main_color !important;
-}
-
-::v-deep .el-dialog__footer {
- display: flex;
- justify-content: flex-end;
-}
-
-.footerButton {
- display: flex;
- justify-content: end;
-}
-
-::v-deep .el-button--default {
- background-color: #ffffff !important;
- height: 30px;
- display: flex;
- align-items: center;
- padding: 0 20px;
-}
-
-::v-deep .el-button--default:hover {
- color: #606266;
-}
::v-deep .el-dialog__body {
padding: 20px 100px !important;
}
-
.settingDialogVisible, .userDialogVisible, .dialogVisibleRight {
::v-deep .el-dialog__body {
padding: 10px 20px !important;
@@ -1556,86 +1563,82 @@
}
}
-::v-deep .el-radio__input.is-checked .el-radio__inner {
- background-color: $main_color;
- border-color: $main_color;
+</style>
+
+<!--鍏叡椤甸潰鏍峰紡-->
+<style lang="scss" scoped>
+$main_color: #42b983;
+.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
+ color: $main_color;
+ cursor: pointer;
+}
+.el-icon-edit-outline{
+ margin-right: 15px;
}
-::v-deep .el-radio__input.is-checked + .el-radio__label {
- color: $main_color !important;
+::v-deep .el-button--primary, .el-button--default, .el-button--info {
+ height: 34px;
+ display: flex;
+ align-items: center;
+ padding: 0 15px;
}
-::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
- border-color: $main_color;
- background-color: $main_color;
+::v-deep .el-button--primary {
+ //background-color: $main_color !important;
+}
+
+::v-deep .el-button--default {
+ background-color: #f8f8fa;
+ border: none;
}
::v-deep .el-input__inner {
- height: 30px;
- line-height: 30px;
+ height: 34px;
+ line-height: 34px;
+ //color: #a7a7a7;
}
-::v-deep .el-input__inner:focus {
- border-color: $main_color;
+::v-deep .el-dialog__body {
+ padding: 20px 100px !important;
+}
+
+::v-deep .dialogVisibleRoles .el-dialog__body {
+ padding: 20px 20px !important;
+}
+
+::v-deep .importPickerClass .el-dialog__body {
+ padding: 20px 20px !important;
+}
+
+::v-deep .el-dialog__footer {
+ display: flex;
+ justify-content: flex-end;
}
::v-deep .el-table .caret-wrapper {
- //float: right;
transform: scale(0.8);
}
::v-deep .cell {
- display: flex !important;
- align-items: center !important;
- justify-content: space-between !important;
-}
-
-::v-deep .el-button--text {
- color: $main_color;
- font-size: 14px;
- cursor: pointer;
-}
-
-.operationClass {
- height: 23px;
display: flex;
- justify-content: space-between;
align-items: center;
+ justify-content: space-between;
}
-.el-icon-share, .el-icon-user-solid {
- color: $main_color;
- cursor: pointer;
+::v-deep .el-table::before {
+ height: 0;
}
-.el-checkbox.is-bordered.is-checked {
- border-color: $main_color;
+::v-deep .el-table__body-wrapper {
+ background-color: #f8f8fa;
}
-::v-deep .el-radio__input.is-checked .el-radio__inner {
- border-color: $main_color;
- background: $main_color;
+::v-deep .el-table__body .el-table__row.hover-row td{
+ background-color: #eaecef ;
}
-::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
- border-color: $main_color;
- background: $main_color;
-}
-
-::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
- color: $main_color !important;
-}
-
-::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
- margin: 10px 30px 0px 0;
-}
-
-::v-deep .el-radio__input.is-checked + .el-radio__label {
- color: $main_color;
-}
-
-::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
- margin: 10px 30px 0px 0;
+::v-deep .el-form--inline .el-form-item__label {
+ color: #a7a7a7;
}
.body ::v-deep .el-divider {
@@ -1647,45 +1650,17 @@
.body ::v-deep .el-form-item {
margin-bottom: 0;
}
-
-::v-deep .el-input__inner:focus {
- border-color: $main_color;
-}
-
-::v-deep .el-select .el-input__inner:focus {
- border-color: $main_color;
-}
-
-::v-deep .el-select-dropdown__item.selected {
- color: $main_color;
-}
-
-::v-deep .el-textarea__inner:focus {
- border-color: $main_color;
+.userDialogVisible ::v-deep .el-form-item {
+ margin-bottom: 0;
}
</style>
-<style lang="scss">
-.elCascader {
- //.el-cascader-node.in-active-path, .el-cascader-node.is-active, .el-cascader-node.is-selectable.in-checked-path {
- // color: #42b983 ;
- //}
- .el-cascader-node.is-selectable.in-checked-path {
- color: #42b983;
- }
+<style>
- .el-radio__input.is-checked .el-radio__inner {
- background-color: #42b983;
- border-color: #42b983;
- }
-
- .el-radio__input.is-checked .el-radio__inner:hover {
- border-color: #42b983;
- }
-
- .el-input__inner {
- border-color: #42b983 !important;
- }
-
+.el-table .custom-row {
+ background: #f8f8fa;
+}
+.el-form-item__label{
+ font-weight: 400 !important
}
</style>
--
Gitblit v1.9.3