feat() 规则维护页面,修改代码功能
parent
4dc09cf304
commit
d52bc7542f
|
@ -8,3 +8,12 @@ export function addEngineVersion(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改引擎维护
|
||||||
|
export function updateEngine(data) {
|
||||||
|
return request({
|
||||||
|
url: '/data/engineVersion',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -38,6 +38,13 @@ export default {
|
||||||
this.code = val
|
this.code = val
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'code':{
|
||||||
|
handler(val) {
|
||||||
|
if (val != null){
|
||||||
|
console.log(this.$emit('input',val))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
'modification': {
|
'modification': {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
|
|
|
@ -145,19 +145,19 @@
|
||||||
:direction="'rtl'">
|
:direction="'rtl'">
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-descriptions v-if="ruleEngineVersionInfoAndTest != null" class="margin-top" :column="2" border>
|
<el-descriptions v-if="ruleEngineVersionInfoAndTest != null" class="margin-top" :column="2" border>
|
||||||
<el-descriptions-item label="版本类" :span="2"> {{ ruleEngineVersionInfoAndTest.versionCode }}
|
<el-descriptions-item label="版本类" :span="2"> {{ ruleEngineVersionInfoAndTest.versionClass }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="版本名称"> {{ ruleEngineVersionInfoAndTest.name }}</el-descriptions-item>
|
<el-descriptions-item label="版本名称"> {{ ruleEngineVersionInfoAndTest.versionName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="版本CODE"> {{ ruleEngineVersionInfoAndTest.code }}</el-descriptions-item>
|
<el-descriptions-item label="版本CODE"> {{ ruleEngineVersionInfoAndTest.versionCode }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="是否激活">
|
<el-descriptions-item label="是否激活">
|
||||||
<dict-tag :options="dict.type.rule_engine_activate_status"
|
<dict-tag :options="dict.type.activated_or_not"
|
||||||
:value="ruleEngineVersionInfoAndTest.isActivate"/>
|
:value="ruleEngineVersionInfoAndTest.activatedOrNot"/>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="版本状态">
|
<el-descriptions-item label="版本状态">
|
||||||
<dict-tag :options="dict.type.rule_engine_version_status" :value="ruleEngineVersionInfoAndTest.status"/>
|
<dict-tag :options="dict.type.version_type" :value="ruleEngineVersionInfoAndTest.versionType"/>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="是否测试">
|
<el-descriptions-item label="是否测试">
|
||||||
<dict-tag :options="dict.type.rule_engine_activate_is_test" :value="ruleEngineVersionInfoAndTest.isTest"/>
|
<dict-tag :options="dict.type.yes_no_test" :value="ruleEngineVersionInfoAndTest.yesNoTest"/>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<editor style="margin-top: 10px" :read-only="true" :min-height="100"
|
<editor style="margin-top: 10px" :read-only="true" :min-height="100"
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
<el-row style="margin-top: 10px">
|
<el-row style="margin-top: 10px">
|
||||||
<el-button @click="saveCoding">保存代码</el-button>
|
<el-button @click="saveCoding">保存代码</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<encoding style="height: 800px; margin-top: 20px" v-model="ruleEngineVersionInfoAndTest.codeIng"></encoding>
|
<encoding style="height: 800px; margin-top: 20px" v-model="ruleEngineVersionInfoAndTest.codeText"></encoding>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
@ -258,15 +258,13 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Encoding from "@/components/Encoding/index.vue";
|
import Encoding from "@/components/Encoding/index.vue";
|
||||||
import {getEngine, getEngineAndEngineVersion, updateEngineActivatedOrNot, updateEngineStatus} from "@/api/data/engine";
|
import {getEngineAndEngineVersion, updateEngineActivatedOrNot, updateEngineStatus} from "@/api/data/engine";
|
||||||
import {addEngineVersion} from "@/api/data/engineVersion";
|
import {addEngineVersion, updateEngine} from "@/api/data/engineVersion";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "EngineVersion",
|
name: "EngineVersion",
|
||||||
components: {Encoding},
|
components: {Encoding},
|
||||||
dicts: ['activated_or_not', 'status', 'scope', 'type', 'version_type'],
|
dicts: ['activated_or_not', 'status', 'scope', 'type', 'version_type'],
|
||||||
// dicts: ['rule_engine_activate_status', 'rule_engine_type', 'sys_normal_disable',
|
|
||||||
// 'rule_engine_level', 'rule_engine_version_status', 'rule_engine_activate_is_test'],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ruleEngineId: this.$route.query.id,
|
ruleEngineId: this.$route.query.id,
|
||||||
|
@ -425,7 +423,11 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
saveCoding() {
|
saveCoding() {
|
||||||
this.$message.success('编码保存成功');
|
updateEngine(this.ruleEngineVersionInfoAndTest).then(response => {
|
||||||
|
this.$message.success('编码保存成功');
|
||||||
|
this.ruleEngineVersionInfoStatus = false
|
||||||
|
this.initRuleEngine();
|
||||||
|
})
|
||||||
},
|
},
|
||||||
ruleEngineVersionInfoStatusClose(done) {
|
ruleEngineVersionInfoStatusClose(done) {
|
||||||
this.$confirm('确认关闭?')
|
this.$confirm('确认关闭?')
|
||||||
|
|
Loading…
Reference in New Issue