Selaa lähdekoodia

考评得分规则,考评评级规则,考评预警规则页面修改问题,当双击运算符时,不加【】;

SunZehao 1 vuosi sitten
vanhempi
commit
ba16c2c9dc

+ 1 - 1
src/components/evaluationSystem/evaluationCompanyPage.vue

@@ -196,7 +196,7 @@
                             <el-form-item label="月份">
                                 <el-input-number v-model="ruleForm.month" :min="1" :max="12" />
                             </el-form-item> -->
-                            <el-form-item label="指标顺序">
+                            <el-form-item label="顺序">
                                 <el-input-number v-model="ruleForm.orderNum" :min="1" />
                             </el-form-item>
                         </el-form>

+ 9 - 3
src/components/evaluationknowledgePage/earlyWarningRulePage.vue

@@ -230,7 +230,7 @@
                                                 v-for="item in operator"
                                                 :key="item"
                                                 plain
-                                                @click="scorRuleSplit(item)"
+                                                @click="scorRuleSplit(item, 'operator')"
                                                 style="width: 60px; margin: 7px 12px; height: 40px; border: 1px solid #409EFF;"
                                                 >
                                                 {{ item }}
@@ -441,14 +441,20 @@ export default {
         rowDbclick(row) {
             this.scorRuleSplit(row.optionCode);
         },
-        scorRuleSplit(val) {
+        scorRuleSplit(val, type) {
             let elInput = null
             elInput = document.getElementById("representation");
             let startPos = elInput.selectionStart;
             let endPos = elInput.selectionEnd;
             if (startPos === undefined || endPos === undefined) return;
             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);
             elInput.value = result;
             this.ruleForm.representation = result

+ 9 - 3
src/components/evaluationknowledgePage/evalRatingRulesPage.vue

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

+ 9 - 3
src/components/evaluationknowledgePage/scoringRulesNewDetailPage.vue

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