zxr 3 년 전
부모
커밋
551b35363e
2개의 변경된 파일70개의 추가작업 그리고 59개의 파일을 삭제
  1. 24 20
      src/views/PrintsLog/printlog/index.vue
  2. 46 39
      src/views/PrintsManage/manage/index.vue

+ 24 - 20
src/views/PrintsLog/printlog/index.vue

@@ -228,7 +228,11 @@
         class-name="small-padding fixed-width"
       >
         <template slot-scope="scope">
-          <el-button size="btk" type="text" @click="handlesee(scope.row)" v-hasPermi="['PrintsLog:printlog:query']"  
+          <el-button
+            size="btk"
+            type="text"
+            @click="handlesee(scope.row)"
+            v-hasPermi="['PrintsLog:printlog:query']"
             >查看</el-button
           >
           <!-- <el-button size="mini" type="text" v-if="scope.row.statusG==1||scope.row.statusG==2">已归还</el-button> -->
@@ -377,7 +381,7 @@ import {
   addPrintlog,
   updatePrintlog,
   exportPrintlog,
-  listPeople,
+  listPeople
 } from "@/api/PrintsLog/printlog";
 
 export default {
@@ -419,33 +423,33 @@ export default {
         returnNumber: null,
         printCode: null,
         primaryPath: null,
-        presentPath: null,
+        presentPath: null
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {
         returnNumber: [
-          { required: true, message: "归还份数不能为空", trigger: "blur" },
-        ],
+          { required: true, message: "归还份数不能为空", trigger: "blur" }
+        ]
       },
       statusGlist: [],
       rylist: [],
       returnNumber: null,
-      flg: null,
+      flg: null
     };
   },
   created() {
     this.getList();
     //检查类型
-    this.getDicts("sys_statusG").then((response) => {
+    this.getDicts("sys_statusG").then(response => {
       this.statusGlist = response.data;
     });
   },
   methods: {
     //获取人员
     getrylist() {
-      listPeople().then((res) => {
+      listPeople().then(res => {
         if (res.code == 200) {
           this.rylist = res.rows;
         }
@@ -454,7 +458,7 @@ export default {
     /** 查询集中文印记录列表 */
     getList() {
       this.loading = true;
-      listPrintlog(this.queryParams).then((response) => {
+      listPrintlog(this.queryParams).then(response => {
         this.printlogList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -481,7 +485,7 @@ export default {
         printCode: null,
         primaryPath: null,
         presentPath: null,
-        unitName: null,
+        unitName: null
       };
       this.resetForm("form");
     },
@@ -497,7 +501,7 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
+      this.ids = selection.map(item => item.id);
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
@@ -510,7 +514,7 @@ export default {
     },
     /** 查看按钮操作 */
     handlesee(row) {
-      getPrintlog(row.id).then((res) => {
+      getPrintlog(row.id).then(res => {
         if (res.code == 200) {
           this.form = res.data;
           if (res.data.returnNumber) {
@@ -563,7 +567,7 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate((valid) => {
+      this.$refs["form"].validate(valid => {
         if (valid) {
           this.form.returnNumber =
             Number(this.form.returnNumber) + Number(this.returnNumber);
@@ -571,13 +575,13 @@ export default {
             this.form.statusG = 1;
           }
           if (this.form.id != null) {
-            updatePrintlog(this.form).then((response) => {
+            updatePrintlog(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addPrintlog(this.form).then((response) => {
+            addPrintlog(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -591,7 +595,7 @@ export default {
       const ids = row.id || this.ids;
       this.$modal
         .confirm("是否删除该记录?")
-        .then(function () {
+        .then(function() {
           return delPrintlog(ids);
         })
         .then(() => {
@@ -609,7 +613,7 @@ export default {
           this.exportLoading = true;
           return exportPrintlog(queryParams);
         })
-        .then((response) => {
+        .then(response => {
           this.$download.name(response.msg);
           this.exportLoading = false;
         })
@@ -618,7 +622,7 @@ export default {
     //打印编号
     printCodeblur() {
       if (this.form.printCode) {
-        listPrintlog({ printCode: this.form.printCode }).then((response) => {
+        listPrintlog({ printCode: this.form.printCode }).then(response => {
           this.form = response.rows[0];
           if (this.form.returnNumber) {
             this.form.returnNumber = this.form.returnNumber;
@@ -627,8 +631,8 @@ export default {
           }
         });
       }
-    },
-  },
+    }
+  }
 };
 </script>
 <style scoped>

+ 46 - 39
src/views/PrintsManage/manage/index.vue

@@ -307,11 +307,15 @@
           <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-form-item label="文印室" prop="printRoom">
+          <el-select
+            v-model="form.printRoom"
+            clearable
+            placeholder="请选择文印室"
+          >
             <el-option
               v-for="dict in printRooms"
               :key="dict.dictValue"
@@ -566,7 +570,7 @@ import {
   exportManage,
   printFile,
   listPeople,
-  printCode,
+  printCode
 } from "@/api/PrintsManage/manage";
 import { getToken } from "@/utils/auth";
 import Cookies from "js-cookie";
@@ -577,30 +581,30 @@ window.JSZip = require("jszip");
 
 export default {
   name: "Manage",
-  dicts: ["level","print_room"],
+  dicts: ["level", "print_room"],
   props: {
     // 值
     value: [String, Object, Array],
     // 数量限制
     limit: {
       type: Number,
-      default: 5,
+      default: 5
     },
     // 大小限制(MB)
     fileSize: {
       type: Number,
-      default: 50,
+      default: 50
     },
     // 文件类型, 例如['png', 'jpg', 'jpeg']
     fileType: {
       type: Array,
-      default: () => ["doc", "xls", "ppt",  "pdf",'zip'],
+      default: () => ["doc", "xls", "ppt", "pdf", "zip"]
     },
     // 是否显示提示
     isShowTip: {
       type: Boolean,
-      default: true,
-    },
+      default: true
+    }
   },
   data() {
     return {
@@ -646,7 +650,7 @@ export default {
         receiveName: null,
         sFile: null,
         printInfo: null,
-        printRoom:null,
+        printRoom: null
       },
       // 表单参数
       form: {},
@@ -656,12 +660,12 @@ export default {
       //级别
       levelMs: [],
       //文印室
-      printRooms:[],
+      printRooms: [],
       baseUrl: process.env.VUE_APP_BASE_API,
       uploadFileUrl:
         process.env.VUE_APP_BASE_API + "/PrintsManage/manage/printFile", // 上传的图片服务器地址
       headers: {
-        Authorization: "Bearer " + getToken(),
+        Authorization: "Bearer " + getToken()
       },
       fileList: [],
       faith: null,
@@ -670,21 +674,21 @@ export default {
       yaoqiu: "",
       dyopen2: false,
       tableau: null,
-      yaoqiuflg:false,
+      yaoqiuflg: false
     };
   },
   created() {
     this.getList();
     //级别
-    this.getDicts("level").then((response) => {
+    this.getDicts("level").then(response => {
       this.levelMs = response.data;
     });
     //文印室
-    this.getDicts("print_room").then((response) => {
+    this.getDicts("print_room").then(response => {
       this.printRooms = response.data;
     });
     //是否
-    this.getDicts("sys_is").then((response) => {
+    this.getDicts("sys_is").then(response => {
       this.islist = response.data;
     });
   },
@@ -692,7 +696,7 @@ export default {
     /** 查询集中文印主列表 */
     getList() {
       this.loading = true;
-      listManage(this.queryParams).then((response) => {
+      listManage(this.queryParams).then(response => {
         this.manageList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -732,7 +736,7 @@ export default {
         printNumber: null,
         isPrintTwo: null,
         isPrintColor: null,
-        printRoom:null,
+        printRoom: null
       };
       this.resetForm("form");
     },
@@ -750,7 +754,7 @@ export default {
         statusG: null,
         isPrintTwo: null,
         isPrintColor: null,
-        printRoom:null,
+        printRoom: null
       };
       this.resetForm("dyform");
     },
@@ -766,7 +770,7 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
+      this.ids = selection.map(item => item.id);
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
@@ -782,7 +786,7 @@ export default {
     handleUpdate(row) {
       this.reset();
       const id = row.id || this.ids;
-      getManage(id).then((response) => {
+      getManage(id).then(response => {
         this.form = response.data;
         this.form.isPrintColor = response.data.isPrintColor + "";
         this.form.isPrintTwo = response.data.isPrintTwo + "";
@@ -792,16 +796,16 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate((valid) => {
+      this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.id != null) {
-            updateManage(this.form).then((response) => {
+            updateManage(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addManage(this.form).then((response) => {
+            addManage(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -815,7 +819,7 @@ export default {
       const ids = row.id || this.ids;
       this.$modal
         .confirm("是否确认删除该数据项?")
-        .then(function () {
+        .then(function() {
           return delManage(ids);
         })
         .then(() => {
@@ -833,7 +837,7 @@ export default {
           this.exportLoading = true;
           return exportManage(queryParams);
         })
-        .then((response) => {
+        .then(response => {
           this.$download.name(response.msg);
           this.exportLoading = false;
         })
@@ -859,7 +863,7 @@ export default {
           fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
           this.form.type = fileExtension;
         }
-        const isTypeOk = this.fileType.some((type) => {
+        const isTypeOk = this.fileType.some(type => {
           if (file.type.indexOf(type) > -1) return true;
           if (fileExtension && fileExtension.indexOf(type) > -1) return true;
           return false;
@@ -869,8 +873,8 @@ export default {
             `文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`
           );
           this.form.name = null;
-          this.form.size=null;
-          this.form.type=null;
+          this.form.size = null;
+          this.form.type = null;
           return false;
         }
       }
@@ -916,24 +920,24 @@ export default {
       // this.dyform.isReturn = row.isReturn + "";
       if (row.isPrintColor == 1) {
         this.yaoqiu = "彩打";
-        this.yaoqiuflg=true;
+        this.yaoqiuflg = true;
       }
       if (row.isPrintTwo == 1) {
-        this.yaoqiuflg=true;
+        this.yaoqiuflg = true;
         if (this.yaoqiu) {
           this.yaoqiu += " 双面打";
         } else {
           this.yaoqiu = "双面打";
         }
       }
-      if (row.isPrintTwo != 1&&row.isPrintColor!=1) {
-        this.yaoqiuflg=false;
+      if (row.isPrintTwo != 1 && row.isPrintColor != 1) {
+        this.yaoqiuflg = false;
       }
       this.getrylist();
     },
     //获取人员
     getrylist() {
-      listPeople().then((res) => {
+      listPeople().then(res => {
         if (res.code == 200) {
           this.rylist = res.rows;
         }
@@ -946,19 +950,22 @@ export default {
       } else {
         this.dyform.statusG = 0;
       }
-      printCode(this.dyform).then((res) => {
+      printCode(this.dyform).then(res => {
         if (res.code == 200) {
           console.log(res);
           this.dyopen = false;
           this.getList();
           // var open=window.open();
-          location.href = process.env.VUE_APP_BASE_API+'/profile/print/' + res.printFileName;
+          location.href =
+            process.env.VUE_APP_BASE_API +
+            "/profile/print/" +
+            res.printFileName;
         }
       });
       // open.location.href="http://192.168.5.188:8080/priofile/print/202203211244.docx";
       // window.open( `https://view.officeapps.live.com/op/view.aspx?src=http://192.168.5.188:8080/profile/print/202203211428.docx`, "_blank");
-    },
-  },
+    }
+  }
 };
 </script>
 <style scoped>