Browse Source

集中文印

ltao 3 năm trước cách đây
mục cha
commit
4c53a04a97

+ 19 - 9
src/api/PrintsManage/manage.js

@@ -53,13 +53,13 @@ export function exportManage(query) {
 }
 
 // 轮巡提醒
-export function printTrigger(data) {
-  return request({
-    url: "/PrintsManage/manage/printTrigger",
-    method: "POST",
-    data: data
-  });
-}
+// export function printTrigger(data) {
+//   return request({
+//     url: "/PrintsManage/manage/printTrigger",
+//     method: "POST",
+//     data: data
+//   });
+// }
 
 // 轮巡提醒 每人
 export function printEachTrigger(data) {
@@ -90,10 +90,10 @@ export function listPeople(query) {
 
 //打印获取详情
 export function printCode(data) {
-  return request({
+  return request({  
     url: "/PrintsLog/printlog/printCode",
     method: "POST",
-    data: data
+    data: data,
   });
 }
 
@@ -106,3 +106,13 @@ export function printPeople(data) {
   });
 }
 
+// 确定打印弹框
+export function tkbox(data) {
+  return request({
+    url: "/PrintsLog/printlog/printinsertredis",
+    method: "POST",
+    data: data
+  });
+}
+
+

+ 5 - 0
src/assets/styles/global.css

@@ -1222,3 +1222,8 @@ input:-moz-placeholder {
   width: 3px; */
   background: #c1c1c1;
 }
+
+/* 教案库上传文件弹框样式 */
+#uploadfile .el-dialog__body{
+  padding: 30px 0px !important;
+}

+ 10 - 10
src/layout/components/AppMain.vue

@@ -189,16 +189,16 @@ export default {
     },
     startTime() {
       this.timer = setInterval(() => {
-        printTrigger().then(res => {
-          if (res.code == 200) {
-            if (res.print == "print") {
-              if (res.numb != 0) {
-                this.title2 = "您有打印文件需要处理,请尽快处理";
-                this.open2 = true;
-              }
-            }
-          }
-        });
+        // printTrigger().then(res => {
+        //   if (res.code == 200) {
+        //     if (res.print == "print") {
+        //       if (res.numb != 0) {
+        //         this.title2 = "您有打印文件需要处理,请尽快处理";
+        //         this.open2 = true;
+        //       }
+        //     }
+        //   }
+        // });
         printEachTrigger().then(res => {
           if (res.code == 200) {
             if (res.print == "printUserInfo") {

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

@@ -390,7 +390,7 @@ import {
   addPrintlog,
   updatePrintlog,
   exportPrintlog,
-  listPeople
+  listPeople,
 } from "@/api/PrintsLog/printlog";
 
 export default {
@@ -432,33 +432,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;
         }
@@ -467,7 +467,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;
@@ -494,7 +494,7 @@ export default {
         printCode: null,
         primaryPath: null,
         presentPath: null,
-        unitName: null
+        unitName: null,
       };
       this.resetForm("form");
     },
@@ -510,7 +510,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;
     },
@@ -523,7 +523,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) {
@@ -576,7 +576,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);
@@ -584,13 +584,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();
@@ -604,7 +604,7 @@ export default {
       const ids = row.id || this.ids;
       this.$modal
         .confirm("是否删除该记录?")
-        .then(function() {
+        .then(function () {
           return delPrintlog(ids);
         })
         .then(() => {
@@ -622,7 +622,7 @@ export default {
           this.exportLoading = true;
           return exportPrintlog(queryParams);
         })
-        .then(response => {
+        .then((response) => {
           this.$download.name(response.msg);
           this.exportLoading = false;
         })
@@ -631,17 +631,22 @@ export default {
     //打印编号
     printCodeblur() {
       if (this.form.printCode) {
-        listPrintlog({ printCode: this.form.printCode }).then(response => {
-          this.form = response.rows[0];
-          if (this.form.returnNumber) {
-            this.form.returnNumber = this.form.returnNumber;
-          } else {
-            this.form.returnNumber = 0;
+        listPrintlog({ printCode: this.form.printCode }).then((response) => {
+          // console.log(response)
+          if (response.rows[0]) {
+            this.form = response.rows[0];
+            if (this.form.returnNumber) {
+              this.form.returnNumber = this.form.returnNumber;
+            } else {
+              this.form.returnNumber = 0;
+            }
+          }else{
+            console.log(11)
           }
         });
       }
-    }
-  }
+    },
+  },
 };
 </script>
 <style scoped>

+ 132 - 24
src/views/PrintsManage/manage/index.vue

@@ -271,9 +271,17 @@
         label="操作"
         align="center"
         class-name="small-padding fixed-width"
-        width="250px"
+        width="280px"
       >
         <template slot-scope="scope">
+          <el-button
+            size="btu"
+            type="text"
+            @click="handleok(scope.row)"
+            v-hasPermi="['PrintsLog:printlog:edit']"
+            v-if="scope.row.isShow == 1"
+            >确定</el-button
+          >
           <el-button
             size="btk"
             type="text"
@@ -689,9 +697,7 @@
           <div v-html="tableau"></div>
         </div>
         <div slot="footer" class="dialog-footer">
-          <el-button type="primary" @click="open44 = false"
-            >关 闭</el-button
-          >
+          <el-button type="primary" @click="open44 = false">关 闭</el-button>
           <!-- <el-button @click="open44 = false" size="" class="aa1"
             >取 消</el-button
           > -->
@@ -712,6 +718,7 @@ import {
   printFile,
   listPeople,
   printCode,
+  tkbox,
 } from "@/api/PrintsManage/manage";
 import { getToken } from "@/utils/auth";
 import Cookies from "js-cookie";
@@ -850,6 +857,8 @@ export default {
       // excel表格
       tableau: null,
       open44: false,
+      // 确定按钮
+      printshow: false,
     };
   },
   created() {
@@ -1101,7 +1110,7 @@ export default {
       this.dyform.printRoom = row.printRoom;
       this.dyform.type = row.type;
       // this.dyform.isReturn = row.isReturn + "";
-      console.log(this.dyform)
+      console.log(this.dyform);
       if (row.isPrintColor == 1) {
         this.yaoqiu = "彩打";
         this.yaoqiuflg = true;
@@ -1121,7 +1130,7 @@ export default {
     },
     // 查看按钮预览
     handlelook(row) {
-      console.log(row);
+      // console.log(row);
       if (row.type == "docx" || row.type == "doc") {
         console.log(11);
         this.open33 = true;
@@ -1174,16 +1183,61 @@ export default {
           } else {
             this.dyform.statusG = 0;
           }
+
           printCode(this.dyform).then((res) => {
+            console.log(this.dyform);
+            // console.log(this.dyform)
             if (res.code == 200) {
-              console.log(res);
-              this.dyopen = false;
-              this.getList();
+              if (this.dyform.type == "pdf") {
+                // let blob = new Blob([res]);
+                // let objectUrl = URL.createObjectURL(blob);
+                // let link = document.createElement("a");
+                // link.download =this.dyform.file;
+                // link.href = objectUrl;
+                // link.click();
+                // link.remove();
+                let xhr = new XMLHttpRequest();
+                xhr.open("get", this.dyform.file, true);
+                xhr.setRequestHeader("Content-Type", `application/pdf`);
+                xhr.responseType = "blob";
+                let that = this;
+                xhr.onload = function () {
+                  if (this.status == 200) {
+                    //接受二进制文件流
+                    var blob = this.response;
+                    // that.downloadExportFile(blob, fileName);
+                    let downloadElement = document.createElement("a");
+                    let href = blob;
+                    if (typeof blob == "string") {
+                      downloadElement.target = "_blank";
+                    } else {
+                      href = window.URL.createObjectURL(blob); //创建下载的链接
+                    }
+                    downloadElement.href = href;
+                    downloadElement.download =
+                      // tagFileName +
+                      //下载后文件名
+                      document.body.appendChild(downloadElement);
+                    downloadElement.click(); //点击下载
+                    document.body.removeChild(downloadElement); //下载完成移除元素
+                    if (typeof blob != "string") {
+                      window.URL.revokeObjectURL(href); //释放掉blob对象
+                    }
+                  }
+                };
+                xhr.send();
+                this.dyopen = false;
+                this.getList();
+              } else {
+                location.href =
+                  process.env.VUE_APP_BASE_API +
+                  "/profile/print/" +
+                  res.printFileName;
+                this.dyopen = false;
+                this.printshow = true;
+                this.getList();
+              }
               // var open=window.open();
-              location.href =
-                process.env.VUE_APP_BASE_API +
-                "/profile/print/" +
-                res.printFileName;
               //  location.href =res.file;
             }
           });
@@ -1193,6 +1247,61 @@ export default {
       // 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");
     },
+    // 确定
+    handleok() {
+      console.log(this.dyform);
+      tkbox(this.dyform).then((res) => {
+        console.log(res);
+        this.printshow = false;
+        this.getList();
+      });
+    },
+    /**
+     * 预览PDF
+     */
+    previewPDF(row, index) {
+      this.previewDialog = true;
+      console.log("", row, index);
+    },
+    // 上一页函数,
+    prePage() {
+      this.gopage = true;
+      var page = this.pageNum;
+      page = page > 1 ? page - 1 : this.pageTotalNum;
+      this.pageNum = page;
+    },
+    // 下一页函数
+    nextPage() {
+      this.gopage = false;
+      var page = this.pageNum;
+      page = page < this.pageTotalNum ? page + 1 : 1;
+      this.pageNum = page;
+    },
+    // 页面顺时针翻转90度。
+    clock() {
+      this.pageRotate += 90;
+    },
+    // 页面逆时针翻转90度。
+    counterClock() {
+      this.pageRotate -= 90;
+    },
+    // 页面加载回调函数,其中e为当前页数
+    pageLoaded(e) {
+      this.curPageNum = e;
+    },
+    // 错误时回调函数。
+    pdfError(error) {
+      console.error(error);
+    },
+    // 打印全部
+    pdfPrintAll() {
+      /**
+       * 打印界面字符乱码是因为你pdf中使用了自定义字体导致的,谷歌浏览器打印的时候预览界面真的变成了真·方块字 ,解决方案如下:
+       * 用文章最后的pdfjsWrapper.js在替换掉node_modules/vue-pdf/src/pdfjsWrapper.js
+       */
+      console.log("打印");
+      this.$refs.pdf.print();
+    },
   },
 };
 </script>
@@ -1396,32 +1505,32 @@ export default {
   background: none !important;
 }
 /* excel表格样式 */
-::v-deep .home table tr td{
+::v-deep .home table tr td {
   text-align: right;
   height: 20px;
   min-width: 60px;
   text-align: center;
   /* margin-left: -5px ; */
   /* width: 70px !important; */
-  border-right:1px solid black;
+  border-right: 1px solid black;
   border-bottom: 1px solid black !important;
 }
-::v-deep .home table{
+::v-deep .home table {
   width: 100%;
-  border-spacing:0px !important;
+  border-spacing: 0px !important;
   border-top: 1px solid black;
   border-left: 1px solid black;
   /* border-collapse: collapse !important;
   border-color:#b6ff00 !important; */
 }
-::v-deep .docx-wrapper table tr td{
+::v-deep .docx-wrapper table tr td {
   border-bottom: 1px solid black !important;
 }
-::v-deep .docx{
+::v-deep .docx {
   width: 100% !important;
 }
 /* 文件关闭小叉号 */
-::v-deep .el-dialog__headerbtn .el-dialog__close{
+::v-deep .el-dialog__headerbtn .el-dialog__close {
   color: #ccc !important;
 }
 /* 上一页样式 */
@@ -1429,7 +1538,7 @@ export default {
   width: 60px;
   height: 28px;
   background: #f4f4f4;
-  color:#60627d;
+  color: #60627d;
   border-radius: 14px 0px 0px 14px;
   padding: 6px 9px;
 }
@@ -1441,9 +1550,8 @@ export default {
   border-radius: 0px 14px 14px 0px;
   padding: 6px 9px;
 }
-.bg{
-  background: #1D96FF;
+.bg {
+  background: #1d96ff;
   color: white;
 }
-
 </style>

+ 18 - 0
src/views/bdglregular/regularinfo/index.vue

@@ -349,6 +349,13 @@
             "
             >审批</el-button
           >
+          <!-- <el-button
+            size="btu"
+            type="text"
+            @click="handleAdds(scope.row)"
+           
+            >修改</el-button
+          > -->
           <!-- <el-button size="btd" type="text" @click="handleDelete(scope.row)"
             >删除</el-button
           > -->
@@ -910,8 +917,19 @@ export default {
       }
       this.form.inspectionTime = y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
     },
+    // // 修改按钮操作
+    // handleAdds(row){
+    //   this.open = true;
+    //   this.title = "经常性检查";
+    //   const id = row.id || this.ids;
+    //   getRegularinfo(id).then((response)=>{
+    //     this.form = response.data;
+    //     this.open = true;
+    //   })
+    // },
     /** 整改按钮操作 */
     handleUpdate(row) {
+      console.log(row)
       this.reset();
       const id = row.id || this.ids;
       getRegularinfo(id).then((response) => {

+ 33 - 74
src/views/pt.vue

@@ -4,15 +4,7 @@
     <div class="box">
       <!-- 头部区域 -->
       <div class="tou">
-        <div class="yong_hu">
-          <span style="color: ">单位 :</span>
-          <span class="span" style="padding-left: 4px">{{ danWie }}</span>
-          <span style="color: #00f6ff">用户名 :</span>
-          <span style="padding-left: 4px; color: #00f6ff">{{ yongHu }}</span>
-        </div>
-        <span style="color: #00f6ff; font-size: 1vw" class="tiem">{{
-          times
-        }}</span>
+        <span style="color: #00ccff; font-size: 1.2vw">{{ times }}</span>
         <!-- <img class="liuxian" src="../assets/images/流线.gif" alt />
         <img class="img-left" src="../assets/images/闪烁GIF-慢.gif" alt /> -->
       </div>
@@ -189,11 +181,7 @@
           <ul class="ul">
             <li>
               <div class="demo-box">
-                <div
-                  class="demo active"
-                  v-on:click="sixiangfun"
-                  data-url="/diary?ref=addtabs"
-                >
+                <div class="demo active" v-on:click="sixiangfun" data-url="/diary?ref=addtabs">
                   <img src="../images/sx.png" alt />
                 </div>
               </div>
@@ -609,7 +597,6 @@ import {
   updateNotice,
   getWorkTask,
 } from "@/api/pt";
-import { getUserProfile } from "@/api/system/user";
 import Cookies from "js-cookie";
 export default {
   dicts: ["sys_notice_status", "sys_notice_type"],
@@ -643,14 +630,9 @@ export default {
       form: {},
       noticeList: [],
       worklist: [],
-      // 用户信息
-      user: {},
-      danWie: "",
-      yongHu: "",
     };
   },
   created() {
-    this.getUser();
     this.timer = null;
     this.startTime();
     this.timer2 = null;
@@ -665,14 +647,6 @@ export default {
     // console.log(this.$route.params.name)
   },
   methods: {
-    // 获取登录信息
-    getUser() {
-      getUserProfile().then((response) => {
-        this.user = response.data;
-        this.danWie = response.data.dept.deptName;
-        this.yongHu = response.data.nickName;
-      });
-    },
     getlist() {
       listNotice().then((res) => {
         this.noticeList = res.data;
@@ -727,95 +701,95 @@ export default {
       this.$router
         .push({ path: "/index", query: { name: "/grassrootsregistration" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     zhanbeifun() {
       this.$router
         .push({ path: "/index", query: { name: "/combatduty" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     renlifun() {
       this.$router
         .push({ path: "/index", query: { name: "/peopleManage" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     renyuanfun() {
       this.$router
         .push({ path: "/index", query: { name: "/peopleChuRu" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     yingfangfun() {
       this.$router
         .push({ path: "/index", query: { name: "/barracksManagement" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     junchefun() {
       this.$router
         .push({ path: "/index", query: { name: "/militaryvehicleManagement" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     gongzuofun() {
       this.$router
         .push({ path: "/index", query: { name: "/workingArrangements" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     guizhangfun() {
       this.$router
         .push({ path: "/index", query: { name: "/regulations" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     yiliaofun() {
       this.$router
         .push({ path: "/index", query: { name: "/medicalhealth" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     jianchafun() {
       this.$router
         .push({ path: "/index", query: { name: "/bdglregular" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     mengangfun() {
       this.$router
         .push({ path: "/index", query: { name: "/doormanManage" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     yingjufun() {
       this.$router
         .push({ path: "/index", query: { name: "/materialManagement" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     xitongfun() {
       this.$router
         .push({ path: "/index", query: { name: "/system" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     gongju() {
       this.$router
         .push({ path: "/index", query: { name: "/tool" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+        Cookies.set('shuaxin','false');
     },
     wenyinfun() {
       this.$router
         .push({ path: "/index", query: { name: "/print" } })
         .catch(() => {});
-      Cookies.set("shuaxin", "false");
+       Cookies.set('shuaxin','false');
     },
     taishifun() {
       this.$router.push({ path: "/taishi" }).catch(() => {});
-      Cookies.set("shuaxin", "false");
+      Cookies.set('shuaxin','false');
       // window.open(`/taishi`,'_self');
     },
     baomifun() {
@@ -886,17 +860,17 @@ export default {
     },
     startTime2() {
       this.timer = setInterval(() => {
-        printTrigger().then((res) => {
-          if (res.code == 200) {
-            if (res.print == "print") {
-              if (res.numb != 0) {
-                this.title2 = "您有打印文件需要处理,请尽快处理";
-                this.open2 = true;
-              }
-            }
-          }
-        });
-        printEachTrigger().then((res) => {
+        // printTrigger().then((res) => {
+        //   if (res.code == 200) {
+        //     if (res.print == "print") {
+        //       if (res.numb != 0) {
+        //         this.title2 = "您有打印文件需要处理,请尽快处理";
+        //         this.open2 = true;
+        //       }
+        //     }
+        //   }
+        // });
+        printEachTrigger().then((res) => { 
           if (res.code == 200) {
             if (res.print == "printUserInfo") {
               var sendId = Cookies.get("userId");
@@ -909,7 +883,7 @@ export default {
             }
           }
         });
-        workEachTrigger().then((res) => {
+        workEachTrigger().then((res) => {   
           var sendId = Cookies.get("userId");
           if (res.code == 200) {
             if (res.workEach != 0) {
@@ -920,7 +894,7 @@ export default {
             }
           }
         });
-        workTrigger().then((res) => {
+        workTrigger().then((res) => { 
           // var sendId = Cookies.get("userId");
           if (res.code == 200) {
             if (res.workRequest != 0) {
@@ -1018,25 +992,10 @@ li {
   background: url("../assets/images/首页顶部1.gif") no-repeat center;
   background-size: cover;
 }
-.tou .yong_hu {
+.tou span {
   position: absolute;
-  right: 24px;
+  right: 100px;
   top: 33px;
-  min-width: 320px;
-  font-size: 15px;
-  box-sizing: border-box;
-}
-.tou .tiem {
-  position: absolute;
-  /* right: 24px; */
-  left: 124px;
-  top: 33px;
-  min-width: 320px;
-  font-size: 15px;
-  box-sizing: border-box;
-}
-.tou .span {
-  margin-right: 20px;
 }
 .liuxian {
   position: absolute;

+ 13 - 1
src/views/thought/teacherFile/index.vue

@@ -251,10 +251,11 @@
           style="color: pink"
           :title="title"
           :visible.sync="open"
-          width="420px"
+          width="520px"
           append-to-body
           class="el-dialog__header"
           :close-on-click-modal="false"
+          id="uploadfile"
         >
           <el-form
             ref="form"
@@ -1430,6 +1431,10 @@ table {
   color: white;
   text-indent: 0.5em;
 }
+::v-deep .el-upload-list__item a .el-link--inner{
+  padding: 8px;
+  line-height: 10px;
+}
 ::v-deep .el-select-dropdown__item {
   color: white;
 }
@@ -1652,4 +1657,11 @@ body,
 ::v-deep .docx{
   width: 100% !important;
 }
+/* 上传文件弹框样式 */
+::v-deep #uploadfile .el-dialog__body{
+  padding: 30px 62px !important;
+}
+::v-deep .el-upload-list__item{
+  width: 350px;
+}
 </style>