feat()根据作用域不同获取不同数据
parent
9ff9e0a3e4
commit
d9417a4296
|
@ -215,7 +215,7 @@
|
|||
<div slot="header" class="clearfix">
|
||||
<span>数据集</span>
|
||||
</div>
|
||||
<el-table ref="multipleTable" :data="columnOne2" max-height="200px">
|
||||
<el-table ref="multipleTable" :data="columnOne2" max-height="200px" >
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<!-- <el-table-column v-for="dataModel in columnOne2" :label="dataModel.comment" :prop="dataModel.name"/>-->
|
||||
<el-table-column v-for="(val, key) in columnOne2[0]" :key="key" :label="key" :prop="key"></el-table-column>
|
||||
|
@ -223,6 +223,12 @@
|
|||
<div style="margin-top: 20px">
|
||||
<el-button @click="toggleSelection()">清空选择</el-button>
|
||||
</div>
|
||||
<el-descriptions title="选择模型" :column="3" border style="margin-top: 20px">
|
||||
<el-descriptions-item v-for="edinn in columnOne[0]"
|
||||
:label='edinn.key'>
|
||||
<el-checkbox v-model="dataRecordSelectKeyList" :label="edinn.key" >{{edinn.key}}</el-checkbox>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-card class="box-card" v-if="ruleInfo.ruleLevel === 3">
|
||||
<div slot="header" class="clearfix">
|
||||
|
@ -236,8 +242,11 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-descriptions title="字段" :column="3" border>
|
||||
<el-descriptions-item ></el-descriptions-item>
|
||||
<el-descriptions title="选择行数据" direction="vertical" :column="3" border style="margin-top: 20px" v-if="fieldd != null">
|
||||
<el-descriptions-item v-for="(val, key) in fieldd"
|
||||
:label='key'>
|
||||
<el-checkbox v-model="dataRecordSelectKeyList" :label="key" :value="key">{{val}}</el-checkbox>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-card class="box-card" v-if="ruleInfo.ruleLevel === 4">
|
||||
|
@ -246,10 +255,16 @@
|
|||
</div>
|
||||
<button @click="dield(tableLisrs,ruleInfo.ruleLevel)">随机</button>
|
||||
<el-descriptions title="字段" :column="3" border>
|
||||
<el-descriptions-item v-for="tab in fields" :label="tab.key">{{tab.val}}</el-descriptions-item>
|
||||
<el-descriptions-item v-for="tab in fields" :label="tab.key">
|
||||
<el-radio v-model="dataMode" :label="tab.val" :value="tab.val">{{tab.val}}</el-radio>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="24" style="margin-top: 10px" v-if="dataMode != null || dataRecordSelectKeyList.length > 0">
|
||||
<el-button @click="dataTest">测试</el-button>
|
||||
<el-input style="margin-top: 10px" v-model="testResult" type="textarea" placeholder="请点击测试" disabled/>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-drawer>
|
||||
|
@ -315,6 +330,10 @@ export default {
|
|||
//复选字段
|
||||
fields: [],
|
||||
fieldd: [],
|
||||
//多选记录
|
||||
dataRecordSelectKeyList: [],
|
||||
dataRecordSelectData: null,
|
||||
dataMode: null,
|
||||
//父类列
|
||||
primaryId: [],
|
||||
tableLisrs: null,
|
||||
|
@ -326,6 +345,8 @@ export default {
|
|||
editionContent: "",
|
||||
ruleContent: ""
|
||||
},
|
||||
//显示结果
|
||||
testResult: "",
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
|
@ -343,6 +364,17 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 测试
|
||||
dataTest(){
|
||||
let number = Math.floor(Math.random()*3);
|
||||
if (number === 0){
|
||||
this.testResult = "测试正常,无异常数据返回";
|
||||
}else if (number === 1){
|
||||
this.testResult = "测试失败:触发*****异常条例,数据发生动作【移除/忽略/记录】";
|
||||
}else if (number === 2){
|
||||
this.testResult = "程序异常:*******异常";
|
||||
}
|
||||
},
|
||||
// 关闭
|
||||
ruleEngineVersionInfoStatusClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
|
@ -392,6 +424,7 @@ export default {
|
|||
//读取队列
|
||||
dataRecordSelect(row) {
|
||||
console.log(row)
|
||||
this.dataRecordSelectKeyList = []
|
||||
this.fieldd = row
|
||||
},
|
||||
/** 查询规则引擎版本列表 */
|
||||
|
|
Loading…
Reference in New Issue