From 32ec691abab0c837f34ce2c4908a40a10b9dbec7 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 29 七月 2022 17:20:15 +0800
Subject: [PATCH] 1.优化项目2.综合看板静态页面初步实现
---
src/views/jcsz/jsqd.vue | 95 +++++++++++++++++++++++------------------------
1 files changed, 46 insertions(+), 49 deletions(-)
diff --git a/src/views/jcsz/jsqd.vue b/src/views/jcsz/jsqd.vue
index bfb4baa..5bcb437 100644
--- a/src/views/jcsz/jsqd.vue
+++ b/src/views/jcsz/jsqd.vue
@@ -47,14 +47,13 @@
<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>-->
+ <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>
</div>
<el-divider />
<div class="elTableDiv">
<el-table
:data="tableData"
border
-
stripe
:height="tableHeight+'px'"
:style="{width: 100+'%',height:tableHeight+'px'}"
@@ -72,24 +71,29 @@
prop="RowNum"
width="50"
label="搴忓彿"
+ fixed
/>
<el-table-column
prop="role_code"
label="瑙掕壊缂栫爜"
sortable="custom"
+ min-width="110"
/>
<el-table-column
prop="role_name"
label="瑙掕壊鍚嶇О"
sortable="custom"
+ min-width="110"
/>
<el-table-column
prop="roletype_name"
label="瑙掕壊绫诲瀷"
sortable="custom"
+ min-width="110"
/>
<el-table-column
prop="description"
+ min-width="160"
label="瑙掕壊鎻忚堪"
sortable="custom"
/>
@@ -97,10 +101,12 @@
prop="lm_user"
label="鍒涘缓浜哄憳"
sortable="custom"
+ width="110"
/>
<el-table-column
prop="lm_date"
label="鍒涘缓鏃堕棿"
+ min-width="160"
sortable="custom"
/>
<el-table-column
@@ -111,7 +117,7 @@
>
<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==='N'" class="el-icon-user-solid" style="color: rgb(180 ,181, 185)" @click="userClick(row)" />
</template>
</el-table-column>
<el-table-column
@@ -122,11 +128,12 @@
>
<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"
>
<template slot-scope="{row}">
<div class="operationClass">
@@ -497,11 +504,16 @@
</div>
</span>
</el-dialog>
+
+ <!--瀵煎叆缁勪欢-->
+ <import-picker ref="importPickerFunc" :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,
@@ -517,7 +529,7 @@
export default {
name: 'JSQD',
components: {
- Pagination
+ Pagination, ImportPicker
},
data() {
const validateName = (rule, value, callback) => {
@@ -531,13 +543,6 @@
}
}
}
- // const validateTypeCode = (rule, value, callback) => {
- // if (!value) {
- // return callback(new Error('璇烽�夋嫨涓婄骇'))
- // } else {
- // callback()
- // }
- // }
return {
isFullscreen: false,
mainHeight: 0,
@@ -635,7 +640,18 @@
value: 'code'
},
PCTrue: false, // 鏄惁灞曠ず
- APPTrue: false// 鏄惁灞曠ず
+ APPTrue: false, // 鏄惁灞曠ず
+
+ title_value: '鏁版嵁瀵煎叆 / 瑙掕壊娓呭崟',
+ code: '1',
+ shows: false
+ }
+ },
+ watch: {
+ shows() {
+ if (!this.shows) {
+ this.getRoleSearch()
+ }
}
},
created() {
@@ -700,10 +716,6 @@
this.formSetting.order = order
this.formSetting.prop = prop
this.getRoleTypeSearch()
- },
-
- upload() {
-
},
// 鏌ヨ
search() {
@@ -975,47 +987,24 @@
type: ''
}
const { data: res } = await RoleAssociationRight(data)// 鎺ュ彛鑾峰彇鏁版嵁
- // '0'鏄剧ず '1' 涓嶆樉绀�
+
this.dialogFormRight.rightPCArr = res[0][0].is_delete === '0' ? res[0] : []
this.dialogFormRight.rightAPPArr = res[1][0].is_delete === '0' ? res[1] : []
this.PCTrue = res[0][0].is_delete === '0'
this.APPTrue = res[1][0].is_delete === '0'
-
+ // '0'鏄剧ず '1' 涓嶆樉绀� 杩囨护鍑虹浉瀵瑰簲鐨勮彍鍗�
if (this.PCTrue) {
- this.dialogFormRight.rightPCArr[0].children.forEach((item, index) => {
- if (item.is_delete === '1') {
- this.dialogFormRight.rightPCArr[0].children.splice(index, 1)
- } else {
- if (item.children.length > 0 && item.children) {
- item.children.forEach((it, ind) => {
- if (it.is_delete === '1') {
- item.children.splice(ind, 1)
- }
- })
- }
- if (item.children.length === 0) {
- this.dialogFormRight.rightPCArr[0].children.splice(index, 1)
- }
- }
+ this.dialogFormRight.rightPCArr[0].children = this.dialogFormRight.rightPCArr[0].children.filter(item => item.is_delete === '0')
+ this.dialogFormRight.rightPCArr[0].children.forEach(item => {
+ item.children = item.children.filter(it => it.is_delete === '0')
})
}
+
if (this.APPTrue) {
- this.dialogFormRight.rightAPPArr[0].children.forEach((item, index) => {
- if (item.is_delete === '1') {
- this.dialogFormRight.rightAPPArr[0].children.splice(index, 1)
- } else {
- if (item.children.length > 0 && item.children) {
- item.children.forEach((it, ind) => {
- if (it.is_delete === '1') {
- item.children.splice(ind, 1)
- }
- })
- }
- if (item.children.length === 0) {
- this.dialogFormRight.rightAPPArr[0].children.splice(index, 1)
- }
- }
+ this.dialogFormRight.rightAPPArr[0].children = this.dialogFormRight.rightAPPArr[0].children.filter(item => item.is_delete === '0')
+ this.dialogFormRight.rightAPPArr[0].children.forEach(item => {
+ item.children = item.children.filter(it => it.is_delete === '0')
})
}
@@ -1446,6 +1435,14 @@
this.dialogFormRight.rightAPPArrSelected = ['APP']
}
}
+ },
+ // 瀵煎叆鎸夐挳
+ upload() {
+ this.shows = true
+ this.$refs.importPickerFunc.newDataFunc()
+ },
+ colos() {
+ this.shows = false
}
}
--
Gitblit v1.9.3