|
@@ -20,6 +20,7 @@
|
|
|
<el-table-column label="子指标编号" prop="childCode" />
|
|
|
</el-table>
|
|
|
</div>
|
|
|
+ <p style="margin-bottom: 5px;color: red">注:请勾选指标项进行公式配置</p>
|
|
|
<div class="fromCenter">
|
|
|
<el-tabs type="border-card">
|
|
|
<el-tab-pane label="指标项">
|
|
@@ -29,6 +30,7 @@
|
|
|
:stripe="false"
|
|
|
:border="false"
|
|
|
ref="optionMul"
|
|
|
+ :key="multipleSelectionObj?.childCode"
|
|
|
height="240"
|
|
|
@select-all="optionMulAll"
|
|
|
@selection-change="optionMulItem"
|
|
@@ -103,8 +105,9 @@
|
|
|
</div>
|
|
|
<el-input
|
|
|
type="textarea"
|
|
|
- rows="10"
|
|
|
+ rows="5"
|
|
|
v-model="representation"
|
|
|
+ @blur="representationBlur"
|
|
|
id="representation"
|
|
|
/>
|
|
|
</div>
|
|
@@ -112,7 +115,7 @@
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
<el-button @click="editEvaluaVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="saverulesDetailMsg()">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="saveAndEditIndicatorData()">确 定</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
@@ -120,7 +123,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {apiGetIndidicselectById, apiGetintervalscoringsaveOrUpdate, apiGetfunctionList} from '../../api/api'
|
|
|
+import {apiGetIndidicselectById, apiGetIndicatordicsaveList, apiGetfunctionList} from '../../api/api'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -174,6 +177,9 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ representationBlur(val) {
|
|
|
+ this.optionMulItemObj.formula = document.getElementById("representation").value
|
|
|
+ },
|
|
|
// 函数查询
|
|
|
getFunData() {
|
|
|
let that = this
|
|
@@ -187,6 +193,8 @@ export default {
|
|
|
this.$refs.multipleTable.clearSelection();
|
|
|
},
|
|
|
selectItem(rows) {
|
|
|
+ document.getElementById("representation").value = ''
|
|
|
+ this.optionMulItemObj = {}
|
|
|
if (rows.length > 1) {
|
|
|
const newRows = rows.filter((it, index) => {
|
|
|
if (index == rows.length - 1) {
|
|
@@ -198,7 +206,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
this.multipleSelection = newRows;
|
|
|
- this.multipleSelectionObj = rows[0]
|
|
|
+ this.multipleSelectionObj = newRows[0]
|
|
|
} else {
|
|
|
this.multipleSelection = rows;
|
|
|
this.multipleSelectionObj = {}
|
|
@@ -256,52 +264,31 @@ export default {
|
|
|
},
|
|
|
optionMulItem(row) {
|
|
|
debugger
|
|
|
- let representation = ''
|
|
|
if (row.length > 1) {
|
|
|
const newRows = row.filter((it, index) => {
|
|
|
if (index == row.length - 1) {
|
|
|
this.$refs.optionMul.toggleRowSelection(it, true);
|
|
|
- this.representation = it.formula
|
|
|
return true;
|
|
|
} else {
|
|
|
this.$refs.optionMul.toggleRowSelection(it, false);
|
|
|
return false;
|
|
|
}
|
|
|
})
|
|
|
- this.optionMulItemObj = row[0]
|
|
|
+ // this.representation = newRows[0].formula
|
|
|
+ document.getElementById("representation").value = newRows[0].formula
|
|
|
+ this.optionMulItemObj = newRows[0]
|
|
|
} else {
|
|
|
this.optionMulItemObj = row[0]
|
|
|
- this.representation = this.optionMulItemObj.formula
|
|
|
+ // this.representation = this.optionMulItemObj.formula
|
|
|
+ document.getElementById("representation").value = row[0].formula
|
|
|
}
|
|
|
},
|
|
|
- saverulesDetailMsg() {
|
|
|
- let that = this
|
|
|
- let repre = document.getElementById("representation").value
|
|
|
- // let range = document.getElementById("range").value range === '' ||
|
|
|
- if (repre === '' || that.itemForm.desc === '') return
|
|
|
- that.saveAndEditIndicatorData()
|
|
|
- },
|
|
|
//新增/修改指标数据
|
|
|
saveAndEditIndicatorData() {
|
|
|
let that = this
|
|
|
- let params = {
|
|
|
- ruleId: that.rowevalradio.id,
|
|
|
- regularExpression: encodeURI(document.getElementById("representation").value),
|
|
|
- // range: encodeURI(document.getElementById("range").value),
|
|
|
- range: that.multipleSelection[0].childName,
|
|
|
- ruleDescription: that.itemForm.desc,
|
|
|
- childCode: that.multipleSelection[0].childCode
|
|
|
- }
|
|
|
- if (that.isSave) {
|
|
|
- params.id = that.evalradio.id
|
|
|
- }
|
|
|
- apiGetintervalscoringsaveOrUpdate(params).then(datas =>{
|
|
|
- if (!that.isSave) {
|
|
|
- that.$message({
|
|
|
- message: '指标项新增成功',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- } else {
|
|
|
+ let params = that.indicItemoptions
|
|
|
+ apiGetIndicatordicsaveList(params).then(datas =>{
|
|
|
+ if (datas) {
|
|
|
that.$message({
|
|
|
message: '指标项修改成功',
|
|
|
type: 'success'
|