第一次
parent
8cbce8dcbd
commit
f61d5c844c
|
@ -65,13 +65,26 @@ export function enable(id) {
|
||||||
url: `/rule/ruleEdition/enable/${id}`,
|
url: `/rule/ruleEdition/enable/${id}`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//数据接入
|
||||||
//通过id禁用客户
|
export function selectById() {
|
||||||
export function disable(id) {
|
|
||||||
return request({
|
return request({
|
||||||
url: `/rule/ruleEdition/disable/${id}`,
|
url: `/source/tableInfo/selectById`,
|
||||||
|
method: 'post',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//表
|
||||||
|
export function findTableIdByParentId(id) {
|
||||||
|
return request({
|
||||||
|
url: `/source/tableInfo/findTableIdByParentId/${id}`,
|
||||||
|
method: 'post',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//保存代码
|
||||||
|
export function updateRuleEngine(data) {
|
||||||
|
return request({
|
||||||
|
url: '/rule/ruleEdition/updateRuleEngine',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -259,13 +259,16 @@
|
||||||
<el-form-item label="版本" prop="ruleId">
|
<el-form-item label="版本" prop="ruleId">
|
||||||
<el-input v-model="form.ruleId" disabled placeholder="请输入版本"/>
|
<el-input v-model="form.ruleId" disabled placeholder="请输入版本"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-button type="primary" @click="submitForm()">保存代码</el-button>
|
||||||
<!-- 前台web编写代码-->
|
<!-- 前台web编写代码-->
|
||||||
<el-form-item label="引擎编码" prop="ruleCoding">
|
<el-form-item label="引擎编码" prop="ruleCoding">
|
||||||
<codemirror ref="ruleEngine" :value="form.ruleEngine" :options="cmOptions" class="code" v-show="showCode">
|
<codemirror ref="ruleEngine" :value="form.ruleEngine" :options="cmOptions" class="code">
|
||||||
</codemirror>
|
</codemirror>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -310,7 +313,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 前台web编写代码-->
|
<!-- 前台web编写代码-->
|
||||||
<el-form-item label="引擎编码" prop="ruleCoding">
|
<el-form-item label="引擎编码" prop="ruleCoding">
|
||||||
<codemirror ref="ruleEngine" :value="form.ruleEngine" :options="cmOptions" class="code" v-show="showCode">
|
<codemirror ref="ruleEngine" :value="form.ruleEngine" :options="cmOptions" class="code">
|
||||||
</codemirror>
|
</codemirror>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -325,33 +328,24 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>选择数据接入</span>
|
<span>选择数据接入</span>
|
||||||
</div>
|
</div>
|
||||||
<el-select v-model="form.region" placeholder="请选择数据接入" @blur="chan()">
|
<el-select v-model="dataOrigin.sourceId" placeholder="请选择数据接入" @change="chan()">
|
||||||
<el-option label="测试1(云计算系统)" value="shanghai"></el-option>
|
<el-option v-for="i in origins" :label="i.tableName" :value="i.id" :key="i.id"></el-option>
|
||||||
<el-option label="测试2(网站系统)" value="beijing"></el-option>
|
|
||||||
<el-option label="测试3(物联网系统)" value="beijing"></el-option>
|
|
||||||
<el-option label="测试4(传媒系统)" value="beijing"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
|
</el-card>
|
||||||
</el-card>
|
</el-col>
|
||||||
</el-col>
|
|
||||||
<el-col :span="12" v-show="selects">
|
<el-col :span="12" v-show="selects">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>选择资产结构</span>
|
<span>选择资产结构</span>
|
||||||
</div>
|
</div>
|
||||||
<span>
|
<span>
|
||||||
<el-select v-model="form.age" placeholder="请选择数据接入" @blur="ch()">
|
<el-select v-model="dataOrigin.tableId" placeholder="请选择数据接入" @blur="ch()">
|
||||||
<el-option label="11" value="shanghai"></el-option>
|
<el-option v-for="i in tableOrigin" :label="i.tableName" :value="i.id" :key="i.id"></el-option>
|
||||||
<el-option label="22" value="beijing"></el-option>
|
</el-select>
|
||||||
<el-option label="33" value="beijing"></el-option>
|
</span>
|
||||||
<el-option label="44" value="beijing"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -361,8 +355,23 @@
|
||||||
<span>选择资产集</span>
|
<span>选择资产集</span>
|
||||||
</div>
|
</div>
|
||||||
<span>
|
<span>
|
||||||
|
<template>
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
label="日期"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<i class="el-icon-time"></i>
|
||||||
|
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
</template>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -379,10 +388,10 @@ import {
|
||||||
addGenerate,
|
addGenerate,
|
||||||
addRule,
|
addRule,
|
||||||
disable,
|
disable,
|
||||||
enable,
|
enable, findTableIdByParentId,
|
||||||
getEditionList,
|
getEditionList,
|
||||||
getFindByEditionId,
|
getFindByEditionId, selectById,
|
||||||
updateRule
|
updateRule, updateRuleEngine
|
||||||
} from "@/api/rule/ruleEdition";
|
} from "@/api/rule/ruleEdition";
|
||||||
|
|
||||||
|
|
||||||
|
@ -411,7 +420,6 @@ export default {
|
||||||
lint: true, // 开启语法检查
|
lint: true, // 开启语法检查
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
ruleAndEditionList: [],
|
ruleAndEditionList: [],
|
||||||
//版本
|
//版本
|
||||||
ruleAndEdition: {},
|
ruleAndEdition: {},
|
||||||
|
@ -427,6 +435,7 @@ export default {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
|
childId: {},
|
||||||
// 规则表格数据
|
// 规则表格数据
|
||||||
ruleList: [],
|
ruleList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
|
@ -465,7 +474,11 @@ export default {
|
||||||
ruleId: '',
|
ruleId: '',
|
||||||
ruleEngine: '',
|
ruleEngine: '',
|
||||||
},
|
},
|
||||||
|
//数据源
|
||||||
|
dataOrigin: {},
|
||||||
|
origins: [],
|
||||||
|
|
||||||
|
tableOrigin: [],
|
||||||
showCode: false,
|
showCode: false,
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
@ -480,14 +493,33 @@ export default {
|
||||||
this.ruleAndVersion.id = this.$route.query.id
|
this.ruleAndVersion.id = this.$route.query.id
|
||||||
this.findById();
|
this.findById();
|
||||||
this.findList()
|
this.findList()
|
||||||
|
this.getDataOrigin()
|
||||||
},
|
},
|
||||||
//生命周期 - 挂载完成(可以访问DOM元素)",
|
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||||
mounted() {
|
mounted() {
|
||||||
this.findById();
|
this.findById();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//保存代码
|
||||||
|
preserve() {
|
||||||
|
updateRuleEngine(this.form).then(res => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//数据接入源
|
||||||
|
getDataOrigin() {
|
||||||
|
selectById(this.dataOrigin).then(res => {
|
||||||
|
this.origins = res.data
|
||||||
|
console.log("origins", this.origins)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
chanChild() {
|
||||||
|
findTableIdByParentId(this.dataOrigin.sourceId).then(res => {
|
||||||
|
this.tableOrigin = res.data
|
||||||
|
console.log("tableOrigin", this.tableOrigin)
|
||||||
|
})
|
||||||
|
},
|
||||||
//禁用
|
//禁用
|
||||||
handleStatus() {
|
handleStatus() {
|
||||||
if (row.status === "Y") {
|
if (row.status === "Y") {
|
||||||
|
@ -505,6 +537,7 @@ export default {
|
||||||
//数据源
|
//数据源
|
||||||
chan() {
|
chan() {
|
||||||
this.selects = true
|
this.selects = true
|
||||||
|
this.chanChild()
|
||||||
},
|
},
|
||||||
ch() {
|
ch() {
|
||||||
this.selectss = true
|
this.selectss = true
|
||||||
|
|
Loading…
Reference in New Issue