Просмотр исходного кода

港口资料 集装箱页面 主营项目联调

qinbai 3 лет назад
Родитель
Сommit
5348b2cd3e

+ 42 - 0
src/api/workManagement/mainProject.js

@@ -0,0 +1,42 @@
+import request from '@/router/axios';
+
+//主营项目列表
+export function getList(current,size,params) {
+  return request({
+    url: '/api/trade-project/project/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+//
+export function typeSave(data) {
+  return request({
+    url: '/api/blade-client/affairstype/submit',
+    method: 'post',
+    data: data
+  })
+}
+//根据id主营以及明细
+export function projectDetail(id) {
+  return request({
+    url: '/api/trade-project/project/findById',
+    method: 'get',
+    params:{
+      id : id
+    }
+  })
+}
+//删除
+export function deleteMain(id) {
+  return request({
+    url: '/api/trade-project/project/delete',
+    method: 'delete',
+    params:{
+      id : id
+    }
+  })
+}

+ 1 - 0
src/views/basicData/commodityCategory/configuration/mainList.json

@@ -35,6 +35,7 @@
       "valueFormat": "yyyy-MM-dd",
       "search": true,
       "searchRange":true,
+      "addDisplay": false,
       "editDisplay":false,
       "index": 2,
       "width": 100,

+ 143 - 0
src/views/basicData/container/configuration/mainList.json

@@ -0,0 +1,143 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "tree": true,
+  "selection": true,
+  "addBtn": true,
+  "viewBtn": true,
+  "editBtn": true,
+  "delBtn": true,
+  "labelWidth": 120,
+  "menuWidth": 220,
+  "column": [
+    {
+      "label": "编号",
+      "prop": "fNo",
+      "search": true,
+      "index": 1,
+      "width": 120
+    },
+    {
+      "label": "箱种类",
+      "prop": "fType",
+      "index": 2,
+      "width": 150,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "名称",
+      "prop": "fName",
+      "search": true,
+      "index": 3,
+      "width": 150,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "英文名",
+      "prop": "fEname",
+      "index": 4,
+      "width": 150
+    },
+    {
+      "label": "航线",
+      "prop": "portName",
+      "index": 5,
+      "width": 120
+    },
+    {
+      "label": "UNCODE",
+      "prop": "fUncode",
+      "index": 6,
+      "width": 120
+    },
+    {
+      "label": "TEU",
+      "prop": "fTeu",
+      "index": 7,
+      "width": 80
+    },
+    {
+      "label": "容积(立方)",
+      "prop": "fCbm",
+      "index": 8,
+      "width": 80
+    },
+    {
+      "label": "毛重(T)",
+      "prop": "fWeight",
+      "index": 9,
+      "width": 80
+    },
+    {
+      "label": "状态",
+      "prop": "fStatus",
+      "type": "select",
+      "dicData": [{
+        "label": "正常",
+        "value": 0
+      }, {
+        "label": "关闭",
+        "value": 1
+      }],
+      "search": true,
+      "index": 10,
+      "width": 120
+    },
+    {
+      "label": "备注",
+      "prop": "remark",
+      "index": 11,
+      "width": 150
+    },
+    {
+      "label": "录入人",
+      "prop": "createBy",
+      "addDisplay": false,
+      "editDisplay":false,
+      "index": 12,
+      "width": 120
+    },
+    {
+      "label": "录入时间",
+      "prop": "createTime",
+      "addDisplay": false,
+      "editDisplay":false,
+      "index": 13,
+      "width": 150
+    },
+    {
+      "label": "最新修改人",
+      "prop": "updateBy",
+      "addDisplay":false,
+      "editDisplay":false,
+      "index": 14,
+      "width": 120
+    },
+    {
+      "label": "最新修改时间",
+      "prop": "updateTime",
+      "addDisplay": false,
+      "editDisplay":false,
+      "index": 15,
+      "width": 150
+    }
+  ]
+}

+ 118 - 0
src/views/basicData/container/index.vue

@@ -0,0 +1,118 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :data="dataList"
+               ref="crud"
+               v-model="form"
+               :page.sync="page"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button
+          icon="el-icon-printer"
+          size="small"
+          type="primary"
+          @click.stop=""
+        >报 表
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import option from "./configuration/mainList.json";
+
+  export default {
+    name: "customerInformation",
+    data() {
+      return {
+        form: {},
+        option: option,
+        parentId:0,
+        dataList: [],
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+        query:{}
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      option.height = window.innerHeight - 280 ;
+    },
+    methods: {
+      //删除列表后面的删除按钮触发触发(row, index, done)
+      rowDel(row, index, done) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          // 数据回调进行刷新
+          done(row);
+        });
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        params.parentId = 0
+        this.onLoad(this.page, params);
+        done()
+      },
+      searchReset() {
+        console.log('1')
+      },
+      selectionChange() {
+        console.log('1')
+      },
+      currentChange() {
+        console.log('1')
+      },
+      sizeChange() {
+        console.log('1')
+      },
+      refreshChange() {
+        console.log('1')
+      },
+      onLoad(page, params = {}) {
+        this.dataList = [{
+          fNo:"DD",
+          fType:"箱种类",
+          fName:"丹东",
+          fEname:"dandong",
+          portName:"威海-丹东",
+          fUncode:"CEWEI",
+          fTeu:"1",
+          fCbm:"2",
+          fWeight:"3",
+          fStatus:"正常使用",
+          remark:"123",
+          createBy:"admin",
+          createTime:"2021-04-16",
+          updateBy:"admin",
+          updateTime:"2021-04-16",
+        }];
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 142 - 0
src/views/basicData/portinformation/configuration/mainList.json

@@ -0,0 +1,142 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "tree": true,
+  "selection": true,
+  "addBtn": true,
+  "viewBtn": true,
+  "editBtn": true,
+  "delBtn": true,
+  "menuWidth": 220,
+  "column": [
+    {
+      "label": "港口类型",
+      "prop": "havenName",
+      "search": true,
+      "index": 1,
+      "width": 120
+    },
+    {
+      "label": "港口编号",
+      "prop": "fNo",
+      "index": 2,
+      "width": 150,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "港口全称",
+      "prop": "fName",
+      "search": true,
+      "index": 3,
+      "width": 150,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "英文全称",
+      "prop": "fEname",
+      "index": 4,
+      "width": 150
+    },
+    {
+      "label": "航线",
+      "prop": "portName",
+      "index": 5,
+      "width": 120
+    },
+    {
+      "label": "UNCODE",
+      "prop": "fUncode",
+      "index": 6,
+      "width": 120
+    },
+    {
+      "label": "国家",
+      "prop": "fCountry",
+      "index": 7,
+      "width": 80
+    },
+    {
+      "label": "省",
+      "prop": "fProvince",
+      "index": 8,
+      "width": 80
+    },
+    {
+      "label": "市",
+      "prop": "fCity",
+      "index": 9,
+      "width": 80
+    },
+    {
+      "label": "状态",
+      "prop": "fStatus",
+      "type": "select",
+      "dicData": [{
+        "label": "正常",
+        "value": 0
+      }, {
+        "label": "关闭",
+        "value": 1
+      }],
+      "search": true,
+      "index": 10,
+      "width": 120
+    },
+    {
+      "label": "备注",
+      "prop": "remark",
+      "index": 11,
+      "width": 150
+    },
+    {
+      "label": "录入人",
+      "prop": "createBy",
+      "addDisplay": false,
+      "editDisplay":false,
+      "index": 12,
+      "width": 120
+    },
+    {
+      "label": "录入时间",
+      "prop": "createTime",
+      "addDisplay": false,
+      "editDisplay":false,
+      "index": 13,
+      "width": 150
+    },
+    {
+      "label": "最新修改人",
+      "prop": "updateBy",
+      "addDisplay":false,
+      "editDisplay":false,
+      "index": 14,
+      "width": 120
+    },
+    {
+      "label": "最新修改时间",
+      "prop": "updateTime",
+      "addDisplay": false,
+      "editDisplay":false,
+      "index": 15,
+      "width": 150
+    }
+  ]
+}

+ 118 - 0
src/views/basicData/portinformation/index.vue

@@ -0,0 +1,118 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :data="dataList"
+               ref="crud"
+               v-model="form"
+               :page.sync="page"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button
+          icon="el-icon-printer"
+          size="small"
+          type="primary"
+          @click.stop=""
+        >报 表
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import option from "./configuration/mainList.json";
+
+  export default {
+    name: "customerInformation",
+    data() {
+      return {
+        form: {},
+        option: option,
+        parentId:0,
+        dataList: [],
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+        query:{}
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      option.height = window.innerHeight - 350 ;
+    },
+    methods: {
+      //删除列表后面的删除按钮触发触发(row, index, done)
+      rowDel(row, index, done) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          // 数据回调进行刷新
+          done(row);
+        });
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        params.parentId = 0
+        this.onLoad(this.page, params);
+        done()
+      },
+      searchReset() {
+        console.log('1')
+      },
+      selectionChange() {
+        console.log('1')
+      },
+      currentChange() {
+        console.log('1')
+      },
+      sizeChange() {
+        console.log('1')
+      },
+      refreshChange() {
+        console.log('1')
+      },
+      onLoad(page, params = {}) {
+        this.dataList = [{
+          havenName:"海港",
+          fNo:"DD",
+          fName:"丹东",
+          fEname:"dandong",
+          portName:"威海-丹东",
+          fUncode:"CEWEI",
+          fCountry:"中国",
+          fProvince:"山东",
+          fCity:"威海",
+          fStatus:"正常使用",
+          remark:"123",
+          createBy:"admin",
+          createTime:"2021-04-16",
+          updateBy:"admin",
+          updateTime:"2021-04-16",
+        }];
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 3 - 3
src/views/workManagement/main-items/configuration/mainList.json

@@ -7,12 +7,12 @@
   "lazy": true,
   "tip": false,
   "searchShow": true,
-  "searchMenuSpan": 6,
+  "searchMenuPosition": "right",
   "tree": true,
   "selection": true,
-  "editBtn": true,
+  "editBtn": false,
   "viewBtn": false,
-  "delBtn": true,
+  "delBtn": false,
   "menuWidth": 220,
   "column": [
     {

+ 32 - 26
src/views/workManagement/main-items/detailsPage.vue

@@ -13,7 +13,7 @@
     <div style="margin-top: 60px">
       <containerTitle title="基础信息"></containerTitle>
       <basic-container>
-        <el-form :model="form" ref="form" label-width="130px">
+        <el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
           <el-row>
             <el-col v-for="(item, index) in basicData.column" :span="item.span?item.span:6" :key="index">
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
@@ -40,42 +40,34 @@
           @row-save="rowSave"
           @size-change="sizeChange"
           @current-change="currentChange"
-          @selection-change="selectionChange"
           @search-change="searchChange"
           @refresh-change="refreshChange"
           @on-load="getList"
           @saveColumn="saveColumn"
         >
           <template slot="menuLeft">
-            <el-button type="success"
+            <el-button type="primary"
                        size="small"
                        icon="el-icon-plus"
-                       plain
                        @click="serviceDialog = true">新增明细
             </el-button>
-            <el-button type="success"
+            <el-button type="primary"
                        size="small"
                        icon="el-icon-plus"
-                       plain
                        @click="">新 单
             </el-button>
             <el-button type="info"
                        size="small"
-                       plain
                        @click="">请 核
             </el-button>
           </template>
           <template slot="menuRight">
-            <el-button type="primary"
-                       size="small"
-                       icon="el-icon-arrow-right"
-                       plain
-                       @click="">导 出
-            </el-button>
-            <el-button type="primary"
-                       size="small"
-                       plain
-                       @click="">打 印
+            <el-button
+              icon="el-icon-printer"
+              size="small"
+              type="primary"
+              @click.stop="openReport()"
+            >报表
             </el-button>
           </template>
           <template slot-scope="{row,index}"  slot="menu">
@@ -139,7 +131,7 @@
         </el-col>
       </el-row>
       <span slot="footer" class="dialog-footer">
-  <el-button type="primary" @click="serviceConfirm()" :disabled="this.serviceSelectList.length == 0">导 入</el-button>
+          <el-button type="primary" @click="serviceConfirm()" :disabled="this.serviceSelectList.length == 0">导 入</el-button>
          <el-button @click="serviceDialog = false">取 消</el-button>
         </span>
     </el-dialog>
@@ -187,6 +179,7 @@
 
 <script>
   import option from "./configuration/detailsPage.json";
+  import { projectDetail } from "@/api/workManagement/mainProject";
   //上传文件json
   import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json"
   //服务列表接口
@@ -238,7 +231,7 @@
               rules: [
                 {
                   required: true,
-                  message: '请输入系统编号',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -248,7 +241,7 @@
               rules: [
                 {
                   required: true,
-                  message: '请输入项目编码',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -258,7 +251,7 @@
               rules: [
                 {
                   required: true,
-                  message: '请输入项目名称',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -271,7 +264,7 @@
               rules: [
                 {
                   pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
-                  message: '请输入数字或小数,且小数位不超过两位',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -282,7 +275,7 @@
               rules: [
                 {
                   pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
-                  message: '请输入数字或小数,且小数位不超过两位',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -293,7 +286,7 @@
               rules: [
                 {
                   pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
-                  message: '请输入数字或小数,且小数位不超过两位',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -305,7 +298,7 @@
               rules: [
                 {
                   pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
-                  message: '请输入数字或小数,且小数位不超过两位',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -440,7 +433,16 @@
         },
       };
     },
+    created() {
+      if(this.$route.query.id){
+        projectDetail(this.$route.query.id).then(res =>{
+          this.form = res.data.data;
+          // this.data = res.data.data.itemList;
+        })
+      }
+    },
     mounted() {
+
     },
     methods: {
       //删除列表后面的删除按钮触发触发(row, index, done)
@@ -609,7 +611,8 @@
       //确定
       userConfirm(){
          if(this.userSelection){
-           this.optionFrom[this.detailsSelect].userId = this.userSelection[0].userId;
+           this.data[this.detailsSelect].userId = this.userSelection[0].realName;
+           this.userDialog = !this.userDialog
          }
       }
     },
@@ -643,4 +646,7 @@
     right: 36px;
     top: 115px;
   }
+  ::v-deep .el-form-item {
+    margin-bottom: 0;
+  }
 </style>

+ 67 - 37
src/views/workManagement/main-items/list.vue

@@ -18,35 +18,59 @@
       @saveColumn="saveColumn"
     >
       <template slot="menuLeft">
-        <el-button type="primary" size="small" icon="el-icon-arrow-right" plain
-          >导 出
-        </el-button>
-        <el-button type="success"
+        <el-button type="primary"
                    size="small"
                    icon="el-icon-plus"
-                   plain
                    @click="addMainItems">新 单
         </el-button>
+        <el-button icon="el-icon-printer"
+                   size="small"
+                   type="primary"
+                   @click.stop="openReport()"
+          >报 表
+        </el-button>
       </template>
       <template slot-scope="scope" slot="menu">
         <el-button
+          type="text"
+          icon="el-icon-edit"
+          size="small"
+          @click.stop="editOpen(scope.row, scope.index)"
+        >编辑
+        </el-button>
+        <el-button
           icon="el-icon-check"
           size="small"
           type="text"
           @click.stop="beforeOpenPage(scope.row, scope.index)"
-          >详 情</el-button
-        >
+        >详 情
+        </el-button>
+        <el-button
+          type="text"
+          icon="el-icon-delete"
+          size="small"
+          @click.stop="rowDel(scope.row, scope.index)"
+        >删除
+        </el-button>
       </template>
+      <report-dialog
+        :switchDialog="switchDialog"
+        @onClose="onClose()"
+      ></report-dialog>
     </avue-crud>
   </basic-container>
 </template>
 
 <script>
   import option from "./configuration/mainList.json";
+  import { getDictionary } from "@/api/system/dictbiz";
+  import { getList,deleteMain } from "@/api/workManagement/mainProject";
+  import reportDialog from "@/components/report-dialog/main";
 
 export default {
   data() {
     return {
+      switchDialog:false,
       loading: false,
       data: [],
       optionTable: option,
@@ -57,34 +81,38 @@ export default {
       }
     };
   },
+  created() {
+    let  params = {code:"payment_term"}
+    getDictionary(params).then(res =>{
+      console.log(res.data.data)
+    })
+    // if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
+    //   this.option.searchMenuSpan = 6;
+    //   this.option.searchMenuPosition = "center";
+    // }
+  },
   mounted() {
-    option.height = window.innerHeight - 350 ;
+    option.height = window.innerHeight - 380 ;
+  },
+  components: {
+    reportDialog
   },
   methods: {
-    getList() {
+    //打印
+    openReport() {
+      this.switchDialog =! this.switchDialog;
+    },
+    //关闭打印
+    onClose(val) {
+      this.switchDialog = val;
+    },
+    getList(page,params={}) {
       this.loading = true;
-      setTimeout(() => {
-        this.loading = false;
-        this.data = [
-          {
-            prop1: "TUBAO",
-            prop2: "途宝注册",
-            prop3: "途宝",
-            prop4: "2100",
-            prop5: "1500",
-            prop6: "李俊平",
-            prop7: "XM0001",
-            prop8: "暂存",
-            prop9: "效率高",
-            prop10: "LOLO",
-            prop11: "2021-1-1",
-            prop12: "LOLO",
-            prop13: "2021-1-1",
-            prop14: "15199999999"
-          }
-        ];
-        this.page.total = 1;
-      }, 1000);
+      getList(page.currentPage, page.pageSize,params).then(res =>{
+        this.data = res.data.data.records
+        this.page.total = res.data.data.total
+        this.loading = false
+      })
     },
     //新单打开
     addMainItems(){
@@ -94,10 +122,10 @@ export default {
       });
     },
     //编辑打开
-    beforeOpen(row, index){
+    editOpen(row, index){
       this.$router.push({
         path: "/mainItems_detailsPage",
-        query: {id: JSON.stringify(row.prop1)},
+        query: {id: JSON.stringify(row.id)},
       });
     },
     searchChange(params, done) {
@@ -123,10 +151,12 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        this.$message({
-          type: "success",
-          message: "操作成功!"
-        });
+        deleteMain(row.id).then(res =>{
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        })
         // 数据回调进行刷新
         done(row);
       });

+ 1 - 1
src/views/workManagement/receipt/configuration/statisticalList.json

@@ -7,7 +7,7 @@
   "lazy": true,
   "tip": false,
   "searchShow": true,
-  "searchMenuSpan": 12,
+  "searchMenuPosition": "right",
   "tree": true,
   "selection": true,
   "viewBtn": true,

+ 8 - 0
src/views/workManagement/receipt/statisticalList.vue

@@ -40,7 +40,15 @@
       }
     },
     created() {
+      console.log(parseInt(this.option.column.length / 4),111111111)
+      if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
+        console.log(123)
+        this.option.searchMenuSpan = 6;
+        this.option.searchMenuPosition = "center";
+      }else {
 
+        this.option.searchMenuPosition = "right";
+      }
     },
     mounted() {
       option.height = window.innerHeight - 340 ;

+ 1 - 1
src/views/workManagement/service-items/configuration/projectOption.json

@@ -6,7 +6,7 @@
   "lazy": true,
   "tip": false,
   "searchShow": true,
-  "searchMenuSpan": 12,
+  "searchMenuPosition": "right",
   "tree": true,
   "selection": true,
   "viewBtn": false,

+ 1 - 1
src/views/workManagement/service-items/configuration/typeOption.json

@@ -7,7 +7,7 @@
   "tip": false,
   "simplePage": true,
   "searchShow": true,
-  "searchMenuSpan": 6,
+  "searchMenuPosition": "right",
   "tree": true,
   "selection": true,
   "viewBtn": true,

+ 29 - 6
src/views/workManagement/service-items/project.vue

@@ -37,13 +37,18 @@
           @tree-load="treeLoad"
         >
           <template slot="menuLeft">
-            <el-button type="primary"
-                       size="small"
-                       icon="el-icon-upload2"
-                       plain
-                       @click="">导 出
+            <el-button
+              icon="el-icon-printer"
+              size="small"
+              type="primary"
+              @click.stop="openReport()"
+            >报 表
             </el-button>
           </template>
+          <report-dialog
+            :switchDialog="switchDialog"
+            @onClose="onClose()"
+          ></report-dialog>
         </avue-crud>
       </basic-container>
     </el-col>
@@ -53,10 +58,11 @@
 <script>
   import option from "./configuration/projectOption.json";
   import {getServiceProjectList, remove, submit,detail, getServiceTypeTree,getDeptTree,getDicData} from "@/api/workManagement/serviceProject";
-
+  import reportDialog from "@/components/report-dialog/main";
 export default {
   data() {
     return {
+      switchDialog:false,//报表
       loading: true,
       data: [],
       tableOption: option,
@@ -98,6 +104,15 @@ export default {
       }
     };
   },
+  created() {
+    if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
+      this.option.searchMenuSpan = 6;
+      this.option.searchMenuPosition = "center";
+    }
+  },
+  components: {
+    reportDialog
+  },
   mounted() {
     option.height = window.innerHeight - 350 ;
     //查询服务类别字典项
@@ -106,6 +121,14 @@ export default {
     });
   },
   methods: {
+    //打印
+    openReport() {
+      this.switchDialog =! this.switchDialog;
+    },
+    //关闭打印
+    onClose(val) {
+      this.switchDialog = val;
+    },
     getList(page, params = {}) {
       this.loading = true
       getServiceProjectList(page.currentPage, page.pageSize, params, this.treeDeptId).then(res => {

+ 5 - 2
src/views/workManagement/service-items/type.vue

@@ -53,10 +53,13 @@
       }
     },
     created() {
-
+      if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
+        this.option.searchMenuSpan = 6;
+        this.option.searchMenuPosition = "center";
+      }
     },
     mounted() {
-      option.height = window.innerHeight - 350 ;
+      option.height = window.innerHeight - 310 ;
     },
     methods: {
       onLoad(page, params = {}) {

+ 1 - 1
src/views/workManagement/task/configuration/mainList.json

@@ -6,7 +6,7 @@
   "lazy": true,
   "tip": false,
   "searchShow": true,
-  "searchMenuSpan": 6,
+  "searchMenuPosition": "right",
   "tree": true,
   "selection": true,
   "addBtn": false,

+ 4 - 1
src/views/workManagement/task/index.vue

@@ -62,7 +62,10 @@
       }
     },
     created() {
-
+      if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
+        this.option.searchMenuSpan = 6;
+        this.option.searchMenuPosition = "center";
+      }
     },
     mounted() {
       option.height = window.innerHeight - 350 ;