From a169bda5b19db4714d2aa476504e58105228cc40 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 30 五月 2023 18:01:55 +0800
Subject: [PATCH] 1.对接移动端
---
src/views/jcsz/jsqd.vue | 94 ++++++++++++++++++++++++++---------------------
1 files changed, 52 insertions(+), 42 deletions(-)
diff --git a/src/views/jcsz/jsqd.vue b/src/views/jcsz/jsqd.vue
index 8a26993..7d01709 100644
--- a/src/views/jcsz/jsqd.vue
+++ b/src/views/jcsz/jsqd.vue
@@ -287,7 +287,12 @@
sortable="custom"
>
<template slot-scope="{row}">
- <el-input v-if="row.isVisible===1" v-model="row.roletype_code" oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')" placeholder="璇疯緭鍏�" />
+ <el-input
+ v-if="row.isVisible===1"
+ v-model="row.roletype_code"
+ oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')"
+ placeholder="璇疯緭鍏�"
+ />
<div v-else> {{ row.roletype_code }}</div>
</template>
</el-table-column>
@@ -410,7 +415,7 @@
</el-button>
</div>
<el-table
- ref="multipleTable"
+ ref="multipleTableRef"
:data="dialogFormUserTable"
border
:row-class-name="tableRowClassName"
@@ -981,7 +986,7 @@
},
/* 鍏宠仈鐢ㄦ埛妯″潡*/
- async userClick(row) {
+ userClick(row) {
if (row.role_code === 'S001') {
return this.$message.info('姝よ鑹叉棤娉曟搷浣滐紒')
}
@@ -995,29 +1000,31 @@
this.userForm.roleName = row.role_name
this.dialogFormUser.rolecode = row.role_code
- const res = await this.getRoleAssociationUser()
- if (res.code === '200') {
- setTimeout(() => {
- loading.close()
- this.userDialogVisible = true
- this.$nextTick(() => {
- this.$refs.multipleTable.doLayout()
+ this.getRoleAssociationUser().then(res => {
+ if (res.code === '200') {
+ setTimeout(() => {
+ loading.close()
+
+ this.$nextTick(() => {
+ this.$refs.multipleTableRef.doLayout()
+ })
})
- }, 1000)
- } else {
- loading.close()
- }
+ } else {
+ loading.close()
+ }
+ })
},
// 鑾峰彇瑙掕壊娓呭崟鍏宠仈鐢ㄦ埛
async getRoleAssociationUser() {
const res = await RoleAssociationUser(this.dialogFormUser)
this.dialogFormUserTable = res.data
this.dialogFormUserTableLength = res.count
+ this.userDialogVisible = true
this.$nextTick(() => {
this.dialogFormUserTable.forEach((item, index) => {
if (item.flag === 'Y') {
- this.$refs.multipleTable.toggleRowSelection(this.dialogFormUserTable[index], true)
+ this.$refs.multipleTableRef.toggleRowSelection(this.dialogFormUserTable[index], true)
}
})
})
@@ -1064,7 +1071,7 @@
this.dialogFormUser.orgcode = ''
this.dialogFormUser.isrole = ''
this.$refs.dialogCascaderUser.checkedValue = ''
- this.$refs.multipleTable.clearSelection()
+ this.$refs.multipleTableRef.clearSelection()
},
// 鍏宠仈鐢ㄦ埛瀵硅瘽妗嗗叧闂�
userDialogVisibleCancel() {
@@ -1130,7 +1137,7 @@
this.PCTrue = res.data[0][0].is_delete === '0'
this.APPTrue = res.data[1][0].children.filter(item => item.is_delete === '0').length === 0 ? false : res.data[1][0].is_delete === '0'
-
+ console.log(this.APPTrue, 1)
// '0'鏄剧ず '1' 涓嶆樉绀� 杩囨护鍑虹浉瀵瑰簲鐨勮彍鍗�
if (this.PCTrue) {
this.dialogFormRight.rightPCArr[0].children = this.dialogFormRight.rightPCArr[0].children.filter(item => item.is_delete === '0')
@@ -1202,13 +1209,13 @@
pcIsSelected2 = true
const interval = setInterval(() => {
- if ($("input[name='PC']").length > 0) {
+ if ($('input[name=\'PC\']').length > 0) {
waitFlag = true
}
if (waitFlag) {
clearInterval(interval)
this.$nextTick(() => {
- $("input[name='PC']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+ $('input[name=\'PC\']').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
})
}
}, 100)
@@ -1221,13 +1228,13 @@
appIsSelected2 = true
const interval = setInterval(() => {
- if ($("input[name='APP']").length > 0) {
+ if ($('input[name=\'APP\']').length > 0) {
waitFlag = true
}
if (waitFlag) {
clearInterval(interval)
this.$nextTick(() => {
- $("input[name='APP']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+ $('input[name=\'APP\']').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
})
}
}, 100)
@@ -1242,14 +1249,14 @@
appIsSelected2 = true
const interval = setInterval(() => {
- if ($("input[name='PC']").length > 0) {
+ if ($('input[name=\'PC\']').length > 0) {
waitFlag = true
}
if (waitFlag) {
clearInterval(interval)
this.$nextTick(() => {
- $("input[name='PC']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
- $("input[name='APP']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+ $('input[name=\'PC\']').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+ $('input[name=\'APP\']').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
})
}
}, 100)
@@ -1266,13 +1273,13 @@
pcIsSelected2 = true
const interval = setInterval(() => {
- if ($("input[name='PC']").length > 0) {
+ if ($('input[name=\'PC\']').length > 0) {
waitFlag = true
}
if (waitFlag) {
clearInterval(interval)
this.$nextTick(() => {
- $("input[name='PC']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+ $('input[name=\'PC\']').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
})
}
}, 100)
@@ -1288,13 +1295,13 @@
appIsSelected2 = true
const interval = setInterval(() => {
- if ($("input[name='APP']").length > 0) {
+ if ($('input[name=\'APP\']').length > 0) {
waitFlag = true
}
if (waitFlag) {
clearInterval(interval)
this.$nextTick(() => {
- $("input[name='APP']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+ $('input[name=\'APP\']').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
})
}
}, 100)
@@ -1550,10 +1557,10 @@
this.$nextTick(() => {
if (item.name === 'PC') {
- $("input[name='PC']").eq(0).prop('checked', false)// 鑷畾涔夊崟閫夋鍥炴樉
+ $('input[name=\'PC\']').eq(0).prop('checked', false)// 鑷畾涔夊崟閫夋鍥炴樉
}
if (item.name === 'APP') {
- $("input[name='APP']").eq(0).prop('checked', false)// 鑷畾涔夊崟閫夋鍥炴樉
+ $('input[name=\'APP\']').eq(0).prop('checked', false)// 鑷畾涔夊崟閫夋鍥炴樉
}
// $("input[name='APP']").eq(0).prop('checked', false)// 鑷畾涔夊崟閫夋鍥炴樉
// $('input:checkbox').eq(index).prop('checked', false)// 鑷畾涔夊崟閫夋鍥炴樉
@@ -1576,10 +1583,10 @@
item.isSelected2 = true
this.$nextTick(() => {
if (item.name === 'PC') {
- $("input[name='PC']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+ $('input[name=\'PC\']').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
}
if (item.name === 'APP') {
- $("input[name='APP']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+ $('input[name=\'APP\']').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
}
// $('input:checkbox').eq(index).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
})
@@ -1602,10 +1609,10 @@
item.isSelected2 = true
this.$nextTick(() => {
if (item.name === 'PC') {
- $("input[name='PC']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+ $('input[name=\'PC\']').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
}
if (item.name === 'APP') {
- $("input[name='APP']").eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+ $('input[name=\'APP\']').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
}
// $('input:checkbox').eq(index).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
})
@@ -1711,10 +1718,11 @@
<!--鍏叡椤甸潰鏍峰紡-->
<style lang="scss" scoped>
$main_color: #42b983;
-::v-deep .el-button--text{
- font-size: 14px ;
- cursor: pointer ;
+::v-deep .el-button--text {
+ font-size: 14px;
+ cursor: pointer;
}
+
.el-icon-share, .el-icon-delete, .el-icon-edit-outline {
color: $main_color;
cursor: pointer;
@@ -1803,23 +1811,25 @@
margin-bottom: 0;
}
-.tableFixed{
- ::v-deep .el-table__fixed-right{
+.tableFixed {
+ ::v-deep .el-table__fixed-right {
height: 100% !important;
}
- ::v-deep .el-table__fixed{
+
+ ::v-deep .el-table__fixed {
height: 100% !important;
}
}
</style>
<style>
-.osloading{
+.osloading {
font-size: 26px !important;
}
-.el-loading-text{
+.el-loading-text {
font-size: 26px !important;
}
+
.el-table .custom-row {
background: #f8f8fa;
}
--
Gitblit v1.9.3