From b86d97b09d1aca57291004c1a2bc014f90702918 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 26 一月 2024 16:14:39 +0800
Subject: [PATCH] 提交代码
---
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 393 +++++++++++++++++++++++++++++++++++--------------------
1 files changed, 249 insertions(+), 144 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 5be48b7..982fa57 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -3,75 +3,99 @@
<div v-if="this.crudArrayFlag" class="app" style="display: flex;flex-wrap: wrap; display: inline-block">
<el-button-group>
<!--鏂板-->
- <el-button
- v-if="attrEditVisible == false && attrFlagChiledren==false && editOpenFlag && (!checkStatus || crudLCStatus=='Editing' )"
- icon="el-icon-plus" plain size="small" type="primary" @click="busineHandle">娣诲姞 {{ msg }}
+ <span v-if="permissionList.busineStatus">
+ <el-button
+ v-if="attrEditVisible == false && attrFlagChiledren==false && editOpenFlag && (!checkStatus || crudLCStatus=='Editing' )"
+ icon="el-icon-plus" plain size="small" type="primary" @click="busineHandle">娣诲姞 {{ msg }}
</el-button>
+ </span>
<!-- 鍏ㄥ睆缂栬緫-->
- <el-button
- v-if=" attrEditVisible == false && attrFlagChiledren==false && editOpenFlag&&(!checkStatus || crudLCStatus=='Editing')"
- icon="el-icon-full-screen" size="small" @click="fullscreenHandle">鍏ㄥ睆缂栬緫
+ <span v-if="permissionList.fullscreenStatus">
+ <el-button
+ v-if=" attrEditVisible == false && attrFlagChiledren==false && editOpenFlag&&(!checkStatus || crudLCStatus=='Editing')"
+ icon="el-icon-full-screen" size="small" @click="fullscreenHandle">鍏ㄥ睆缂栬緫
</el-button>
- <!-- 楠岃瘉瑙勫垯-->
+ </span>
+ <span v-if="permissionList.ruleStatus">
+ <!-- 楠岃瘉瑙勫垯-->
<el-button v-if="(!checkStatus || crudLCStatus=='Editing' )&& editOpenFlag" icon="el-icon-info" size="small"
@click="ruleAddHandler">楠岃瘉瑙勫垯
</el-button>
- <!-- 灞炴�у垎缁�-->
+ </span>
+ <span v-if="permissionList.attrStatus">
+ <!-- 灞炴�у垎缁�-->
<el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-menu" size="small"
@click="attrVisibleHandle">灞炴�у垎缁�
</el-button>
+ </span>
</el-button-group>
<el-button-group>
- <!-- 淇濆瓨-->
- <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-check" plain size="small"
+ <span v-if="permissionList.saveStatus">
+ <!-- 淇濆瓨-->
+ <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-check" plain
+ size="small"
type="success" @click.prevent="addsHandler">淇濆瓨
</el-button>
+ </span>
<!-- 棰勮鎺掑簭-->
- <el-button icon="el-icon-arrow-down" size="small" @click="orderHandle">棰勮鎺掑簭</el-button>
- <!-- 鍒犻櫎-->
+ <el-button v-if="permissionList.orderStatus" icon="el-icon-arrow-down" size="small" @click="orderHandle">棰勮鎺掑簭
+ </el-button>
+ <span v-if="permissionList.removeStatus">
+ <!-- 鍒犻櫎-->
<el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-delete" size="small"
@click="CrudRemove">鍒犻櫎
</el-button>
+ </span>
<!-- 閲嶇疆-->
- <el-button icon="el-icon-refresh-right" size="small" @click="reset">閲嶇疆</el-button>
+ <el-button v-if="permissionList.resetStatus" icon="el-icon-refresh-right" size="small" @click="resetHandler">
+ 閲嶇疆
+ </el-button>
</el-button-group>
<el-button-group>
- <!--鏂板-->
- <!-- 鍒嗙被娉ㄥ叆-->
+ <span v-if="permissionList.injectStatus"><!-- 鍒嗙被娉ㄥ叆-->
<el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-magic-stick"
size="small" @click="injectBtn">鍒嗙被娉ㄥ叆
- </el-button>
- <!-- 缁勫悎瑙勫垯-->
+ </el-button></span>
+ <span v-if="permissionList.isShowStatus"> <!-- 缁勫悎瑙勫垯-->
<el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-film" size="small"
@click="isShowHandler">缁勫悎瑙勫垯
- </el-button>
- <!-- 鏋氫妇娉ㄥ叆-->
+ </el-button></span>
+ <span v-if="permissionList.enumStatus"> <!-- 鏋氫妇娉ㄥ叆-->
<el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-c-scale-to-original"
- size="small" @click="enmuVisHandle">鏋氫妇娉ㄥ叆
- </el-button>
- <!-- 绾ц仈灞炴��-->
+ size="small" @click="enumVisHandle">鏋氫妇娉ㄥ叆
+ </el-button></span>
+
+ <span v-if="permissionList.cascadStatus">
+ <!-- 绾ц仈灞炴��-->
<el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-coin" size="small"
@click="CascadeHandle">绾ц仈灞炴��
</el-button>
+ </span>
</el-button-group>
<el-button-group>
<!-- 鍚屾鍒板叾浠栨ā鏉�-->
- <el-button icon="el-icon-share" size="small" @click="syncHandle">鍚屾鍒板叾浠栨ā鏉�</el-button>
+ <el-button v-if="permissionList.syncStatus" icon="el-icon-share" size="small" @click="syncHandle">鍚屾鍒板叾浠栨ā鏉�
+ </el-button>
</el-button-group>
<el-button-group>
<!-- 缂栫爜鐢宠棰勮-->
- <el-button icon="el-icon-view" size="small" style="" @click="applicationHandle">缂栫爜鐢宠棰勮</el-button>
+ <el-button v-if="permissionList.applicationStatus" icon="el-icon-view" size="small" style=""
+ @click="applicationHandle">缂栫爜鐢宠棰勮
+ </el-button>
</el-button-group>
<!-- 鏄惁寮�鍚紪杈� -->
<el-button-group>
- <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && !editOpenFlag && attrEditVisible == false && attrFlagChiledren==false" icon="el-icon-view" plain
- size="small"
- @click="editOpen">寮�鍚紪杈�
+ <el-button
+ v-if="(!checkStatus|| crudLCStatus=='Editing') && !editOpenFlag && attrEditVisible == false && attrFlagChiledren==false"
+ icon="el-icon-view" plain
+ size="small"
+ @click="editOpen">寮�鍚紪杈�
</el-button>
- <el-select v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="selectvalue" placeholder="璇烽�夋嫨"
+ <el-select v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="selectvalue"
+ placeholder="璇烽�夋嫨"
size="small">
<el-option
v-for="item in selectoptions"
@@ -252,8 +276,8 @@
</el-dialog>
<!-- 鍏ㄥ睆缂栬緫-->
<el-dialog :before-close="escEdit" :visible.sync="attrEditVisible" append-to-body fullscreen="true">
- <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :crudArrayFlag="this.crudArrayFlag"
- :editOpenFlag="editOpenFlag" :editStyleFlag="editStyleFlag"
+ <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :btnAuthList="btnAuthList"
+ :crudArrayFlag="this.crudArrayFlag" :editOpenFlag="editOpenFlag" :editStyleFlag="editStyleFlag"
@editCloseChildren="editClose"></attrCrud>
</el-dialog>
<!-- 缁勫悎瑙勫垯-->
@@ -288,7 +312,6 @@
<el-button size="small" type="primary" @click="addVisible=false">鍙栨秷</el-button>
</div>
</el-dialog>
-
<!-- 鍙傜収閰嶇疆-->
<refer-config-dialog
:display="referConfigVisble"
@@ -297,11 +320,14 @@
></refer-config-dialog>
</div>
+
<el-table v-if="this.crudArrayFlag"
ref="referAttrCrud"
v-loading="loading"
:data="ProData"
- :height="this.editStyleFlag? 800 : 343"
+ :header-cell-style="{background:'#FAFAFA',color:'#505050'}"
+ :height="this.tableHeight"
+ border
style="width: 100%"
@select="selectHandle"
@cell-click="handleCellClicks"
@@ -309,13 +335,13 @@
@row-click="rowClick"
>
<el-table-column
- fixed
+ :fixed="!editStyleFlag ? 'left' : undefined"
type="selection" width="55">
</el-table-column>
<!--<el-table-column fixed label="搴忓彿" type="index" width="55"></el-table-column>-->
<el-table-column v-for="(item,index) in this.option.column" v-if="item.edit !='referName'"
:key="item.id"
- :fixed="item.fixed"
+ :fixed="!editStyleFlag ? item.fixed : undefined"
:formatter="formAttr"
:label="item.label"
:prop="item.prop"
@@ -325,18 +351,23 @@
align="center"
>
<template slot-scope="{ row }">
- <el-input v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )"
- :ref="'input' + row.oid"
- v-show="!AddCellFlag"
- v-model="row[item.prop]"
- @blur="saveRows(row)"
- ></el-input>
- <el-input-number v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]"
+ <el-input
+ v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )"
+ v-show="!AddCellFlag"
+ :ref="'input' + row.oid"
+ v-model="row[item.prop]"
+ @blur="saveRows(row)"
+ ></el-input>
+ <el-input-number v-if="editingRows === row && editShows== item.prop && item.edit == 'number'"
+ v-show="!AddCellFlag"
+ v-model="row[item.prop]"
:style="{width:(item.width-10)+'px'}"
controls-position="right"
size="small" @blur="saveRows"></el-input-number>
- <el-select v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " slot="prepend" v-model="row[item.prop]" allow-create default-first-option
- filterable
+ <el-select v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " v-show="!AddCellFlag"
+ slot="prepend"
+ v-model="row[item.prop]" :clearable="true" allow-create
+ default-first-option filterable
@blur="selectChangeHandler(item.editConfig,index)">
<el-option
v-for="optionItem in item.data"
@@ -374,6 +405,7 @@
import {getList} from "@/api/refer/table";
import func from "@/util/func";
import {getCurrentInstance} from "vue";
+import {mapGetters} from "vuex";
export default {
name: "attrCrud .vue",
@@ -420,6 +452,9 @@
type: Boolean,
default: false
},
+ btnAuthList: {
+ type: Array
+ }
},
watch: {
crudOid: {
@@ -431,7 +466,7 @@
},
crudArrayFlag: {
handler(newval, oldval) {
- console.log('crudArrayFlag', newval)
+ // console.log('crudArrayFlag', newval)
}
},
crudArray: {
@@ -455,16 +490,6 @@
}
}
},
- // editingRows:{
- // handler(newval,oldval){
- // if(newval){
- // const inputElement = document.querySelector(`#inputRef${newval.oid}`);
- // if (inputElement) {
- // inputElement.focus();
- // };
- // }
- // }
- // },
ProData: {
handler(newval, oldval) {
if (newval) {
@@ -485,7 +510,7 @@
},
editOpenFlag: {
handler(newval, oldval) {
- console.log('editOpenFlag', newval)
+ // console.log('editOpenFlag', newval)
},
deep: true,
immediate: true
@@ -494,8 +519,10 @@
},
data() {
return {
+ //琛ㄦ牸楂樺害
+ dynamicHeight: '',
// 淇濆瓨鍗曞厓鏍肩姸鎬�
- AddCellFlag:false,
+ AddCellFlag: false,
//鍏ㄥ睆缂栬緫楂樺害鐘舵��
editStyleFlag: false,
loading: false,
@@ -642,6 +669,7 @@
addBtn: false,
header: false,
align: 'center',
+ columnBtn: false,
menuAlign: 'center',
column: [{
label: '',
@@ -856,6 +884,7 @@
{
label: "鍙傜収閰嶇疆",
prop: "referConfig",
+ width: 105
},
{
label: "绾ц仈鏌ヨ灞炴��",
@@ -900,7 +929,7 @@
{
label: "鍙栧�艰寖鍥�",
prop: "valueArea",
- },
+ }
]
},
// 瀛樺偍琛ㄦ牸鏁版嵁
@@ -1082,6 +1111,10 @@
indexClassName: "搴忓彿",
indexLabelClassName: '搴忓彿',
index: true,
+ indexFixed: false,
+ selectionFixed: false,
+ columnBtn: false,
+ refreshBtn: false,
border: true,
addBtn: false,
menu: false,
@@ -1091,12 +1124,12 @@
{
label: "灞炴�ц嫳鏂囧悕绉�",
prop: "id",
- width:100,
+ width: 130,
},
{
label: "灞炴�т腑鏂囧悕绉�",
prop: "name",
- width:100,
+ width: 100,
},
{
label: "闀垮害",
@@ -1177,6 +1210,7 @@
List: [],
option: {
index: false,
+ columnBtn: false,
border: true,
editBtn: false,
selection: true,
@@ -1527,6 +1561,25 @@
}
},
computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ busineStatus: this.vaildData(this.btnAuthList.attr_add, false),
+ fullscreenStatus: this.vaildData(this.btnAuthList.attr_view_edit, false),
+ ruleStatus: this.vaildData(this.btnAuthList.attr_rule, false),
+ attrStatus: this.vaildData(this.btnAuthList.attr_group, false),
+ saveStatus: this.vaildData(this.btnAuthList.attr_save, false),
+ resetStatus: this.vaildData(this.btnAuthList.attr_reset, false),
+ injectStatus: this.vaildData(this.btnAuthList.attr_inject, false),
+ isShowStatus: this.vaildData(this.btnAuthList.attr_formrule, false),
+ enumStatus: this.vaildData(this.btnAuthList.attr_enum, false),
+ cascadStatus: this.vaildData(this.btnAuthList.attr_parentcode, false),
+ syncStatus: this.vaildData(this.btnAuthList.attr_sync, false),
+ applicationStatus: this.vaildData(this.btnAuthList.attr_application, false),
+ orderStatus: this.vaildData(this.btnAuthList.attr_sort, false),
+ removeStatus: this.vaildData(this.btnAuthList.attr_delete, false),
+ }
+ },
attrOids() {
let oids = [];
this.attrSelectList.forEach(ele => {
@@ -1541,6 +1594,13 @@
});
return oids.join(",");
},
+ tableHeight() {
+ if (this.editStyleFlag) {
+ return '800px'
+ } else {
+ return 'calc(100vh - 565px)'
+ }
+ }
},
mounted() {
},
@@ -1664,7 +1724,10 @@
attrTableWidth: 120,
ts: ""
})
- this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList)))
+ // 灏嗚嫳鏂囩紪鍙疯浆鎹负灏忓啓
+ let {id, ...res} = this.busineAddList;
+ this.busineAddList = {id: id.toLowerCase(), ...res};
+ this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList)));
}
})
this.addVisible = false;
@@ -1754,7 +1817,6 @@
addsHandler(event) {
this.$refs.referAttrCrud.sort("orderNum");
var ischeck = true;
- console.log('ProData',this.ProData)
this.ProData.forEach((item, index) => {
if ((item.requireFlag && item.requireFlag.toString() == 'true') && (item.readOnlyFlag && item.readOnlyFlag.toString() == 'true')) {
this.$message.warning(item.name + "(" + item.id + ")蹇呰緭鐨勫睘鎬т笉鑳芥槸鍙");
@@ -1799,11 +1861,11 @@
// 鏂板嚱鏁扮敤浜庢墽琛宐atchAddSave鏂规硶
const executeBatchAddSave = () => {
batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => {
- this.$message.success('淇濆瓨鎴愬姛')
this.editOpenFlag = false;
+ this.$message.success('淇濆瓨鎴愬姛')
// 璋冪敤鐖剁粍浠朵慨鏀规寜閽姸鎬�
this.$emit('editCloseChildren')
- this.AddCellFlag=true;
+ this.AddCellFlag = true;
}).catch(() => {
this.$message.warning('淇濆瓨澶辫触锛岃鏌ョ湅鎺у埗鍙拌緭鍑猴紒')
});
@@ -1813,7 +1875,6 @@
},
//琛ㄦ牸琛岀紪杈�
handleCellClicks(row, column) {
- console.log(row,column)
if (this.editOpenFlag) {
this.editingRows = row;
this.editShows = column.property;
@@ -1826,59 +1887,65 @@
input.focus();
}
});
- if (column.property == 'referConfig') {
- this.referConfigVisble = true;
- this.referConfigOption = {
- referConfig: this.CurrentCell.referConfig || '',
- }
- if (this.CurrentCell.referConfig == '') {
+ const columnActions = {
+ referConfig: () => {
+ this.referConfigVisble = true;
this.referConfigOption = {
- referConfig: '',
+ referConfig: this.CurrentCell.referConfig || '',
+ }
+ if (this.CurrentCell.referConfig == '') {
+ this.referConfigOption = {
+ referConfig: '',
+ }
+ }
+ },
+ classifyInvokeText: () => {
+ this.injectVisible = true;
+ if (this.CurrentCell.classifyInvokeAttr != '') {
+ this.injectOption = {
+ classifyInvokeAttr: this.CurrentCell.classifyInvokeAttr,
+ classifyInvokeAttrName: this.CurrentCell.classifyInvokeAttrName,
+ classifyInvokeEditFlag: this.CurrentCell.classifyInvokeEditFlag,
+ classifyInvokeLevel: this.CurrentCell.classifyInvokeLevel == 'min' ? 'min' : 'max',
+ classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel
+ };
+ }
+ },
+ componentRule: () => {
+ this.isShowformulaEdit = true;
+ },
+ enumString: () => {
+ this.enumVisible = true;
+ this.tableData = [];
+ if (this.CurrentCell.enumString != "") {
+ this.tableData = JSON.parse(this.CurrentCell.enumString)
+ return;
+ }
+ },
+ parentCode: () => {
+ gridCodeClassifyTemplateAttr({
+ 'conditionMap[classifyTemplateOid]': this.Formlist[0].oid,
+ 'conditionMap[oid_notequal]': this.CurrentCell.oid,
+ limit: -1
+ }).then(res => {
+ this.CascadeData = res.data.data;
+ })
+ this.CascadeVisible = true;
+ },
+ verifyRule: () => {
+ this.RulesForm.expressionTextt = this.CurrentCell.verifyRule;
+ this.rulesVisible = true;
+ },
+ attributeGroup: () => {
+ this.attrVisible = true;
+ if (this.CurrentCell.attributeGroup !== '') {
+ this.attrModel = this.CurrentCell.attributeGroup
}
}
- // this.$refs.referConfigFormDialog.onloadAttrData();
- } else if (column.property == 'classifyInvokeText') {
- this.injectVisible = true;
- if (this.CurrentCell.classifyInvokeAttr != '') {
- this.injectOption = {
- classifyInvokeAttr: this.CurrentCell.classifyInvokeAttr,
- classifyInvokeAttrName: this.CurrentCell.classifyInvokeAttrName,
- classifyInvokeEditFlag: this.CurrentCell.classifyInvokeEditFlag,
- classifyInvokeLevel: this.CurrentCell.classifyInvokeLevel == 'min' ? 'min' : 'max',
- classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel
- };
- } else {
- // this.injectHandleReset();
- }
- } else if (column.property == 'componentRule') {
- if (this.CurrentCell) {
- // this.CurrentCell.componentRule = this.componentRuleText;
- }
- this.isShowformulaEdit = true;
- } else if (column.property == 'enumString') {
- this.enumVisible = true;
- this.tableData=[];
- if (this.CurrentCell.enumString != "") {
- this.tableData = JSON.parse(this.CurrentCell.enumString)
- return
- }
- } else if (column.property == 'parentCode') {
- gridCodeClassifyTemplateAttr({
- 'conditionMap[classifyTemplateOid]': this.Formlist[0].oid,
- 'conditionMap[oid_notequal]': this.CurrentCell.oid,
- limit: -1
- }).then(res => {
- this.CascadeData = res.data.data;
- })
- this.CascadeVisible = true;
- } else if (column.property == 'verifyRule') {
- this.RulesForm.expressionTextt = this.CurrentCell.verifyRule;
- this.rulesVisible = true;
- } else if (column.property == 'attributeGroup') {
- this.attrVisible = true;
- if (this.CurrentCell.attributeGroup !== '') {
- this.attrModel = this.CurrentCell.attributeGroup
- }
+ };
+
+ if (column.property in columnActions) {
+ columnActions[column.property]();
}
}
},
@@ -1907,7 +1974,7 @@
this.tableData.splice(row.$index, 1)
},
//鏋氫妇娉ㄥ叆鎸夐挳
- enmuVisHandle() {
+ enumVisHandle() {
if (this.attrSelectList.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃ā鏉垮睘鎬�')
} else if (this.attrSelectList < 1) {
@@ -2006,54 +2073,67 @@
const regex = new RegExp(this.rulesData.ruleRowBds);
if (regex.test(this.RulesForm.TestContent)) {
this.$message.success('鏍¢獙鎴愬姛')
+ } else {
+ this.$message.error('鏍¢獙澶辫触')
}
},
//鐐瑰嚮鍒嗙被娉ㄥ叆鎸夐挳
injectBtn() {
if (this.attrSelectList.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃ā鏉挎暟鎹�')
- } else if (this.attrSelectList.length < 1) {
+ return;
+ }
+ if (this.attrSelectList.length < 1) {
this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉挎暟鎹�')
- } else if (this.attrSelectList.length === 1) {
+ return;
+ ;
+ }
+ if (this.attrSelectList.length === 1) {
this.injectVisible = true;
+ return;
}
},
//鍒嗙被娉ㄥ叆淇濆瓨
injectAddHandle() {
- // 瀹氫箟灞曠ず绫诲瀷
- let data = {
- "娉ㄥ叆绫诲瀷": this.injectOption.classifyInvokeAttr,
- "娉ㄥ叆绫诲瀷鍚嶇О": this.injectOption.classifyInvokeAttrName,
- "灞傜骇璁剧疆": this.injectOption.classifyInvokeLevel == 'max' ? this.injectOption.classifyNumber : 'min',
- "鏄惁鍙慨鏀�": this.injectOption.classifyInvokeEditFlag
- }
- //鍕鹃�夋搷浣�
+ const {
+ classifyInvokeAttr,
+ classifyInvokeAttrName,
+ classifyInvokeLevel,
+ classifyInvokeEditFlag,
+ classifyNumber
+ } = this.injectOption;
+
+ const data = {
+ "娉ㄥ叆绫诲瀷": classifyInvokeAttr,
+ "娉ㄥ叆绫诲瀷鍚嶇О": classifyInvokeAttrName,
+ "灞傜骇璁剧疆": classifyInvokeLevel === 'max' ? classifyNumber : 'min',
+ "鏄惁鍙慨鏀�": classifyInvokeEditFlag
+ };
for (const key in this.injectOption) {
this.attrSelectList[0][key] = this.injectOption[key];
- //濡傛灉鏄寚瀹氬眰璧嬪�间负鏁板瓧
- if (this.injectOption.classifyInvokeLevel !== 'min') {
- this.attrSelectList[0].classifyInvokeLevel = this.injectOption.classifyNumber
+ if (classifyInvokeLevel !== 'min') {
+ this.attrSelectList[0].classifyInvokeLevel = classifyNumber;
} else {
- this.attrSelectList[0].classifyInvokeLevel = 'min'
+ this.attrSelectList[0].classifyInvokeLevel = 'min';
}
- this.$set(this.attrSelectList[0], 'classifyInvokeText', data)
+ this.$set(this.attrSelectList[0], 'classifyInvokeText', data);
}
- // this.injectHandleReset()
- if (this.injectOption.classifyInvokeLevel !== 'min') {
- this.injectOption.classifyInvokeLevel = this.injectOption.classifyNumber;
+ if (classifyInvokeLevel !== 'min') {
+ this.injectOption.classifyInvokeLevel = classifyNumber;
} else {
this.injectOption.classifyNumber = 0;
}
+ // console.log(this.ProData)
this.injectVisible = false;
-
},
//鍒嗙被娉ㄥ叆娓呯┖
injectHandleReset() {
- this.$set(this.CurrentCell, 'classifyInvokeText', '')
- this.$set(this.CurrentCell, 'classifyInvokeAttr:', '')
- this.$set(this.CurrentCell, 'classitwInvokeAttrName', '')
- this.$set(this.CurrentCell, 'classifyInvokeEditFlag', 'false')
- this.$set(this.CurrentCell, 'classifyInvokeLevel', 'none')
+ this.CurrentCell.classifyInvokeText = null;
+ this.CurrentCell.classifyInvokeAttr = '';
+ this.CurrentCell.classifyInvokeAttrName = '';
+ this.CurrentCell.classifyInvokeEditFlag = '';
+ this.CurrentCell.classifyInvokeLevel = null;
+ // console.log(this.ProData)
this.injectVisible = false;
},
// 鍒嗙被娉ㄥ叆鍙栨秷
@@ -2074,7 +2154,7 @@
})
},
//琛ㄦ牸閲嶇疆
- reset() {
+ resetHandler() {
this.CrudRend()
},
//鍚屾鍒板叾浠栨ā鏉�
@@ -2111,7 +2191,7 @@
this.editStyleFlag = true;
this.attrEditVisible = true;
this.attrFlag = true;
- this.AddCellFlag=true;
+ this.AddCellFlag = true;
}
},
@@ -2125,7 +2205,7 @@
updataFormlaContent(val) {
if (this.CurrentCell) {
this.$set(this.CurrentCell, 'componentRule', val.replace(/"/g, ''))
- this.componentRuleText= this.CurrentCell.componentRule
+ this.componentRuleText = this.CurrentCell.componentRule
} else {
this.$set(this.attrRow, 'componentRule', val.replace(/"/g, ''))
}
@@ -2142,12 +2222,12 @@
},
// 鎺掑簭 this.AddCellFlag=false;
sortChange(val) {
- console.log(val)
+ // console.log(val)
},
//寮�鍚紪杈�
editOpen() {
this.editOpenFlag = true;
- this.AddCellFlag=false;
+ this.AddCellFlag = false;
},
//瀹氫箟涓�涓叧闂紪杈戠殑鏂规硶渚涘瓙缁勪欢浣跨敤
editClose() {
@@ -2164,6 +2244,31 @@
</script>
<style lang="scss" scoped>
+//鍥哄畾鍒楅珮搴�
+/deep/ .el-table__fixed {
+ height: calc(100vh - 584px) !important;
+}
+
+///deep/ .el-table__fixed[v-if='editStyleFlag'] {
+// height: calc(100vh - 152px)!important; // 缂栬緫鐘舵�佷笅鐨勯珮搴�
+//}
+// 婊氬姩鏉℃牱寮忎慨鏀�
+// 婊氬姩鏉$殑瀹藉害
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
+ height: 15px; // 绾靛悜婊氬姩鏉� 蹇呭啓
+ background: white;
+ border: white;
+ width: 10px;
+
+}
+
+// 婊氬姩鏉$殑婊戝潡
+/deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
+ background-color: #ececec;
+ border-radius: 20px;
+ border: #ececec;
+}
+
.app {
/deep/ .el-button {
//margin: 0 10px 10px 0;
--
Gitblit v1.9.3