Zt 1 år sedan
förälder
incheckning
b27e4c283b

+ 3 - 0
.vscode/settings.json

@@ -0,0 +1,3 @@
+{
+    "vue.codeActions.enabled": false
+}

+ 15 - 0
chuanyi_client2/src/api/datasource.js

@@ -942,3 +942,18 @@ export function stopAutoPrintById(reportTableId) {
         method: 'post'
     })
 }
+
+export function getDriverItemBySouceId(id) {
+    return request({
+        url: '/dataSource/getDriverItemBySouceId?id='+id,
+        method: 'get'
+    })
+}
+
+export function getCompositeScreen(params) {
+    return request({
+        url: '/dataSource/getCompositeScreen',
+        method: 'get',
+        params
+    })
+}

+ 45 - 0
chuanyi_client2/src/api/printConfig.js

@@ -0,0 +1,45 @@
+import request from "@/utils/request";
+
+/** 查询所有打印配置 */
+export function getAllPrintConfig(params) {
+  return request({
+    url: "/print/getAllPrintConfig",
+    method: "get",
+    params
+  });
+}
+
+/** 新增打印配置 */
+export function addPrintConfig(data) {
+  return request({
+    url: "/print/addPrintConfig",
+    method: "post",
+    data,
+  });
+}
+
+/** 查询打印配置 */
+export function getPrintConfigById(params) {
+  return request({
+    url: "/print/getPrintConfigById",
+    method: "get",
+    params,
+  });
+}
+
+/** 修改打印配置 */
+export function updatePrintConfigById(data) {
+  return request({
+    url: "/print/updatePrintConfig",
+    method: "post",
+    data,
+  });
+}
+
+/** 删除打印配置 */
+export function delPrintConfigById(id) {
+  return request({
+    url: "/print/delPrintConfigById?id="+id,
+    method: "post"
+  });
+}

BIN
chuanyi_client2/src/assets/images/print.png


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 699 - 334
chuanyi_client2/src/components/HeaderMain/index.vue


+ 5 - 0
chuanyi_client2/src/components/LeftMenu/index.vue

@@ -35,6 +35,11 @@
       <el-image :src="require('@/assets/images/report.png')" fit="contain"></el-image>
       <span>我的报表</span>
     </el-col>
+    <el-col :class="currMenuIndex == 5 ? 'cy-conn cy-conn-select' : 'cy-conn'"
+            @click.native="changeNavTypeAction(5)">
+      <el-image :src="require('@/assets/images/print.png')" fit="contain"></el-image>
+      <span>打印配置</span>
+    </el-col>
 
     <!-- 数据源配置弹出层 -->
     <el-dialog

+ 7 - 7
chuanyi_client2/src/components/PVirtualCheck/listItem.vue

@@ -34,19 +34,19 @@ export default {
     change(val) {
       // 通过全局混入函数,调用对应组件的函数
       this.dispatch(
-          "p-virtual-check",
-          "virtual-check-change",
-          this.source.value,
-          val
+        "p-virtual-check",
+        "virtual-check-change",
+        this.source.value,
+        val
       );
-      this.$forceUpdate()
+      this.$forceUpdate();
     },
     // 选择改变
     checkChange() {
-      this.checked = this.source.checked//this.checkMap[this.source.value] === true ? true : false;
+      this.checked = this.source.checked; //this.checkMap[this.source.value] === true ? true : false;
     },
   },
 };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped></style>

+ 4 - 0
chuanyi_client2/src/router/index.js

@@ -63,6 +63,10 @@ const routes = [
             {
                 path: 'userGroup',
                 component: () => import('@/views/user_group/index')
+            },
+            {
+                path: 'printConfig',
+                component: () => import('@/views/print_config/index')
             }
         ]
     }

+ 3 - 1
chuanyi_client2/src/views/index.vue

@@ -108,7 +108,9 @@ export default {
         gotoPage(this, '/dataModel')
       } else if (type == 4) {
         gotoPage(this, '/userGroup')
-      } else {
+      } else if (type == 5) {
+        gotoPage(this, '/printConfig')
+      }else {
         gotoPage(this, '/index')
         this.changeTabType()
       }

+ 686 - 0
chuanyi_client2/src/views/print_config/index.vue

@@ -0,0 +1,686 @@
+<template>
+  <div class="cqcy-content" style="margin: 0; height: calc(100% - 70px)">
+    <breadcrumb-view
+      :breadcrumbList="breadcrumbList"
+      :show-index="false"
+    ></breadcrumb-view>
+    <!-- <div class="cy-nav-sx">
+      <el-input
+        placeholder=""
+        v-model="searchTxt"
+        style="margin-left: 5px; width: 300px"
+        prefix-icon="el-icon-search"
+      >
+      </el-input>
+      <el-button style="margin-left: 5px" @click="searchRuleEvent"
+        >查询</el-button
+      >
+    </div> -->
+    <el-button
+      type="primary"
+      class="cy-nav-btn"
+      icon="el-icon-circle-plus-outline"
+      size="mini"
+      @click="handleAdd"
+      >新增打印配置</el-button
+    >
+    <el-divider></el-divider>
+    <div class="cy-main">
+      <el-table
+        :data="tableData"
+        border
+        :header-cell-style="{ background: '#E8E8E8' }"
+        style="width: 100%"
+      >
+        <el-table-column align="center" label="作业名称" prop="jobName">
+        </el-table-column>
+        <el-table-column align="center" label="打印方向" prop="orientation">
+          <template slot-scope="scope">
+            {{ scope.row.orientation === 1 ? "横向" : "纵向" }}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="打印份数" prop="copies">
+        </el-table-column>
+        <el-table-column align="center" label="打印页面类型" prop="pageType">
+          <template slot-scope="scope">
+            {{ PrintPageType(scope.row.pageType) }}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="缩放比例" prop="scale">
+        </el-table-column>
+        <el-table-column align="center" label="页码范围类型 " prop="pageRange">
+          <template slot-scope="scope">
+            {{ scope.row.pageRange === 1 ? "全部" : "部分页码" }}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="打印区域 " prop="printArea">
+          <template slot-scope="scope">
+            {{ scope.row.pageRange === 1 ? "整个工作表" : "选定区域" }}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="打印缩放 " prop="fitToPages">
+          <template slot-scope="scope">
+            {{
+              scope.row.fitToPages === 1
+                ? "无打印缩放"
+                : scope.row.fitToPages === 2
+                ? "将所有列打印在一页"
+                : scope.row.fitToPages === 3
+                ? "将所有行打印在一页"
+                : "自定义缩放"
+            }}
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="300">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              @click="handleValReplaceEdit(scope.$index, scope.row)"
+              >编辑</el-button
+            >
+            <el-button
+              size="mini"
+              type="danger"
+              @click="handleDelete(scope.$index, scope.row)"
+              >删除</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        style="margin-top: 20px"
+        background
+        layout="sizes, prev, pager, next, total"
+        :current-page="queryParams.page"
+        @size-change="sizeChangeEvent"
+        @current-change="currentChangeEvent"
+        :total="tableTotal"
+      >
+      </el-pagination>
+    </div>
+
+    <!-- 新增打印配置 -->
+    <el-dialog
+      :title="dialogDataModelTitle"
+      width="850px"
+      top="10vh"
+      center
+      v-dialog-drag
+      v-if="dialogDataModelVisible"
+      :before-close="dialogClose"
+      :visible.sync="dialogDataModelVisible"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+    >
+      <el-form
+        ref="dataModelForm"
+        :model="dataModelForm"
+        :rules="dataModelRules"
+        label-width="110px"
+      >
+        <el-form-item label="作业名称" prop="jobName">
+          <el-input
+            v-model="dataModelForm.jobName"
+            placeholder="请输入名称"
+            maxlength="20"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="打印方向" prop="orientation">
+          <el-select
+            v-model="dataModelForm.orientation"
+            placeholder="请选择打印方向"
+          >
+            <el-option label="横向" :value="1"> </el-option>
+            <el-option label="纵向" :value="2"> </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="打印份数" prop="copies">
+          <el-input-number
+            v-model="dataModelForm.copies"
+            :min="1"
+            :max="10"
+            label="描述文字"
+          ></el-input-number>
+        </el-form-item>
+        <el-form-item label="打印页面类型" prop="pageType">
+          <el-select
+            v-model="dataModelForm.pageType"
+            placeholder="请选择打印页面类型"
+            @change="formatterPageType"
+          >
+            <el-option label="A3" :value="1">
+              <div>A3:297mm X 420mm</div>
+            </el-option>
+            <el-option label="A4" :value="2">
+              <div>A4:210mm X 297mm</div></el-option
+            >
+            <el-option label="A5" :value="3">
+              <div>A5:148mm X 210mm</div></el-option
+            >
+            <el-option label="B5" :value="4">
+              <div>B5:182mm X 257mm</div></el-option
+            >
+            <el-option label="C5" :value="5">
+              <div>Devolop C5:162mm X 229mm</div></el-option
+            >
+            <el-option label="DL" :value="6">
+              <div>Devolop DL:110mm X 220mm</div></el-option
+            >
+            <el-option label="B5" :value="7">
+              <div>Devolop B5:176mm X 250mm</div></el-option
+            >
+            <el-option label="DM" :value="8">
+              <div>Devolop Monarch:3.875inch X 7.5inch</div></el-option
+            >
+            <el-option label="D9" :value="9">
+              <div>Devolop 9:3.875inch X 8.875inch</div>
+            </el-option>
+            <el-option label="D10" :value="10">
+              <div>Devolop 10:4.125inch X 9.5inch</div></el-option
+            >
+            <el-option label="LT" :value="11">
+              <div>Letter:8.5inch X 11inch</div></el-option
+            >
+            <el-option label="LG" :value="12">
+              <div>Legal:8.5inch X 14inch</div></el-option
+            >
+          </el-select>
+        </el-form-item>
+        <el-form-item label="打印区域">
+          <el-row>
+            <el-col :span="12">
+              <el-input
+                v-model="dataModelForm.marginLeft"
+                placeholder="请输入左边距"
+                maxlength="20"
+                style="width: 200px; margin: 0 20px 20px 0"
+              ></el-input>
+            </el-col>
+            <el-col :span="12">
+              <el-input
+                v-model="dataModelForm.marginRight"
+                placeholder="请输入右边距"
+                maxlength="20"
+                style="width: 200px; margin: 0 20px 20px 0"
+              ></el-input>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-input
+                v-model="dataModelForm.marginTop"
+                placeholder="请输入上边距"
+                maxlength="20"
+                style="width: 200px; margin: 0 20px 20px 0"
+              ></el-input>
+            </el-col>
+            <el-col :span="12">
+              <el-input
+                v-model="dataModelForm.marginBottom"
+                placeholder="请输入下边距"
+                maxlength="20"
+                style="width: 200px; margin: 0 20px 20px 0"
+              ></el-input>
+            </el-col>
+          </el-row>
+        </el-form-item>
+        <!-- <el-form-item label="纸张单位类型" prop="unit">
+          <el-select
+            v-model="dataModelForm.unit"
+            placeholder="请选择纸张单位类型"
+          >
+            <el-option label="毫米" :value="1"> </el-option>
+            <el-option label="英寸" :value="2"> </el-option>
+          </el-select>
+        </el-form-item> -->
+        <!-- <el-form-item label="打印类型" prop="sides">
+          <el-select v-model="dataModelForm.sides" placeholder="请选择打印类型">
+            <el-option label="单双面" :value="1"> </el-option>
+            <el-option label="单面打印" :value="2"> </el-option>
+            <el-option label="双面打印,长边翻转" :value="3"> </el-option>
+            <el-option label="双面打印,短边翻转" :value="4"> </el-option>
+          </el-select>
+        </el-form-item> -->
+        <!-- <el-form-item label="颜色" prop="chromaticity">
+          <el-select
+            v-model="dataModelForm.chromaticity"
+            placeholder="请选择颜色"
+          >
+            <el-option label="黑白打印" :value="1"> </el-option>
+            <el-option label="彩打" :value="2"> </el-option>
+          </el-select>
+        </el-form-item> -->
+        <el-form-item label="页码范围类型" prop="pageRange">
+          <el-select
+            v-model="dataModelForm.pageRange"
+            placeholder="请选择页码范围类型"
+          >
+            <el-option label="全部" :value="1"> </el-option>
+            <el-option label="部分页码" :value="2"> </el-option>
+          </el-select>
+        </el-form-item>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item
+              label="开始页码"
+              prop="pageRangeStart"
+              v-if="dataModelForm.pageRange === 2"
+            >
+              <el-input-number
+                v-model="dataModelForm.pageRangeStart"
+                :precision="0"
+                :min="1"
+                :max="100"
+              ></el-input-number>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item
+              label="结束页码"
+              prop="pageRangeEnd"
+              v-if="dataModelForm.pageRange === 2"
+            >
+              <el-input-number
+                v-model="dataModelForm.pageRangeEnd"
+                :precision="0"
+                :min="1"
+                :max="100"
+              ></el-input-number>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="打印区域" prop="printArea">
+              <el-select
+                v-model="dataModelForm.printArea"
+                placeholder="请选择打印区域"
+              >
+                <el-option label="整个工作表" :value="1"> </el-option>
+                <el-option label="选定区域" :value="2"> </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item
+              label="打印区域参数"
+              prop="printAreaValue"
+              v-if="dataModelForm.printArea === 2"
+            >
+              <el-input
+                v-model="dataModelForm.printAreaValue"
+                placeholder="请输入打印区域参数"
+                maxlength="20"
+                style="width: 200px; margin: 0 20px 20px 0"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="打印缩放" prop="fitToPages">
+              <el-select
+                v-model="dataModelForm.fitToPages"
+                placeholder="请选择打印缩放"
+              >
+                <el-option label="无打印缩放" :value="1"> </el-option>
+                <el-option label="将所有列打印在一页" :value="2"> </el-option>
+                <el-option label="将所有行打印在一页" :value="3"> </el-option>
+                <el-option label="自定义缩放" :value="4"> </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" v-if="dataModelForm.fitToPages === 4">
+            <el-form-item label="缩放比例" prop="scale">
+              <el-input-number
+                v-model="dataModelForm.scale"
+                :precision="0"
+                :min="1"
+                :max="100"
+                label="百分比"
+              ></el-input-number>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-form-item style="text-align: center">
+          <el-button type="primary" @click="saveDataModelEvent">确定</el-button>
+          <el-button @click="dialogClose">取消</el-button>
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import BreadcrumbView from "@/components/BreadcrumbView";
+import {
+  customCompare,
+  showAlertMsgWin,
+  showAlertWin,
+  showConfirmWin,
+  showLoading,
+} from "@/utils/cqcy";
+import {
+  addDataModel,
+  delDataModelById,
+  getAllDataModel,
+  getDataModelById,
+  testDataModelById,
+  testDataModelByModel,
+  updateDataModel,
+} from "@/api/datasource";
+
+import {
+  getAllPrintConfig,
+  addPrintConfig,
+  getPrintConfigById,
+  updatePrintConfigById,
+  delPrintConfigById,
+} from "@/api/printConfig";
+
+export default {
+  name: "index",
+  components: {
+    BreadcrumbView,
+  },
+  data() {
+    return {
+      breadcrumbList: ["打印配置"],
+      dialogDataModelVisible: false,
+      dialogDataModelTitle: "新增打印配置",
+      tableTotal: 0,
+      tableData: [],
+      searchTxt: "",
+      dataModelForm: {
+        id: "",
+        //作业名称
+        jobName: "",
+        // 打印方向
+        orientation: 2,
+        // 打印份数
+        copies: 1,
+        // 打印页面类型
+        pageType: 1,
+        // 打印区域
+        width: 0,
+        height: 0,
+        marginLeft: 0,
+        marginTop: 0,
+        marginRight: 0,
+        marginBottom: 0,
+        // 纸张单位类型 1 毫米 2 英寸
+        // unit: 1,
+        // 单双面 1 单面打印 2 双面打印,长边翻转 3 双面打印,短边翻转
+        // sides: 1,
+        // 颜色 1 黑白打印 2 彩打
+        // chromaticity: 1,
+        // 缩放比例
+        scale: 100,
+        // 页码范围类型 1 全部 2 部分页码
+        pageRange: 1,
+        // 开始页码
+        pageRangeStart: 1,
+        // 结束页码
+        pageRangeEnd: 1,
+        // 打印区域  1 整个工作表 2 选定区域
+        printArea: 1,
+        // 打印区域参数 A1:H6 打印区域printArea=2时,printAreaValue参数有用
+        printAreaValue: "",
+        // 打印缩放 1 无打印缩放 2 将所有列打印在一页 3 将所有行打印在一页 4 自定义缩放
+        fitToPages: 1,
+      },
+      dataModelRules: {},
+      // 查询参数
+      queryParams: {
+        page: 1,
+        limit: 10,
+      }
+    };
+  },
+  watch: {},
+  beforeDestroy() {},
+  created() {
+    this.getAllPrintConfig();
+  },
+  methods: {
+    sortChange({ prop, order }) {
+      this.tableData.sort(customCompare(prop, order));
+    },
+    extractNumbers(expr) {
+      const regex = /\d+/g;
+      const numbers = expr.match(regex);
+      return numbers ? numbers.map(Number) : [];
+    },
+    /** 新增打印配置 */
+    handleAdd() {
+      this.dataModelForm = {};
+      this.dialogDataModelTitle = "新增打印配置";
+      this.dialogDataModelVisible = true;
+    },
+    /** 编辑打印配置 */
+    handleValReplaceEdit(index, row) {
+      this.dialogDataModelTitle = "编辑打印配置";
+      const loading = showLoading(this, "加载中,请稍候···");
+      getPrintConfigById({ id: row.id })
+        .then((res) => {
+          if (res.code === 200) {
+            loading.close();
+            this.dataModelForm = res.data;
+            this.dialogDataModelVisible = true;
+          }
+        })
+        .catch((e) => {
+          loading.close();
+          showAlertWin(this, null, e);
+        });
+    },
+    /** 删除数据模型 */
+    handleDelete(index, row) {
+      showConfirmWin(this, null, "您确定要删除该打印配置吗?", () => {
+        const loading = showLoading(this, "删除中,请稍候···");
+        delPrintConfigById(row.id)
+          .then((res) => {
+            loading.close();
+            showAlertMsgWin(this, null, "删除成功!");
+            this.queryParams.page = 1;
+            this.getAllPrintConfig();
+          })
+          .catch((e) => {
+            loading.close();
+            showAlertWin(this, null, e);
+          });
+      });
+    },
+    /** 获取所有打印配置 */
+    getAllPrintConfig() {
+      getAllPrintConfig(this.queryParams).then((res) => {
+        console.log(res);
+        if (res.code === 200) {
+          this.tableData = res.data.printConfigList;
+          this.tableTotal = res.data.count;
+        }
+      });
+    },
+    /** 保存数据模型 */
+    saveDataModelEvent() {
+      this.$refs["dataModelForm"].validate((valid) => {
+        if (valid) {
+          const loading = showLoading(this, "保存中,请稍候···");
+          if (this.dataModelForm.id) {
+            updatePrintConfigById(this.dataModelForm).then((res) => {
+              if (res.code === 200) {
+                showAlertMsgWin(this, null, res.data);
+                this.dialogDataModelVisible = false;
+                this.$refs["dataModelForm"].resetFields();
+                loading.close();
+                showAlertMsgWin(this, null, "修改成功!");
+                this.getAllPrintConfig();
+              }
+            });
+            return;
+          }
+          this.dataModelForm.marginTop = Number(this.dataModelForm.marginTop);
+          this.dataModelForm.marginRight = Number(
+            this.dataModelForm.marginRight
+          );
+          this.dataModelForm.marginLeft = Number(this.dataModelForm.marginLeft);
+          this.dataModelForm.marginBottom = Number(
+            this.dataModelForm.marginBottom
+          );
+          if (this.dataModelForm.printArea === 1) {
+            this.dataModelForm.printAreaValue = "";
+          }
+          if (this.dataModelForm.pageRange === 1) {
+            this.dataModelForm.pageRangeStart = null;
+            this.dataModelForm.pageRangeEnd = null;
+          }
+          if (this.dataModelForm.pageRange !== 4) {
+            this.dataModelForm.scale = null;
+          }
+          addPrintConfig(this.dataModelForm).then((res) => {
+            if (res.code === 200) {
+              showAlertMsgWin(this, null, res.data);
+              this.dialogDataModelVisible = false;
+              this.$refs["dataModelForm"].resetFields();
+              loading.close();
+              this.getAllPrintConfig();
+            }
+          });
+        }
+      });
+    },
+    /** 搜索 */
+    searchRuleEvent() {
+      this.queryParams.page = 1;
+      this.getAllPrintConfig();
+    },
+    /** 数据条数改变 */
+    sizeChangeEvent(val) {
+      this.queryParams.limit = val;
+      this.getAllPrintConfig();
+    },
+    /** 页码改变 */
+    currentChangeEvent(val) {
+      this.queryParams.page = val;
+      this.getAllPrintConfig();
+    },
+    /** 弹出层关闭事件 */
+    dialogClose(done) {
+      this.dialogDataModelVisible = false;
+      this.$refs["dataModelForm"].resetFields();
+    },
+    /** 获取打印区域宽高 */
+    formatterPageType(val) {
+      switch (val) {
+        case 1:
+          this.dataModelForm.width = 297;
+          this.dataModelForm.height = 420;
+          break;
+        case 2:
+          this.dataModelForm.width = 210;
+          this.dataModelForm.height = 297;
+          break;
+        case 3:
+          this.dataModelForm.width = 148;
+          this.dataModelForm.height = 210;
+          break;
+        case 4:
+          this.dataModelForm.width = 182;
+          this.dataModelForm.height = 257;
+          break;
+        case 5:
+          this.dataModelForm.width = 162;
+          this.dataModelForm.height = 229;
+          break;
+        case 6:
+          this.dataModelForm.width = 110;
+          this.dataModelForm.height = 220;
+          break;
+        case 7:
+          this.dataModelForm.width = 176;
+          this.dataModelForm.height = 250;
+          break;
+        case 8:
+          this.dataModelForm.width = Number.parseInt(3.875 / 0.0394);
+          this.dataModelForm.height = Number.parseInt(7.5 / 0.0394);
+          break;
+        case 9:
+          this.dataModelForm.width = Number.parseInt(3.875 / 0.0394);
+          this.dataModelForm.height = Number.parseInt(8.875 / 0.0394);
+          break;
+        case 10:
+          this.dataModelForm.width = Number.parseInt(4.125 / 0.0394);
+          this.dataModelForm.height = Number.parseInt(9.5 / 0.0394);
+          break;
+        case 11:
+          this.dataModelForm.width = Number.parseInt(8.5 / 0.0394);
+          this.dataModelForm.height = Number.parseInt(11 / 0.0394);
+          break;
+        case 12:
+          this.dataModelForm.width = Number.parseInt(8.5 / 0.0394);
+          this.dataModelForm.height = Number.parseInt(14 / 0.0394);
+          break;
+      }
+    },
+    /** 转换打印类型 */
+    PrintPageType(val) {
+      if (val === 1) {
+        return "A3";
+      } else if (val === 2) {
+        return "A4";
+      } else if (val === 3) {
+        return "A5";
+      } else if (val === 4) {
+        return "B5";
+      } else if (val === 5) {
+        return "Devolop C5";
+      } else if (val === 6) {
+        return "Devolop DL";
+      } else if (val === 7) {
+        return "Devolop B5";
+      } else if (val === 8) {
+        return "Devolop Monarch";
+      } else if (val === 9) {
+        return "Devolop 9";
+      } else if (val === 10) {
+        return "Devolop 10";
+      } else if (val === 11) {
+        return "Letter";
+      } else if (val === 12) {
+        return "Legal";
+      }
+    },
+  },
+};
+</script>
+
+<style rel="stylesheet/scss" lang="scss">
+.breadcrumb-content {
+  padding-bottom: 0;
+}
+
+.cy-main {
+  margin: 10px 20px;
+  width: calc(100% - 40px);
+  height: calc(100% - 100px);
+}
+
+.cy-nav-btn {
+  float: right !important;
+  margin-right: 20px !important;
+  margin-top: -20px !important;
+}
+
+.cy-nav-sx {
+  float: left !important;
+  margin-top: -23px !important;
+  margin-left: 120px !important;
+  display: flex;
+}
+
+.test-operation {
+  input {
+    padding-right: 60px;
+  }
+}
+</style>

+ 34 - 4
chuanyi_client2/src/views/run_config/index.vue

@@ -253,7 +253,7 @@
         :visible.sync="dialogAutoPrintVisible"
         :close-on-click-modal="false"
         :append-to-body="true">
-      <el-form ref="reportForm" :model="reportForm" :rules="reportRules" label-width="80px">
+      <el-form ref="reportForm" :model="reportForm" :rules="reportRules" label-width="120px">
         <el-radio-group v-model="radioByCron">
           <el-form-item label="秒">
             <el-radio :label="1">
@@ -313,6 +313,16 @@
               <span style="margin-left: 10px;">执行一次</span>
             </el-radio>
           </el-form-item>
+          <el-form-item label="打印配置选择">
+            <el-select v-model="printForm.printConfigId" placeholder="请选择">
+    <el-option
+      v-for="item in queryPageData"
+      :key="item.id"
+      :label="item.jobName"
+      :value="item.id">
+    </el-option>
+  </el-select>
+          </el-form-item>
         </el-radio-group>
       </el-form>
       <span slot='footer'>
@@ -657,6 +667,9 @@ import {
   addPrint,
   stopAutoPrintById
 } from '@/api/datasource'
+import {
+  getAllPrintConfig
+} from '@/api/printConfig'
 import Print from 'print-js'
 import {getUsername} from '@/utils/auth'
 import {exportExcel} from '@/utils/export'
@@ -734,7 +747,8 @@ export default {
         reportTableId: null,
         cronId: '',
         cron: '',
-        runState: null
+        runState: null,
+        printConfigId:null
       },
       searchValue: null,
       searchTxt: '',
@@ -834,8 +848,14 @@ export default {
           data: false, // 数据验证
           cellFormat: false // 设置单元格格式
         },
-        plugins: ['chart']
-      }
+        plugins: ['chart'],
+      },
+      queryPage:{
+        page:1,
+        limit:999
+      },
+      queryPageData:[],
+      queryPageId:null
     }
   },
   watch: {},
@@ -867,6 +887,14 @@ export default {
     luckysheet.destroy()
   },
   methods: {
+    getAllPrintConfig(){
+      console.log(this.queryPage)
+      getAllPrintConfig(this.queryPage).then(res=>{
+         if(res.code===200){
+          this.queryPageData=res.data.printConfigList
+         }
+      })
+    },
     reportIntervalChange(val) {
       this.reportInterval = val
       this.pollingReportData()
@@ -1744,6 +1772,7 @@ export default {
       }).catch((e) => {
         loading.close()
       })
+      this.getAllPrintConfig()
     },
     resetPrint() {
       this.printForm.id = null;
@@ -1751,6 +1780,7 @@ export default {
       this.printForm.cronId = '';
       this.printForm.cron = '';
       this.printForm.runState = null;
+      this.printForm.printConfigId = null;
     },
     /** 选择定时打印 */
     chooseCronPrint() {

Vissa filer visades inte eftersom för många filer har ändrats