|
@@ -18,10 +18,10 @@
|
|
|
<el-form-item label="所属指标" prop="formulaIndicator">
|
|
|
<el-select v-model="formData.formulaIndicator" placeholder="请选择所属指标">
|
|
|
<el-option
|
|
|
- v-for="dict in dict.type.biz_perf_eval_type"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
+ v-for="dict in optionList"
|
|
|
+ :key="dict.id"
|
|
|
+ :label="dict.name"
|
|
|
+ :value="dict.id"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -58,7 +58,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { findInfoList, addFormulas, updateFormulas } from "@/api/eval/formulas";
|
|
|
-
|
|
|
+import { getoptions } from "@/api/eval/indicator";
|
|
|
export default {
|
|
|
dicts: ["biz_perf_eval_type"],
|
|
|
props: {
|
|
@@ -78,6 +78,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
availableParams: ['TP', 'TN', 'FP', 'FN'],
|
|
|
+ optionList:[],
|
|
|
formulaIndicator:[
|
|
|
{'label': '一级指标','value' : '0'},
|
|
|
{'label': '二级指标','value' : '1'},
|
|
@@ -151,6 +152,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ initOptions(){
|
|
|
+ getoptions().then(res=>{
|
|
|
+
|
|
|
+ this.optionList=res.rows
|
|
|
+ })
|
|
|
+ },
|
|
|
initData() {
|
|
|
if (this.options!== 'add') {
|
|
|
this.formData = { ...this.dataInfo };
|
|
@@ -159,6 +166,7 @@ export default {
|
|
|
console.log('参数输出',res)
|
|
|
this.availableParams = { ...res,...this.availableParams};
|
|
|
})
|
|
|
+ this.initOptions()
|
|
|
},
|
|
|
// 插入参数到公式输入框
|
|
|
insertParam(param) {
|