|
@@ -225,7 +225,7 @@
|
|
v-for="item in operator"
|
|
v-for="item in operator"
|
|
:key="item"
|
|
:key="item"
|
|
plain
|
|
plain
|
|
- @click="scorRuleSplit(item)"
|
|
|
|
|
|
+ @click="scorRuleSplit(item, 'operator')"
|
|
style="width: 60px; margin: 7px 12px; height: 40px; border: 1px solid #409EFF;"
|
|
style="width: 60px; margin: 7px 12px; height: 40px; border: 1px solid #409EFF;"
|
|
>
|
|
>
|
|
{{ item }}
|
|
{{ item }}
|
|
@@ -412,14 +412,20 @@ export default {
|
|
rowDbclick(row) {
|
|
rowDbclick(row) {
|
|
this.scorRuleSplit(row.indicatorCode);
|
|
this.scorRuleSplit(row.indicatorCode);
|
|
},
|
|
},
|
|
- scorRuleSplit(val) {
|
|
|
|
|
|
+ scorRuleSplit(val, type) {
|
|
let elInput = null
|
|
let elInput = null
|
|
elInput = document.getElementById("representation");
|
|
elInput = document.getElementById("representation");
|
|
let startPos = elInput.selectionStart;
|
|
let startPos = elInput.selectionStart;
|
|
let endPos = elInput.selectionEnd;
|
|
let endPos = elInput.selectionEnd;
|
|
if (startPos === undefined || endPos === undefined) return;
|
|
if (startPos === undefined || endPos === undefined) return;
|
|
let txt = elInput.value;
|
|
let txt = elInput.value;
|
|
- let txtSplit = '['+val+']';
|
|
|
|
|
|
+ // let txtSplit = '['+val+']';
|
|
|
|
+ let txtSplit = ''
|
|
|
|
+ if (type === 'operator') {
|
|
|
|
+ txtSplit = val
|
|
|
|
+ } else {
|
|
|
|
+ txtSplit = '['+val+']'
|
|
|
|
+ }
|
|
let result = txt.substring(0, startPos) + txtSplit + txt.substring(endPos);
|
|
let result = txt.substring(0, startPos) + txtSplit + txt.substring(endPos);
|
|
elInput.value = result;
|
|
elInput.value = result;
|
|
this.ruleForm.representation = result
|
|
this.ruleForm.representation = result
|