初始化动态配置

20231126-yw
yuanwei 1 year ago
parent 8862d27529
commit faa26ca513

@ -5,7 +5,7 @@
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" size="mini" label-width="125px" v-show="showSearch">
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input'" :label="item.columnDesc+`:`" :key="item.id">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
@ -14,7 +14,7 @@
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select'" :label="item.columnDesc+`:`">
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@ -27,7 +27,7 @@
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer'" :label="item.columnDesc+`:`">
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
@ -44,7 +44,7 @@
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker'" :label="item.columnDesc+`:`">
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
v-model="dateRange"
:style="`width:${item.width+'px'}`"
@ -57,7 +57,7 @@
:default-time="['00:00:00', '23:59:59']"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date'" :label="item.columnDesc+`:`">
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
@ -176,7 +176,7 @@
>
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id'"
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
@ -185,7 +185,7 @@
:selectable="executeFuc"></el-table-column>
<el-table-column
v-if="item.columnType == 'radio'"
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
@ -198,7 +198,7 @@
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber'"
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
@ -211,7 +211,7 @@
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag'"
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
@ -226,7 +226,7 @@
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button'"
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
@ -247,7 +247,7 @@
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text'"
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"

@ -46,7 +46,7 @@
>
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input'" :label="item.columnDesc+`:`" :key="item.id">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
@ -55,7 +55,7 @@
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select'" :label="item.columnDesc+`:`">
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@ -68,7 +68,7 @@
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer'" :label="item.columnDesc+`:`">
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
@ -85,7 +85,7 @@
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker'" :label="item.columnDesc+`:`">
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
v-model="dateRange"
:style="`width:${item.width+'px'}`"
@ -98,7 +98,7 @@
:default-time="['00:00:00', '23:59:59']"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date'" :label="item.columnDesc+`:`">
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
@ -290,7 +290,7 @@
>
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id'"
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
@ -299,7 +299,7 @@
:selectable="executeFuc"></el-table-column>
<el-table-column
v-if="item.columnType == 'radio'"
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
@ -312,7 +312,7 @@
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber'"
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
@ -325,7 +325,7 @@
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag'"
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
@ -340,7 +340,7 @@
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button'"
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
@ -361,7 +361,7 @@
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text'"
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"

@ -45,6 +45,7 @@
<el-table-column prop="colorRule" show-overflow-tooltip="true" label="颜色规则"></el-table-column>
<el-table-column prop="buttonRule" show-overflow-tooltip="true" label="按钮规则"></el-table-column>
<el-table-column prop="clickFuc" label="点击事件"></el-table-column>
<el-table-column prop="expression" label="是否展示eval表达式"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
@ -242,6 +243,15 @@
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<el-form-item label="是否展示eval表达式" prop="expression" class="query-form-item">
<el-input v-model="subData.expression" style="width: 80%" placeholder="请输入是否展示eval表达式"
auto-complete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm">取消</el-button>

@ -34,6 +34,7 @@
<el-table-column prop="lableRule" show-overflow-tooltip="true" label="字典替换规则"></el-table-column>
<el-table-column prop="clickFuc" label="事件"></el-table-column>
<el-table-column prop="disabledFuc" label="禁用eval表达式"></el-table-column>
<el-table-column prop="expression" label="是否展示eval表达式"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
@ -144,6 +145,15 @@
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<el-form-item label="是否展示eval表达式" prop="expression" class="query-form-item">
<el-input v-model="subData.expression" style="width: 80%" placeholder="请输入是否展示eval表达式"
auto-complete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm">取消</el-button>

Loading…
Cancel
Save