浏览代码

指标权重校验

gks 1 年之前
父节点
当前提交
3290a6f4c9
共有 3 个文件被更改,包括 49 次插入53 次删除
  1. 21 21
      src/components/TopNav/index.vue
  2. 28 28
      src/views/norm/dataSubmission.vue
  3. 0 4
      src/views/norm/feeindex.vue

+ 21 - 21
src/components/TopNav/index.vue

@@ -1,23 +1,23 @@
 <template>
-  <el-dialog :modal="true" placement="left" class="abc" :before-close="closeMenuHandler" :visible.sync="isShowMenu">
-    <el-menu :default-active="activeMenu" class="test" mode="horizontal" @select="handleSelect">
-      <template v-for="(item, index) in topMenus">
-        <el-menu-item :style="{ '--theme': theme }" :index="item.path" :key="index" v-if="index < visibleNumber"><svg-icon
-            :icon-class="item.meta.icon" />
-          {{ item.meta.title }}</el-menu-item>
-      </template>
-
-      <!-- 顶部菜单超出数量折叠 -->
-      <el-submenu :style="{ '--theme': theme }" index="more" v-if="topMenus.length > visibleNumber">
-        <template slot="title">更多菜单</template>
+    <el-dialog :modal="true" custom-class="testgks" width="20vw" :before-close="closeMenuHandler" :visible.sync="isShowMenu">
+      <el-menu :default-active="activeMenu" mode="horizontal" @select="handleSelect">
         <template v-for="(item, index) in topMenus">
-          <el-menu-item :index="item.path" :key="index" v-if="index >= visibleNumber"><svg-icon
-              :icon-class="item.meta.icon" />
+          <el-menu-item :style="{ '--theme': theme }" :index="item.path" :key="index"
+            v-if="index < visibleNumber"><svg-icon :icon-class="item.meta.icon" />
             {{ item.meta.title }}</el-menu-item>
         </template>
-      </el-submenu>
-    </el-menu>
-  </el-dialog>
+
+        <!-- 顶部菜单超出数量折叠 -->
+        <el-submenu :style="{ '--theme': theme }" index="more" v-if="topMenus.length > visibleNumber">
+          <template slot="title">更多菜单</template>
+          <template v-for="(item, index) in topMenus">
+            <el-menu-item :index="item.path" :key="index" v-if="index >= visibleNumber"><svg-icon
+                :icon-class="item.meta.icon" />
+              {{ item.meta.title }}</el-menu-item>
+          </template>
+        </el-submenu>
+      </el-menu>
+    </el-dialog>
 </template>
 
 <script>
@@ -159,13 +159,13 @@ export default {
 };
 </script>
 
-<style scoped lang="scss">
-.el-dialog__wrapper>.el-dialog {
-  margin-top: 10vh;
-
-  background: red;
+<style lang="scss">
+.testgks {
+  margin-left: 12vw;
 }
 
+
+
 .topmenu-container.el-menu--horizontal>.el-menu-item {
   float: left;
   height: 50px !important;

+ 28 - 28
src/views/norm/dataSubmission.vue

@@ -65,9 +65,9 @@
       </el-table-column> -->
       <el-table-column label="备注" align="center" prop="remark"></el-table-column>
       <el-table-column label="绩效公差上下公差占比" align="center" prop="msRetio" />
-        <el-table-column label="采集公差上下公差占比" align="center" prop="dfRetio" />
-        <el-table-column label="采集参考值" align="center" prop="collValue" />
-        <el-table-column label="绩效参考值" align="center" prop="meritsValue" />
+      <el-table-column label="采集公差上下公差占比" align="center" prop="dfRetio" />
+      <el-table-column label="采集参考值" align="center" prop="collValue" />
+      <el-table-column label="绩效参考值" align="center" prop="meritsValue" />
 
       <!-- <el-table-column label="明细类型(1=绩效,2=采集)" align="center" prop="type"></el-table-column> -->
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -341,37 +341,37 @@ export default {
 
 
       this.$refs["form"].validate(valid => {
-        if (!(parseInt(this.form.fnumber) == this.form.fnumber || parseFloat(this.form.fnumber) == this.form.fnumber)) {
-          this.$message.error('权数必须为整数或小数');
-          return;
-        }
+        if (valid) {
+          if (!(parseInt(this.form.fnumber) == this.form.fnumber || parseFloat(this.form.fnumber) == this.form.fnumber)) {
+            this.$message.error('权数必须为整数或小数');
+            return;
+          }
 
-        if (!(parseInt(this.form.meritsValue) == this.form.meritsValue || parseFloat(this.form.meritsValue) == this.form.meritsValue)) {
-          this.$message.error('绩效参考值必须为整数或小数');
-          return;
-        }
+          if (!(parseInt(this.form.meritsValue) == this.form.meritsValue || parseFloat(this.form.meritsValue) == this.form.meritsValue)) {
+            this.$message.error('绩效参考值必须为整数或小数');
+            return;
+          }
 
-        if (!(parseInt(this.form.collValue) == this.form.collValue || parseFloat(this.form.collValue) == this.form.collValue)) {
-          this.$message.error('采集参考值必须为整数或小数');
-          return;
-        }
+          if (!(parseInt(this.form.collValue) == this.form.collValue || parseFloat(this.form.collValue) == this.form.collValue)) {
+            this.$message.error('采集参考值必须为整数或小数');
+            return;
+          }
 
-        if (!(parseInt(this.form.dfRetio) == this.form.dfRetio || parseFloat(this.form.dfRetio) == this.form.dfRetio)) {
-          this.$message.error('采集公差上下公差占比必须为整数或小数');
-          return;
-        }
+          if (!(parseInt(this.form.dfRetio) == this.form.dfRetio || parseFloat(this.form.dfRetio) == this.form.dfRetio)) {
+            this.$message.error('采集公差上下公差占比必须为整数或小数');
+            return;
+          }
 
-        if (!(parseInt(this.form.msRetio) == this.form.msRetio || parseFloat(this.form.msRetio) == this.form.msRetio)) {
-          this.$message.error('绩效公差上下公差占比必须为整数或小数');
-          return;
-        }
+          if (!(parseInt(this.form.msRetio) == this.form.msRetio || parseFloat(this.form.msRetio) == this.form.msRetio)) {
+            this.$message.error('绩效公差上下公差占比必须为整数或小数');
+            return;
+          }
 
-        if (!(parseInt(this.form.normRatio) == this.form.normRatio || parseFloat(this.form.normRatio) == this.form.normRatio)) {
-          this.$message.error('分类占比必须为整数或小数');
-          return;
-        }
+          if (!(parseInt(this.form.normRatio) == this.form.normRatio || parseFloat(this.form.normRatio) == this.form.normRatio)) {
+            this.$message.error('分类占比必须为整数或小数');
+            return;
+          }
 
-        if (valid) {
           if (this.form.id != null) {
             updateGIVE(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");

+ 0 - 4
src/views/norm/feeindex.vue

@@ -329,10 +329,6 @@ export default {
             this.$message.error('分类占比必须为整数或小数');
             return;
           }
-          if (!(parseInt(this.form.fname) == this.form.fname || parseFloat(this.form.fname) == this.form.fname)) {
-            this.$message.error('指标参数名称必须为整数或小数');
-            return;
-          }
           if (!(parseInt(this.form.meritsValue) == this.form.meritsValue || parseFloat(this.form.meritsValue) == this.form.meritsValue)) {
             this.$message.error('绩效参考值必须为整数或小数');
             return;