瀏覽代碼

三级菜单

zxr 3 年之前
父節點
當前提交
ee0405e3fa
共有 2 個文件被更改,包括 45 次插入10 次删除
  1. 17 8
      src/layout/components/Sidebar/index.vue
  2. 28 2
      src/views/PrintsManage/manage/index.vue

+ 17 - 8
src/layout/components/Sidebar/index.vue

@@ -66,8 +66,6 @@ export default {
   created() {
     if (this.$route.query.name) {
       this.sidebarRoutersfun();
-      this.p = this.routs[0].path + "/" + this.routs[0].children[0].path;
-      this.$router.push({ path: this.p });
     } else {
       this.$route.query.name = "/" + this.$route.path.split("/")[1];
       this.sidebarRoutersfun();
@@ -76,19 +74,30 @@ export default {
   methods: {
     sidebarRoutersfun() {
       this.sidebarRouters.map(item => {
+        console.log(this.$route.query.name);
         if (item.path == this.$route.query.name) {
+          console.log(item);
           this.routs.push(item);
+          if (this.routs[0].children[0].children) {
+             this.p = this.routs[0].path + "/" + this.routs[0].children[0].path + "/" + this.routs[0].children[0].children[0].path;
+            this.$router.push({ path: this.p });
+          } else {
+            this.p = this.routs[0].path + "/" + this.routs[0].children[0].path;
+            this.$router.push({ path: this.p });
+          }
         }
         // console.log(this.routs.length)
       });
       if (this.routs.length <= 0) {
         // window.open(`/pt`, "_self");
-         this.$router
-        .push({ name: 'pt',
-          params: {
-            name: '您暂无权限访问'
-          } })
-        .catch(() => {});
+        this.$router
+          .push({
+            name: "pt",
+            params: {
+              name: "您暂无权限访问"
+            }
+          })
+          .catch(() => {});
       }
     }
   }

+ 28 - 2
src/views/PrintsManage/manage/index.vue

@@ -308,8 +308,18 @@
           <el-input
             v-model="form.sendName"
             disabled
-            placeholder="请输入发送人"
+            placeholder="请输入发送人" 
           />
+        </el-form-item>
+         <el-form-item label="文印室" prop="printRoom">
+          <el-select v-model="form.printRoom" clearable placeholder="请选择文印室">
+            <el-option
+              v-for="dict in printRooms"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="parseInt(dict.dictValue)"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <div class="jiben">文件信息</div>
         <el-form-item label="上传文件">
@@ -517,6 +527,7 @@
             margin-bottom: 20px;
             padding-left: 15px;
           "
+          v-if="yaoqiuflg"
         >
           其他要求:{{ yaoqiu }}
         </div>
@@ -567,7 +578,7 @@ window.JSZip = require("jszip");
 
 export default {
   name: "Manage",
-  dicts: ["level"],
+  dicts: ["level","print_room"],
   props: {
     // 值
     value: [String, Object, Array],
@@ -636,6 +647,7 @@ export default {
         receiveName: null,
         sFile: null,
         printInfo: null,
+        printRoom:null,
       },
       // 表单参数
       form: {},
@@ -644,6 +656,8 @@ export default {
       rules: {},
       //级别
       levelMs: [],
+      //文印室
+      printRooms:[],
       baseUrl: process.env.VUE_APP_BASE_API,
       uploadFileUrl:
         process.env.VUE_APP_BASE_API + "/PrintsManage/manage/printFile", // 上传的图片服务器地址
@@ -657,6 +671,7 @@ export default {
       yaoqiu: "",
       dyopen2: false,
       tableau: null,
+      yaoqiuflg:false,
     };
   },
   created() {
@@ -665,6 +680,10 @@ export default {
     this.getDicts("level").then((response) => {
       this.levelMs = response.data;
     });
+    //文印室
+    this.getDicts("print_room").then((response) => {
+      this.printRooms = response.data;
+    });
     //是否
     this.getDicts("sys_is").then((response) => {
       this.islist = response.data;
@@ -714,6 +733,7 @@ export default {
         printNumber: null,
         isPrintTwo: null,
         isPrintColor: null,
+        printRoom:null,
       };
       this.resetForm("form");
     },
@@ -731,6 +751,7 @@ export default {
         statusG: null,
         isPrintTwo: null,
         isPrintColor: null,
+        printRoom:null,
       };
       this.resetForm("dyform");
     },
@@ -896,14 +917,19 @@ export default {
       // this.dyform.isReturn = row.isReturn + "";
       if (row.isPrintColor == 1) {
         this.yaoqiu = "彩打";
+        this.yaoqiuflg=true;
       }
       if (row.isPrintTwo == 1) {
+        this.yaoqiuflg=true;
         if (this.yaoqiu) {
           this.yaoqiu += " 双面打";
         } else {
           this.yaoqiu = "双面打";
         }
       }
+      if (row.isPrintTwo != 1&&row.isPrintColor!=1) {
+        this.yaoqiuflg=false;
+      }
       this.getrylist();
     },
     //获取人员