소스 검색

Merge branch 'master' of http://139.196.39.194:9021/chenc/cd-work-flow-web

jbb 2 년 전
부모
커밋
de93fe6607

+ 92 - 18
src/views/activiti/form/demoForm2.vue

@@ -1,6 +1,14 @@
 <template>
-  <div class="form-main" id="form-main">
-    <a-card :body-style="{ padding: '24px 32px' }" :bordered="false">
+  <div class="form-main" id="form-main" >
+    <div v-if="printTitle" class="no-print" style="text-align: right">
+      <a-button v-print="'#printContent'" ghost type="primary">打印</a-button>
+    </div>
+    <a-card :body-style="{ padding: '15px 32px' }" :bordered="false" id="printContent"  :class="{'abcdefg':true}" >
+    <!-- <div style="text-align: center;">
+        <h3 v-print="'#printContent'" ghost title="点击此处,打印当前页面" >{{printTitle}}</h3>
+        <br/>
+      </div> -->
+       <section ref="print" id="printContent" class="abcdefg">
       <!-- <a-form @submit="handleSubmit" :form="form">
         <a-form-item
           label="标题"
@@ -29,6 +37,10 @@
         ref="KFB"
         @submit="handleSubmit"
       />
+      <div v-if="printTitle" style="text-align: right;margin-right: 13%">
+        <img v-print="'#printContent'" ghost style="margin-top: -30px;"  width="170px" height="80px" src="http://www.myfitt.cn:18087/jeecg-boot/sys/common/static/temp/20230310100319_1678417947827.png"/>
+      </div>
+      </section>
       <div style="text-align:center">
         <a-button
           htmlType="submit"
@@ -67,10 +79,18 @@ import FixedZyModal from './fixedZyModal'
 import { postAction, postFormDataAction} from '@/api/manage'
 import {annualLeave} from '@api/oa/cd-personnel-files'
 import moment from 'moment'
-import {getProjctName}from '../../../../url.config'
+import {getProjctName} from '../../../../url.config'
+  import ACol from "ant-design-vue/es/grid/Col";
+  import ARow from "ant-design-vue/es/grid/Row";
+  import ATextarea from 'ant-design-vue/es/input/TextArea'
+
 export default {
     name: 'DemoForm',
     props: {
+		reBizCode:{
+        type: String,
+        default: ''
+      },
     /* 全局禁用,可表示查看 */
         disabled: {
             type: Boolean,
@@ -89,6 +109,9 @@ export default {
         isNew: { type: Boolean, default: false, required: false }
     },
     components: {
+		ATextarea,
+		ARow,
+		ACol,
         todoManageOperation,
         moment,
         PersonnelFilesModal,
@@ -98,6 +121,7 @@ export default {
     },
     data () {
         return {
+            printTitle:false,
             isSJ: false,
             todoManageOperationObject: {
                 isSave: false,
@@ -155,9 +179,9 @@ export default {
     // },
         dynamicData: {
             handler (newName, oldName) {
-                console.log('obj.a changed')
-                console.log(newName)
-                console.log(oldName)
+                // console.log('obj.a changed')
+                // console.log(newName)
+                // console.log(oldName)
                 newName.handle = this.funName1
                 newName.fixed_zy = this.fixedZy
                 newName.fixed_gh =this.fixedGh
@@ -171,8 +195,16 @@ export default {
         }
     },
     created () {
-      
-        console.log("==============="+getProjctName());      
+   //    debugger
+		 // console.log("==============="+this.processData);    
+		 // console.log("==============="+this.processData.status);    
+		 // console.log("==============="+this.processData.title);    
+        if(this.processData.status == 2){
+          this.printTitle = true;
+        }else{
+          this.printTitle = false;
+        }
+        // console.log("==============="+getProjctName());      
         window.deleteRow = this.deleteRow
         // console.log('流程数据', this.processData)
         // 加载一些下拉选择数据等
@@ -1748,19 +1780,60 @@ function updateModel (object, childIndex) {
     size: landscape;
     /* 去除浏览器默认页眉页脚 */
     margin: 0;
+    
   }
-   .noprint {
+  .noprint {
     display: none;
   }
-  /deep/.ant-input{
-      border: none !important;
-  }
-  /deep/ .ant-modal-header{
-       display: none !important;
-  }
-   /deep/ .ant-modal-content{
-      box-shadow:none !important
-  }
+  // /deep/.ant-input{
+  //     border: none !important;
+  // }
+  // /deep/ .ant-modal-header{
+  //      display: none !important;
+  // }
+  //  /deep/ .ant-modal-content{
+  //     box-shadow:none !important
+  // }
+  
+  /deep/ * {
+      color: #000000!important;
+      -webkit-tap-highlight-color: #000000!important;
+    }
+    /*update_end author:scott date:20191203 for:打印机打印的字体模糊问题 */
+  
+  /deep/  .abcdefg .ant-card-body{
+      margin-left: 0%;
+      margin-right: 0%;
+      margin-bottom: 1%;
+      border:0px solid black;
+      min-width: 800px;
+      color:#000000!important;
+    }
+  /deep/  .explain{
+      text-align: left;
+      margin-left: 50px;
+      color:#000000!important;
+    }
+   /deep/ .explain .ant-input,.sign .ant-input{
+      font-weight:bolder;
+      text-align:center;
+      border-left-width:0px!important;
+      border-top-width:0px!important;
+      border-right-width:0px!important;
+    }
+   /deep/ .explain div{
+      margin-bottom: 10px;
+    }
+    /* you can make up upload button and sample style by using stylesheets */
+  /deep/  .ant-upload-select-picture-card i {
+      font-size: 32px;
+      color: #999;
+    }
+  
+  /deep/  .ant-upload-select-picture-card .ant-upload-text {
+      margin-top: 8px;
+      color: #666;
+    }
 }
  /deep/ .anticon-question-circle-o {
     display: none !important;
@@ -1771,4 +1844,5 @@ function updateModel (object, childIndex) {
 /deep/ .active .ant-select-selection {
     border: 1px solid red;
 }
+
 </style>

+ 2 - 2
src/views/process-center/applyListByTableName.vue

@@ -530,8 +530,8 @@ export default {
         }
       })
       
-     this.queryParam.ortherParam = ''+this.ortherParam.map(String);
-      
+      this.queryParam.ortherParam = ''+this.ortherParam.map(String);
+      this.loadData(1)
     },
     //高级查询方法
     handleSuperQuery(arg) {

+ 35 - 1
src/views/system/CertificateManagement.vue

@@ -69,6 +69,7 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator" style="border-top: 5px">
+      <a-button type="primary" icon="download" @click="handleExportXls('证件管理')">导出</a-button>
       <a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>
        <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete()">
             <a-button  type="primary" icon="plus">删除</a-button>
@@ -109,7 +110,7 @@
 </template>
 
 <script>
-  
+  import { downFile } from '@/api/manage'
   import {JeecgListMixin} from '@/mixins/JeecgListMixin'
   import JEllipsis from '@/components/jeecg/JEllipsis'
   import AddCertificateManagement from './modules/AddCertificateManagement'
@@ -196,6 +197,9 @@
             width: 120
           },
         ],
+        // url: {
+        //   exportXlsUrl: "/oa/syCertificates/exportXls",
+        // },
         dataSource:[],
         selectedRowKeys:[],
         beDate:'',
@@ -210,6 +214,36 @@
         this.getData()
     },
     methods: {
+      /* 导出 */
+    handleExportXls(fileName){
+      if(!fileName || typeof fileName != "string"){
+        fileName = "导出文件"
+      }
+      let param = {...this.queryParam};
+      if(this.selectedRowKeys && this.selectedRowKeys.length>0){
+        param['selections'] = this.selectedRowKeys.join(",")
+      }
+      console.log("导出参数",param)
+      downFile('/oa/syCertificates/exportXls',param).then((data)=>{
+        if (!data) {
+          this.$message.warning("文件下载失败")
+          return
+        }
+        if (typeof window.navigator.msSaveBlob !== 'undefined') {
+          window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls')
+        }else{
+          let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
+          let link = document.createElement('a')
+          link.style.display = 'none'
+          link.href = url
+          link.setAttribute('download', fileName+'.xls')
+          document.body.appendChild(link)
+          link.click()
+          document.body.removeChild(link); //下载完成移除元素
+          window.URL.revokeObjectURL(url); //释放掉blob对象
+        }
+      })
+    },
         // 查询
         searchQuery(){
             this.getData()

+ 32 - 1
src/views/system/MaterialRegistration.vue

@@ -50,6 +50,7 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator" style="border-top: 5px">
+      <a-button type="primary" icon="download" @click="handleExportXls('物质登记单')">导出</a-button>
       <a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>
        <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete()">
             <a-button  type="primary" icon="plus">删除</a-button>
@@ -93,7 +94,7 @@
 </template>
 
 <script>
-  
+  import { downFile } from '@/api/manage'
   import {JeecgListMixin} from '@/mixins/JeecgListMixin'
   import AddMaterialRegistration from './modules/AddMaterialRegistration'
   import DetailMaterialRegistration from './modules/DetailMaterialRegistration'
@@ -220,6 +221,36 @@ import moment from 'moment'
         this.getData()
     },
     methods: {
+      /* 导出 */
+      handleExportXls(fileName){
+        if(!fileName || typeof fileName != "string"){
+          fileName = "导出文件"
+        }
+        let param = {...this.queryParam};
+        if(this.selectedRowKeys && this.selectedRowKeys.length>0){
+          param['selections'] = this.selectedRowKeys.join(",")
+        }
+        console.log("导出参数",param)
+        downFile('/oa/syMaterial/exportXls',param).then((data)=>{
+          if (!data) {
+            this.$message.warning("文件下载失败")
+            return
+          }
+          if (typeof window.navigator.msSaveBlob !== 'undefined') {
+            window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls')
+          }else{
+            let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
+            let link = document.createElement('a')
+            link.style.display = 'none'
+            link.href = url
+            link.setAttribute('download', fileName+'.xls')
+            document.body.appendChild(link)
+            link.click()
+            document.body.removeChild(link); //下载完成移除元素
+            window.URL.revokeObjectURL(url); //释放掉blob对象
+          }
+        })
+      },
         // 查询
         searchQuery(){
           this.getData()