第一次
parent
8cbce8dcbd
commit
f61d5c844c
|
@ -65,13 +65,26 @@ export function enable(id) {
|
|||
url: `/rule/ruleEdition/enable/${id}`,
|
||||
})
|
||||
}
|
||||
|
||||
//通过id禁用客户
|
||||
export function disable(id) {
|
||||
//数据接入
|
||||
export function selectById() {
|
||||
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-input v-model="form.ruleId" disabled placeholder="请输入版本"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-button type="primary" @click="submitForm()">保存代码</el-button>
|
||||
<!-- 前台web编写代码-->
|
||||
<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>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
|
@ -310,7 +313,7 @@
|
|||
</el-form-item>
|
||||
<!-- 前台web编写代码-->
|
||||
<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>
|
||||
</el-form-item>
|
||||
|
||||
|
@ -328,13 +331,9 @@
|
|||
<div slot="header" class="clearfix">
|
||||
<span>选择数据接入</span>
|
||||
</div>
|
||||
<el-select v-model="form.region" placeholder="请选择数据接入" @blur="chan()">
|
||||
<el-option label="测试1(云计算系统)" value="shanghai"></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 v-model="dataOrigin.sourceId" placeholder="请选择数据接入" @change="chan()">
|
||||
<el-option v-for="i in origins" :label="i.tableName" :value="i.id" :key="i.id"></el-option>
|
||||
</el-select>
|
||||
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12" v-show="selects">
|
||||
|
@ -342,16 +341,11 @@
|
|||
<div slot="header" class="clearfix">
|
||||
<span>选择资产结构</span>
|
||||
</div>
|
||||
<span>
|
||||
<el-select v-model="form.age" placeholder="请选择数据接入" @blur="ch()">
|
||||
<el-option label="11" value="shanghai"></el-option>
|
||||
<el-option label="22" value="beijing"></el-option>
|
||||
<el-option label="33" value="beijing"></el-option>
|
||||
<el-option label="44" value="beijing"></el-option>
|
||||
<span>
|
||||
<el-select v-model="dataOrigin.tableId" placeholder="请选择数据接入" @blur="ch()">
|
||||
<el-option v-for="i in tableOrigin" :label="i.tableName" :value="i.id" :key="i.id"></el-option>
|
||||
</el-select>
|
||||
</span>
|
||||
|
||||
|
||||
</span>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -361,8 +355,23 @@
|
|||
<span>选择资产集</span>
|
||||
</div>
|
||||
<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>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
@ -379,10 +388,10 @@ import {
|
|||
addGenerate,
|
||||
addRule,
|
||||
disable,
|
||||
enable,
|
||||
enable, findTableIdByParentId,
|
||||
getEditionList,
|
||||
getFindByEditionId,
|
||||
updateRule
|
||||
getFindByEditionId, selectById,
|
||||
updateRule, updateRuleEngine
|
||||
} from "@/api/rule/ruleEdition";
|
||||
|
||||
|
||||
|
@ -411,7 +420,6 @@ export default {
|
|||
lint: true, // 开启语法检查
|
||||
},
|
||||
|
||||
|
||||
ruleAndEditionList: [],
|
||||
//版本
|
||||
ruleAndEdition: {},
|
||||
|
@ -427,6 +435,7 @@ export default {
|
|||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
childId: {},
|
||||
// 规则表格数据
|
||||
ruleList: [],
|
||||
// 弹出层标题
|
||||
|
@ -465,7 +474,11 @@ export default {
|
|||
ruleId: '',
|
||||
ruleEngine: '',
|
||||
},
|
||||
//数据源
|
||||
dataOrigin: {},
|
||||
origins: [],
|
||||
|
||||
tableOrigin: [],
|
||||
showCode: false,
|
||||
// 表单校验
|
||||
rules: {
|
||||
|
@ -480,14 +493,33 @@ export default {
|
|||
this.ruleAndVersion.id = this.$route.query.id
|
||||
this.findById();
|
||||
this.findList()
|
||||
this.getDataOrigin()
|
||||
},
|
||||
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||
mounted() {
|
||||
this.findById();
|
||||
},
|
||||
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() {
|
||||
if (row.status === "Y") {
|
||||
|
@ -505,6 +537,7 @@ export default {
|
|||
//数据源
|
||||
chan() {
|
||||
this.selects = true
|
||||
this.chanChild()
|
||||
},
|
||||
ch() {
|
||||
this.selectss = true
|
||||
|
|
Loading…
Reference in New Issue