|
@@ -27,24 +27,6 @@
|
|
<v-card class="width-auto">
|
|
<v-card class="width-auto">
|
|
<div class="pa-3 fullscreen">
|
|
<div class="pa-3 fullscreen">
|
|
<div class="fullscreen d-flex flex-column">
|
|
<div class="fullscreen d-flex flex-column">
|
|
- <v-card outlined class="height-auto">
|
|
|
|
- <Toolbar
|
|
|
|
- style="border-bottom: 1px solid #ccc"
|
|
|
|
- :editor="editor"
|
|
|
|
- :defaultConfig="toolbarConfig"
|
|
|
|
- :mode="mode"
|
|
|
|
- ></Toolbar>
|
|
|
|
- <Editor
|
|
|
|
- style="overflow-y: hidden; height: calc(100% - 100px);"
|
|
|
|
- v-model="changeObj.script_requirement"
|
|
|
|
- :defaultConfig="editorConfig"
|
|
|
|
- :mode="mode"
|
|
|
|
- @onCreated="onCreated"
|
|
|
|
- />
|
|
|
|
- <div class="d-flex align-end justify-end pa-3">
|
|
|
|
- <v-btn color="primary" @click="onGenerating">生成代码</v-btn>
|
|
|
|
- </div>
|
|
|
|
- </v-card>
|
|
|
|
<div class="mt-3 d-flex">
|
|
<div class="mt-3 d-flex">
|
|
|
|
|
|
<v-text-field
|
|
<v-text-field
|
|
@@ -67,7 +49,25 @@
|
|
:rules="[v => !!v || '请输入目标表']">
|
|
:rules="[v => !!v || '请输入目标表']">
|
|
</v-text-field>
|
|
</v-text-field>
|
|
</div>
|
|
</div>
|
|
- <div class="mt-3">
|
|
|
|
|
|
+ <v-card outlined class="height-auto mt-3">
|
|
|
|
+ <Toolbar
|
|
|
|
+ style="border-bottom: 1px solid #ccc"
|
|
|
|
+ :editor="editor"
|
|
|
|
+ :defaultConfig="toolbarConfig"
|
|
|
|
+ :mode="mode"
|
|
|
|
+ ></Toolbar>
|
|
|
|
+ <Editor
|
|
|
|
+ style="overflow-y: hidden; height: calc(100% - 50px);"
|
|
|
|
+ v-model="changeObj.script_requirement"
|
|
|
|
+ :defaultConfig="editorConfig"
|
|
|
|
+ :mode="mode"
|
|
|
|
+ @onCreated="onCreated"
|
|
|
|
+ />
|
|
|
|
+ </v-card>
|
|
|
|
+ <div class="d-flex align-end justify-end pa-3">
|
|
|
|
+ <v-btn color="primary" @click="onGenerating">生成代码</v-btn>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
<v-textarea
|
|
<v-textarea
|
|
v-model="changeObj.script_content"
|
|
v-model="changeObj.script_content"
|
|
outlined
|
|
outlined
|
|
@@ -127,9 +127,11 @@
|
|
<div class="fullscreen overflow-y-auto">
|
|
<div class="fullscreen overflow-y-auto">
|
|
<v-tabs-items v-model="tab">
|
|
<v-tabs-items v-model="tab">
|
|
<v-tab-item>
|
|
<v-tab-item>
|
|
- <div v-html="ruleItem.calculateFormulas[0]?.content"></div>
|
|
|
|
|
|
+ <div class="text-right mb-3"><v-btn color="primary" @click="onUse">使用规则</v-btn></div>
|
|
|
|
+ <div v-html="ruleItem.calculateFormulas?.[0]?.content"></div>
|
|
</v-tab-item>
|
|
</v-tab-item>
|
|
<v-tab-item class="pa-3">
|
|
<v-tab-item class="pa-3">
|
|
|
|
+ <div class="text-right mb-3"><v-btn color="primary" @click="onUseParam">使用参数</v-btn></div>
|
|
<v-expansion-panels
|
|
<v-expansion-panels
|
|
v-model="panelActive"
|
|
v-model="panelActive"
|
|
multiple
|
|
multiple
|
|
@@ -232,8 +234,8 @@ export default {
|
|
clickItem: null,
|
|
clickItem: null,
|
|
clickId: null,
|
|
clickId: null,
|
|
changeObj: {
|
|
changeObj: {
|
|
- script_content: null,
|
|
|
|
- script_requirement: null,
|
|
|
|
|
|
+ script_content: '',
|
|
|
|
+ script_requirement: '',
|
|
source_table: null,
|
|
source_table: null,
|
|
target_table: null
|
|
target_table: null
|
|
}
|
|
}
|
|
@@ -267,6 +269,16 @@ export default {
|
|
onCreated (editor) {
|
|
onCreated (editor) {
|
|
this.editor = Object.seal(editor) // 一定要用 Object.seal() ,否则会报错
|
|
this.editor = Object.seal(editor) // 一定要用 Object.seal() ,否则会报错
|
|
},
|
|
},
|
|
|
|
+ onUse () {
|
|
|
|
+ this.changeObj.script_requirement += `\n${this.ruleItem.calculateFormulas?.[0]?.content}`
|
|
|
|
+ },
|
|
|
|
+ onUseParam () {
|
|
|
|
+ const str = this.ruleItem.calculateConfigurations.reduce((t, v) => {
|
|
|
|
+ return t + `<p>${v.name}=${v.value}</p>`
|
|
|
|
+ }, '\n')
|
|
|
|
+ this.changeObj.script_requirement += str
|
|
|
|
+ console.log(str)
|
|
|
|
+ },
|
|
// 详情
|
|
// 详情
|
|
async getDetails () {
|
|
async getDetails () {
|
|
try {
|
|
try {
|
|
@@ -371,12 +383,18 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async onClick (e) {
|
|
async onClick (e) {
|
|
- this.loading = true
|
|
|
|
try {
|
|
try {
|
|
|
|
+ this.loading = true
|
|
const { data } = await this.fetchData('/op/base/performance/solution/detail', {
|
|
const { data } = await this.fetchData('/op/base/performance/solution/detail', {
|
|
performanceSolutionId: e.performanceSolutionId
|
|
performanceSolutionId: e.performanceSolutionId
|
|
})
|
|
})
|
|
this.clickId = data.entity.performanceSolutionId
|
|
this.clickId = data.entity.performanceSolutionId
|
|
|
|
+ if (!data.performanceSolutionDetailRespCategoryVos.length) {
|
|
|
|
+ this.loading = false
|
|
|
|
+ this.$snackbar.warning('该方案暂无数据')
|
|
|
|
+ this.drawer = false
|
|
|
|
+ return
|
|
|
|
+ }
|
|
this.clickItem = data.performanceSolutionDetailRespCategoryVos
|
|
this.clickItem = data.performanceSolutionDetailRespCategoryVos
|
|
this.drawer = true
|
|
this.drawer = true
|
|
} catch (error) {
|
|
} catch (error) {
|