From fd59571a8536d48d4029eb7b09a717393f19e210 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 22 六月 2022 17:29:46 +0800
Subject: [PATCH] 1.角色关联功能勾选提交功能 2.供方清单(新增、编辑、删除) 功能开发
---
src/views/jcsz/jsqd.vue | 58 +++++++++++++++++++++++++++++++++-------------------------
1 files changed, 33 insertions(+), 25 deletions(-)
diff --git a/src/views/jcsz/jsqd.vue b/src/views/jcsz/jsqd.vue
index 4580a21..8ed5b4e 100644
--- a/src/views/jcsz/jsqd.vue
+++ b/src/views/jcsz/jsqd.vue
@@ -1,7 +1,8 @@
<template>
<div>
+ <!-- <div class="body" style="background-color: #ffffff; padding: 20px 10px 0 20px;">-->
<div class="body" style="background-color: #ffffff; padding: 20px 10px 0 20px;" :style="{height:mainHeight+'px'}">
- <div style="height: 50px;">
+ <div>
<el-form
ref="form"
:model="form"
@@ -17,7 +18,7 @@
<el-input v-model="form.RoleName" placeholder="璇疯緭鍏�" style="width: calc(100%-30px)" />
</el-form-item>
<el-form-item label="瑙掕壊绫诲瀷" style=" display: flex;">
- <el-select v-model="form.RoleTypeCode" style="width: calc(100%-30px)" placeholder="璇烽�夋嫨">
+ <el-select v-model="form.RoleTypeCode" filterable style="width: calc(100%-30px)" placeholder="璇烽�夋嫨">
<el-option
v-for="item in RoleTypeCodeArr2"
:key="item.roletype_code"
@@ -46,12 +47,13 @@
<el-table
:data="tableData"
border
- highlight-current-row
:style="{width: 100+'%',height:tableHeight+'px'}"
+ highlight-current-row
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@sort-change="sortChange"
>
+
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- width="50"-->
@@ -91,6 +93,7 @@
prop="lm_date"
label="鍒涘缓鏃堕棿"
sortable="custom"
+ show-overflow-tooltip
/>
<el-table-column
prop="lm_date"
@@ -156,6 +159,7 @@
<el-form-item prop="RoleTypeCode" label="瑙掕壊绫诲瀷">
<el-select
v-model="dialogForm.RoleTypeCode"
+ filterable
style="width: 220px"
placeholder="璇烽�夋嫨"
>
@@ -230,7 +234,7 @@
<div v-else> {{ row.roletype_name }}</div>
</template>
</el-table-column>
- <el-table-column>
+ <el-table-column label="鎿嶄綔">
<template slot-scope="{row}">
<div class="operationClass">
@@ -294,6 +298,7 @@
<el-cascader
ref="dialogCascaderUser"
key="cascaderKey"
+ filterable
:options="StuOrgArr"
:props="defaultProps"
class="userDialogVisibleInput"
@@ -305,6 +310,7 @@
<el-form-item label="鍏宠仈瑙掕壊">
<el-select
v-model="dialogFormUser.isrole"
+ filterable
style="width: 220px"
placeholder="璇烽�夋嫨"
class="userDialogVisibleInput"
@@ -488,7 +494,7 @@
DeleteRole, RoleAssociationRight,
RoleAssociationUser,
RoleSearch, RoleTypeAdd,
- RoleTypeDelete, RoleTypeSearch, SaveRoleAssoctUser, SaveUserAssoctRight, UserOrganization
+ RoleTypeDelete, RoleTypeSearch, RoleTypeSelect, SaveRoleAssoctUser, SaveUserAssoctRight, UserOrganization
} from '@/api/jcsz'
import { getCookie } from '@/utils/auth'
import $ from 'jquery'
@@ -529,7 +535,7 @@
prop: 'lm_date', // 鎺掑簭瀛楁
order: 'desc', // 鎺掑簭瀛楁
page: 1, // 绗嚑椤�
- rows: 10 // 姣忛〉澶氬皯鏉�
+ rows: 20 // 姣忛〉澶氬皯鏉�
},
total: 10,
RoleTypeCodeArr: [], // 瑙掕壊绫诲瀷缂栫爜鏁扮粍
@@ -641,13 +647,7 @@
})
},
async getRoleTypeSearch2() { // 鎼滅储灞曠ず鐨勫唴瀹�
- const data = {
- page: 1,
- rows: 1000000,
- prop: 'roletype_code',
- order: 'desc'
- }
- const res = await RoleTypeSearch(data)
+ const res = await RoleTypeSelect()
this.RoleTypeCodeArr2 = res.data
},
settingButton() {
@@ -765,13 +765,12 @@
AddUpdateRole(data).then(res => {
if (res.code === '200') {
this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
+ this.dialogVisible = false
this.getRoleSearch()
} else {
this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
}
})
-
- this.dialogVisible = false
}
})
},
@@ -975,7 +974,7 @@
this.$nextTick(() => {
$('input:checkbox').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
})
- }, 1)
+ }, 10)
this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
}
// 3.绗笁绉嶆儏鍐礟C鏈�変腑锛孉PP宸查�変腑
@@ -986,7 +985,7 @@
this.$nextTick(() => {
$('input:checkbox').eq(1).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
})
- }, 1)
+ }, 10)
this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightAPPArr[0].code
}
// 4.绗洓绉嶆儏鍐礟C宸查�変腑锛孉PP宸查�変腑
@@ -1000,7 +999,7 @@
$('input:checkbox').eq(0).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
$('input:checkbox').eq(1).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
})
- }, 1)
+ }, 10)
this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
}
this.dialogFormRight.rightOperationArr.push({
@@ -1043,8 +1042,12 @@
}
})
this.$nextTick(() => {
- this.$refs.rightPCRef.setCheckedKeys(this.dialogFormRight.rightPCArrSelected)
- this.$refs.rightAPPRef.setCheckedKeys(this.dialogFormRight.rightAPPArrSelected)
+ if (this.$refs.rightPCRef) {
+ this.$refs.rightPCRef.setCheckedKeys(this.dialogFormRight.rightPCArrSelected)
+ }
+ if (this.$refs.rightAPPRef) {
+ this.$refs.rightAPPRef.setCheckedKeys(this.dialogFormRight.rightAPPArrSelected)
+ }
})
},
// 鍒嗛厤鏉冮檺鍏抽棴浜嬩欢
@@ -1054,8 +1057,12 @@
this.dialogFormRight.rightAPPArr = []
this.dialogFormRight.rightAPPArrSelected = []
this.dialogFormRight.rightOperationArr = []
- this.$refs.rightPCRef.setCheckedKeys([])
- this.$refs.rightAPPRef.setCheckedKeys([])
+ if (this.$refs.rightPCRef) {
+ this.$refs.rightPCRef.setCheckedKeys([])
+ }
+ if (this.$refs.rightAPPRef) {
+ this.$refs.rightAPPRef.setCheckedKeys([])
+ }
},
// 鏉冮檺瀵硅瘽妗嗗彇娑堜簨浠�
rightDialogVisibleCancel() {
@@ -1071,7 +1078,7 @@
const children = []
let flag = false // 琛ㄧずchildren閲屾湁鍊紁ush杩涘幓浜�
item.children.forEach(it => {
- if (this.dialogFormRight.rightPCArrSelected.includes(it.code)) {
+ if (this.dialogFormRight.rightPCArrSelected.includes(it.code) || this.dialogFormRight.rightPCArrSelected.includes('PC')) {
flag = true
children.push(
{ code: it.code, name: it.name, flag: 'Y' }
@@ -1090,7 +1097,7 @@
const children = []
let flag = false // 琛ㄧずchildren閲屾湁鍊紁ush杩涘幓浜�
item.children.forEach(it => {
- if (this.dialogFormRight.rightAPPArrSelected.includes(it.code)) {
+ if (this.dialogFormRight.rightAPPArrSelected.includes(it.code) || this.dialogFormRight.rightAPPArrSelected.includes('APP')) {
flag = true
children.push(
{ code: it.code, name: it.name, flag: 'Y' }
@@ -1393,7 +1400,8 @@
}
::v-deep .el-input__inner {
- height: 30px
+ height: 30px;
+ line-height:30px;
}
::v-deep .el-table .caret-wrapper {
--
Gitblit v1.9.3