Răsfoiți Sursa

字典修改

lucw 8 luni în urmă
părinte
comite
aba1cd7bc7

+ 2 - 2
src/components/selectReleaseRules/select-release-rules.vue

@@ -124,7 +124,7 @@
             formatter: (row) => {
               return (
                 row.frequencyValue +
-                this.getDictValue('记录规则频率', row.frequencyUnit + '')
+                this.getDictValue('规则周期', row.frequencyUnit + '')
               );
             }
           },
@@ -183,7 +183,7 @@
     },
     mounted() {
       this.requestDict('记录规则类型');
-      this.requestDict('记录规则频率');
+      this.requestDict('规则周期');
     },
     methods: {
       open() {

+ 0 - 1
src/enum/dict.js

@@ -35,7 +35,6 @@ export default {
   记录规则报工类型: 'record_rules_report_work_type',
   记录规则执行方式: 'record_rules_execute_method',
   记录规则事项类型: 'record_rules_item_type',
-  记录规则频率: 'record_rules_frequency',
   规则类型: 'rule_type',
   规则状态: 'rule_status',
   规则周期: 'rule_cycle',

+ 80 - 0
src/views/batchRecord/components/tables/batchPecordPrint.vue

@@ -0,0 +1,80 @@
+<template>
+  <ele-modal
+    width="400px"
+    title="弹窗示例"
+    :visible.sync="visible"
+    :resizable="true"
+    :maxable="true"
+  >
+    <div ref="printRef" class="demo-print-group">
+      <div class="demo-print-div">示例示例示例示例示例</div>
+      <div class="demo-print-right ele-bg-white">
+        <div>
+          <el-tag size="mini">示例</el-tag>
+          <el-tag size="mini" type="success">示例</el-tag>
+          <el-tag size="mini" type="warning">示例</el-tag>
+        </div>
+        <div style="margin-top: 12px">
+          <el-input v-model="value" />
+        </div>
+      </div>
+    </div>
+    <div style="margin-top: 20px">
+      <el-button @click="print">打印</el-button>
+    </div>
+  </ele-modal>
+</template>
+
+<script>
+  import { printElement } from 'ele-admin';
+
+  export default {
+    data() {
+      return {
+        value: '示例示例示例',
+        visible: false
+      };
+    },
+    methods: {
+      open() {
+        this.visible = true;
+      },
+      print() {
+        // 如果 ref 是组件可以用 this.$refs.printRef.$el
+        printElement(this.$refs.printRef);
+        //printElement(this.$refs.printRef, { });  // 参数二加更多参数同 printThis 方法
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .demo-print-group {
+    display: flex;
+    align-items: center;
+  }
+
+  .demo-print-div {
+    // background: #096dd9;
+    color: #fff;
+    font-size: 18px;
+    text-align: center;
+    padding: 40px 0;
+    flex: 1;
+    border: 2px solid #096dd9;
+    height: 120px;
+    box-sizing: border-box;
+    border-top-left-radius: 8px;
+    border-bottom-left-radius: 8px;
+  }
+
+  .demo-print-right {
+    flex: 1;
+    padding: 20px;
+    border: 2px solid #096dd9;
+    height: 120px;
+    box-sizing: border-box;
+    border-top-right-radius: 8px;
+    border-bottom-right-radius: 8px;
+  }
+</style>

+ 10 - 1
src/views/batchRecord/components/tables/batchRecordTable.vue

@@ -14,6 +14,9 @@
         <el-link type="primary" :underline="false" @click="goToDetail(row)">
           详情
         </el-link>
+        <!-- <el-link type="primary" :underline="false" @click="openPrint(row)">
+          打印
+        </el-link> -->
       </template>
       <template v-slot:code="{ row }">
         <el-link type="primary" @click="goToDetail(row)">{{
@@ -23,6 +26,8 @@
     </ele-pro-table>
 
     <editModal ref="editModalRef"></editModal>
+
+    <batchPecordPrint ref="batchPecordPrintRef"></batchPecordPrint>
   </div>
 </template>
 
@@ -31,10 +36,11 @@
   import tableColumnsMixin from '@/mixins/tableColumnsMixin';
   import { producetaskrulerecordPage } from '@/api/producetaskrulerecord/index';
   import editModal from '../editModal.vue';
+  import batchPecordPrint from './batchPecordPrint.vue';
 
   export default {
     mixins: [dictMixins, tableColumnsMixin],
-    components: { editModal },
+    components: { editModal, batchPecordPrint },
     props: {
       tableQuery: {
         type: Object,
@@ -213,6 +219,9 @@
       },
       goToDetail(row) {
         this.$refs.editModalRef.open('detail', row);
+      },
+      openPrint(row) {
+        this.$refs.batchPecordPrintRef.open(row);
       }
     }
   };