|
@@ -63,7 +63,8 @@
|
|
|
<div class="periodFrom">
|
|
|
<div class="fromLeft">
|
|
|
<el-tabs type="border-card">
|
|
|
- <el-tab-pane label="指标项名称">
|
|
|
+ <el-tab-pane label="子指标">
|
|
|
+ <!-- @row-dblclick="rowDbclick" -->
|
|
|
<el-table
|
|
|
size="mini"
|
|
|
:show-header="false"
|
|
@@ -71,8 +72,27 @@
|
|
|
:stripe="false"
|
|
|
:border="false"
|
|
|
height="240"
|
|
|
- @row-dblclick="rowDbclick"
|
|
|
+ ref="multipleTable"
|
|
|
:data="indicItemoptions"
|
|
|
+ @select-all="onSelectAll"
|
|
|
+ @selection-change="selectItem"
|
|
|
+ @row-click="onSelectOp"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column prop="childName" />
|
|
|
+ <el-table-column prop="childCode" />
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="指标项">
|
|
|
+ <el-table
|
|
|
+ size="mini"
|
|
|
+ :show-header="false"
|
|
|
+ :highlight-current-row="true"
|
|
|
+ :stripe="false"
|
|
|
+ :border="false"
|
|
|
+ height="240"
|
|
|
+ @row-dblclick="rowDbclick"
|
|
|
+ :data="multipleSelectionObj.list"
|
|
|
>
|
|
|
<el-table-column prop="optionName" />
|
|
|
<el-table-column prop="optionCode" />
|
|
@@ -210,7 +230,9 @@ export default {
|
|
|
},
|
|
|
evalradio: {},
|
|
|
rowevalradio: {},
|
|
|
- dialogVisible: false
|
|
|
+ dialogVisible: false,
|
|
|
+ multipleSelection: [],
|
|
|
+ multipleSelectionObj: {}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -444,7 +466,7 @@ export default {
|
|
|
}
|
|
|
apiGetindicatorselectByCode(params).then(datas =>{
|
|
|
if (datas && datas.data) {
|
|
|
- that.indicItemoptions = datas.data[row.indicatorId]
|
|
|
+ that.indicItemoptions = datas.data
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -454,6 +476,36 @@ export default {
|
|
|
changeRank(val) {
|
|
|
this.isrepresentation = !val
|
|
|
},
|
|
|
+ onSelectAll() {
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
|
+ },
|
|
|
+ selectItem(rows) {
|
|
|
+ if (rows.length > 1) {
|
|
|
+ const newRows = rows.filter((it, index) => {
|
|
|
+ if (index == rows.length - 1) {
|
|
|
+ this.$refs.multipleTable.toggleRowSelection(it, true);
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ this.$refs.multipleTable.toggleRowSelection(it, false);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.multipleSelection = newRows;
|
|
|
+ } else {
|
|
|
+ this.multipleSelection = rows;
|
|
|
+ this.multipleSelectionObj = {}
|
|
|
+ this.multipleSelectionObj = rows[0]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onSelectOp(row) {
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
|
+ this.$refs.multipleTable.toggleRowSelection(row, true);
|
|
|
+ this.multipleSelection = [];
|
|
|
+ this.multipleSelectionObj = {}
|
|
|
+ this.multipleSelectionObj = row;
|
|
|
+ debugger
|
|
|
+ this.multipleSelection.push(row);
|
|
|
+ },
|
|
|
tabFuncRowClickHandle(row) {
|
|
|
let elInput = null
|
|
|
if (this.isrepresentation) {
|
|
@@ -515,6 +567,8 @@ export default {
|
|
|
range: '',
|
|
|
desc: ''
|
|
|
}
|
|
|
+ this.multipleSelectionObj = this.indicItemoptions[0]
|
|
|
+ this.$refs.multipleTable.toggleRowSelection(this.indicItemoptions[0], true);
|
|
|
})
|
|
|
},
|
|
|
handleEdit() {
|
|
@@ -540,8 +594,8 @@ export default {
|
|
|
let that = this
|
|
|
let params = {
|
|
|
ruleId: that.rowevalradio.id,
|
|
|
- regularExpression: document.getElementById("representation").value,
|
|
|
- range: document.getElementById("range").value,
|
|
|
+ regularExpression: encodeURI(document.getElementById("representation").value),
|
|
|
+ range: encodeURI(document.getElementById("range").value),
|
|
|
ruleDescription: that.itemForm.desc
|
|
|
}
|
|
|
if (that.isSave) {
|
|
@@ -654,6 +708,15 @@ export default {
|
|
|
margin-right: 20px;
|
|
|
.el-tabs{
|
|
|
height: 100%;
|
|
|
+ .el-tabs__content{
|
|
|
+ .el-table{
|
|
|
+ .el-table__body-wrapper{
|
|
|
+ .el-checkbox__inner{
|
|
|
+ border-radius: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.fromRight{
|