ly 2 жил өмнө
parent
commit
c29754a02c

+ 28 - 28
master/src/main/java/com/ruoyi/project/invoice/controller/TInvoiceBookingworkticketController.java

@@ -175,29 +175,29 @@ public class TInvoiceBookingworkticketController extends BaseController
         //创建sheet页
         Sheet sheet = wb.createSheet("sheet1");
         //设置列的宽度,第一个参数为列的序号,从0开始,第二参数为列宽,单位1/256个字节
-        sheet.setColumnWidth(0, 12*256);
-        sheet.setColumnWidth(1, 26*256);
-        sheet.setColumnWidth(2, 26*256);
-        sheet.setColumnWidth(3, 26*256);
-        sheet.setColumnWidth(4, 26*256);
-        sheet.setColumnWidth(5, 26*256);
-        sheet.setColumnWidth(6, 26*256);
-        sheet.setColumnWidth(7, 26*256);
-        sheet.setColumnWidth(8, 40*256);
-        sheet.setColumnWidth(9, 40*256);
-        sheet.setColumnWidth(10, 40*256);
-        sheet.setColumnWidth(11, 40*256);
-        sheet.setColumnWidth(12, 40*256);
-        sheet.setColumnWidth(13, 40*256);
-        sheet.setColumnWidth(14, 40*256);
-        sheet.setColumnWidth(15, 40*256);
-        sheet.setColumnWidth(16, 40*256);
-        sheet.setColumnWidth(17, 40*256);
-        sheet.setColumnWidth(18, 40*256);
-        sheet.setColumnWidth(19, 40*256);
-        sheet.setColumnWidth(20, 40*256);
-        sheet.setColumnWidth(21, 40*256);
-        sheet.setColumnWidth(22, 40*256);
+        sheet.setColumnWidth(0, 15*256);
+        sheet.setColumnWidth(1, 16*256);
+        sheet.setColumnWidth(2, 13*256);
+        sheet.setColumnWidth(3, 13*256);
+        sheet.setColumnWidth(4, 13*256);
+        sheet.setColumnWidth(5, 13*256);
+        sheet.setColumnWidth(6, 13*256);
+        sheet.setColumnWidth(7, 13*256);
+        sheet.setColumnWidth(8, 13*256);
+        sheet.setColumnWidth(9, 13*256);
+        sheet.setColumnWidth(10, 13*256);
+        sheet.setColumnWidth(11, 13*256);
+        sheet.setColumnWidth(12, 13*256);
+        sheet.setColumnWidth(13, 13*256);
+        sheet.setColumnWidth(14, 13*256);
+        sheet.setColumnWidth(15, 13*256);
+        sheet.setColumnWidth(16, 13*256);
+        sheet.setColumnWidth(17, 13*256);
+        sheet.setColumnWidth(18, 13*256);
+        sheet.setColumnWidth(19, 13*256);
+        sheet.setColumnWidth(20, 13*256);
+        sheet.setColumnWidth(21, 13*256);
+        sheet.setColumnWidth(22, 13*256);
 
         //设置开始行和开始列
         Row row0 = sheet.createRow(0);
@@ -319,7 +319,7 @@ public class TInvoiceBookingworkticketController extends BaseController
         int columnIndex1= 1;
         CellStyle setBorder = wb.createCellStyle();
         //设置背景颜色
-        setBorder.setFillForegroundColor(IndexedColors.BLUE_GREY.getIndex());
+        setBorder.setFillForegroundColor(IndexedColors.YELLOW.getIndex());
         setBorder.setFillPattern(FillPatternType.SOLID_FOREGROUND);
         //设置自动换行
         setBorder.setWrapText(true);
@@ -333,13 +333,13 @@ public class TInvoiceBookingworkticketController extends BaseController
         //设置左边框线条类型
         setBorder.setBorderLeft(BorderStyle.THIN);
         //设置上边框线条颜色
-        setBorder.setTopBorderColor(IndexedColors.BLUE_GREY.getIndex());
+        setBorder.setTopBorderColor(IndexedColors.BLACK.getIndex());
         //设置右边框线条颜色
-        setBorder.setRightBorderColor(IndexedColors.BLUE_GREY.getIndex());
+        setBorder.setRightBorderColor(IndexedColors.BLACK.getIndex());
         //设置下边框线条颜色
-        setBorder.setBottomBorderColor(IndexedColors.BLUE_GREY.getIndex());
+        setBorder.setBottomBorderColor(IndexedColors.BLACK.getIndex());
         //设置左边框线条颜色
-        setBorder.setLeftBorderColor(IndexedColors.BLUE_GREY.getIndex());
+        setBorder.setLeftBorderColor(IndexedColors.BLACK.getIndex());
         //对齐方式
         //设置水平对齐方式
         setBorder.setAlignment(HorizontalAlignment.CENTER);

+ 43 - 19
master/src/main/java/com/ruoyi/project/invoice/controller/TInvoiceTagController.java

@@ -1,6 +1,11 @@
 package com.ruoyi.project.invoice.controller;
 
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
+
+import com.ruoyi.project.invoice.mapper.TInvoiceTagMapper;
+import com.ruoyi.project.system.domain.TAlarmtype;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -20,6 +25,8 @@ import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
 
+import javax.annotation.Resource;
+
 /**
  * 工作票索引Controller
  *
@@ -28,18 +35,18 @@ import com.ruoyi.framework.web.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/invoice/tag")
-public class TInvoiceTagController extends BaseController
-{
+public class TInvoiceTagController extends BaseController {
     @Autowired
     private ITInvoiceTagService tInvoiceTagService;
+    @Resource
+    private TInvoiceTagMapper tInvoiceTagMapper;
 
     /**
      * 查询工作票索引列表
      */
     @PreAuthorize("@ss.hasPermi('invoice:tag:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TInvoiceTag tInvoiceTag)
-    {
+    public TableDataInfo list(TInvoiceTag tInvoiceTag) {
         startPage();
         List<TInvoiceTag> list = tInvoiceTagService.selectTInvoiceTagList(tInvoiceTag);
         return getDataTable(list);
@@ -49,10 +56,22 @@ public class TInvoiceTagController extends BaseController
      * 查询工作票索引列表
      */
     @GetMapping("/listAll")
-    public List<TInvoiceTag> listAll(TInvoiceTag tInvoiceTag)
-    {
-        List<TInvoiceTag> list = tInvoiceTagService.selectTInvoiceTagList(tInvoiceTag);
-        return list;
+    public List<TInvoiceTag> listAll(TInvoiceTag tInvoiceTag) {
+        TInvoiceTag tag1 = new TInvoiceTag();
+        tag1.setType("1");
+        List<TInvoiceTag> list1 = tInvoiceTagService.selectTInvoiceTagList(tag1);
+        TInvoiceTag tag0 = new TInvoiceTag();
+        tag0.setType("0");
+        List<TInvoiceTag> list0 = tInvoiceTagService.selectTInvoiceTagList(tag0);
+
+        tag1.setChildren(list1);
+        tag0.setChildren(list0);
+        tag1.setTag("在用");
+        tag0.setTag("停用");
+        List<TInvoiceTag> listAll = new ArrayList<>();
+        listAll.add(tag1);
+        listAll.add(tag0);
+        return listAll;
     }
 
     /**
@@ -61,8 +80,7 @@ public class TInvoiceTagController extends BaseController
     @PreAuthorize("@ss.hasPermi('invoice:tag:export')")
     @Log(title = "工作票索引", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(TInvoiceTag tInvoiceTag)
-    {
+    public AjaxResult export(TInvoiceTag tInvoiceTag) {
         List<TInvoiceTag> list = tInvoiceTagService.selectTInvoiceTagList(tInvoiceTag);
         ExcelUtil<TInvoiceTag> util = new ExcelUtil<TInvoiceTag>(TInvoiceTag.class);
         return util.exportExcel(list, "tag");
@@ -73,8 +91,7 @@ public class TInvoiceTagController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('invoice:tag:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(tInvoiceTagService.selectTInvoiceTagById(id));
     }
 
@@ -84,8 +101,7 @@ public class TInvoiceTagController extends BaseController
     @PreAuthorize("@ss.hasPermi('invoice:tag:add')")
     @Log(title = "工作票索引", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TInvoiceTag tInvoiceTag)
-    {
+    public AjaxResult add(@RequestBody TInvoiceTag tInvoiceTag) {
         return toAjax(tInvoiceTagService.insertTInvoiceTag(tInvoiceTag));
     }
 
@@ -95,19 +111,27 @@ public class TInvoiceTagController extends BaseController
     @PreAuthorize("@ss.hasPermi('invoice:tag:edit')")
     @Log(title = "工作票索引", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TInvoiceTag tInvoiceTag)
-    {
+    public AjaxResult edit(@RequestBody TInvoiceTag tInvoiceTag) {
         return toAjax(tInvoiceTagService.updateTInvoiceTag(tInvoiceTag));
     }
 
+    /**
+     * 修改报警开启状态
+     */
+    @PreAuthorize("@ss.hasPermi('invoice:tag:edit')")
+    @Log(title = "工作票索引", businessType = BusinessType.UPDATE)
+    @PutMapping("/changeTagType")
+    public AjaxResult changeTagType(@RequestBody TInvoiceTag tInvoiceTag) {
+        return toAjax(tInvoiceTagMapper.updateType(tInvoiceTag));
+    }
+
     /**
      * 删除工作票索引
      */
     @PreAuthorize("@ss.hasPermi('invoice:tag:remove')")
     @Log(title = "工作票索引", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tInvoiceTagService.deleteTInvoiceTagByIds(ids));
     }
 }

+ 24 - 0
master/src/main/java/com/ruoyi/project/invoice/domain/TInvoiceBookingworkticket.java

@@ -108,6 +108,14 @@ public class TInvoiceBookingworkticket extends BaseEntity
     @TableField(exist = false)
     private Long workType;
 
+    /** 票号 */
+    @TableField(exist = false)
+    private String allNo;
+
+    /** 索引 */
+    @TableField(exist = false)
+    private String tag;
+
     /** 危害 */
     @TableField(exist = false)
     private String whgzxkzh;
@@ -362,6 +370,14 @@ public class TInvoiceBookingworkticket extends BaseEntity
         this.userMgName = userMgName;
     }
 
+    public String getAllNo() {
+        return allNo;
+    }
+
+    public void setAllNo(String allNo) {
+        this.allNo = allNo;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -492,4 +508,12 @@ public class TInvoiceBookingworkticket extends BaseEntity
     public void setUserSupPhone(String userSupPhone) {
         this.userSupPhone = userSupPhone;
     }
+
+    public String getTag() {
+        return tag;
+    }
+
+    public void setTag(String tag) {
+        this.tag = tag;
+    }
 }

+ 12 - 0
master/src/main/java/com/ruoyi/project/invoice/domain/TInvoiceTag.java

@@ -1,6 +1,7 @@
 package com.ruoyi.project.invoice.domain;
 
 import java.util.Date;
+import java.util.List;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -60,6 +61,9 @@ public class TInvoiceTag extends BaseEntity
     @Excel(name = "备注")
     private String remarks;
 
+    @TableField(exist = false)
+    private List<TInvoiceTag> Children;
+
     public void setId(Long id)
     {
         this.id = id;
@@ -168,6 +172,14 @@ public class TInvoiceTag extends BaseEntity
         this.deptName = deptName;
     }
 
+    public List<TInvoiceTag> getChildren() {
+        return Children;
+    }
+
+    public void setChildren(List<TInvoiceTag> children) {
+        Children = children;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 2 - 0
master/src/main/java/com/ruoyi/project/invoice/mapper/TInvoiceTagMapper.java

@@ -60,4 +60,6 @@ public interface TInvoiceTagMapper
      * @return 结果
      */
     public int deleteTInvoiceTagByIds(Long[] ids);
+
+    int updateType(TInvoiceTag tInvoiceTag);
 }

+ 11 - 1
master/src/main/resources/mybatis/invoice/TInvoiceBookingworkticketMapper.xml

@@ -197,7 +197,17 @@
             <if test="xzkjxkzh != null  and xzkjxkzh != ''">and xzkjxkzh = #{xzkjxkzh}</if>
             <if test="mbzyxkzh != null  and mbzyxkzh != ''">and mbzyxkzh = #{mbzyxkzh}</if>
             <if test="gczyxkzh != null  and gczyxkzh != ''">and gczyxkzh = #{gczyxkzh}</if>
-            <if test="gczyjb != null  and gczyjb != ''">and gczyjb = #{gczyjb}</if>
+            <if test="tag != null  and tag != ''">and tag = #{tag}</if>
+            <if test="allNo != null  and allNo != ''">
+                and
+                (whgzxkzh like concat(concat('%', #{allNo}), '%')
+                or dhzyxkzh like concat(concat('%', #{allNo}), '%')
+                or xzkjxkzh like concat(concat('%', #{allNo}), '%')
+                or mbzyxkzh like concat(concat('%', #{allNo}), '%')
+                or gczyxkzh like concat(concat('%', #{allNo}), '%')
+                or yqxkzh like concat(concat('%', #{allNo}), '%')
+                )
+            </if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->

+ 8 - 0
master/src/main/resources/mybatis/invoice/TInvoiceTagMapper.xml

@@ -91,6 +91,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
+    <update id="updateType" parameterType="TInvoiceTag">
+        update t_invoice_tag
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="type != null">type = #{type},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
     <update id="deleteTInvoiceTagById" parameterType="Long">
         update t_invoice_tag set del_flag = 2 where id = #{id}
     </update>

+ 13 - 0
ui/src/api/invoice/tag.js

@@ -44,6 +44,19 @@ export function updateTag(data) {
   })
 }
 
+// 修改报警开启状态
+export function changeTagType(id, type) {
+  const data = {
+    id,
+    type
+  }
+  return request({
+    url: '/invoice/tag/changeTagType',
+    method: 'put',
+    data: data
+  })
+}
+
 // 删除工作票索引
 export function delTag(id) {
   return request({

+ 328 - 0
ui/src/views/byxhome.vue

@@ -0,0 +1,328 @@
+<template>
+  <div class="app-main" style="background: #11285a">
+    <div class="dashboard-editor-container" style="width:100%;height:100%">
+
+      <!--<panel-group @handleSetLineChartData="handleSetLineChartData" />
+
+      <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
+        <line-chart :chart-data="lineChartData" />
+      </el-row>-->
+
+      <el-row :gutter="10">
+        <el-col :xs="24" :sm="24" :lg="9">
+          <div>
+            <div class="card-head">
+              <span class="card-name" @click="handleRouter('first')">{{ $t('乙烯产量及OAE') }}</span>
+              <el-dropdown placement="bottom" trigger="click" class="card-time">
+              <span class="el-dropdown-link">
+                <i class="el-icon-date"></i>
+              </span>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item @click.native="chooseOne(1)">{{this.searchFormField.year - 2}}</el-dropdown-item>
+                  <el-dropdown-item @click.native="chooseTwo(1)">{{this.searchFormField.year - 1}}</el-dropdown-item>
+                  <el-dropdown-item @click.native="chooseThree(1)">{{this.searchFormField.year}}</el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+            </div>
+          </div>
+          <div class="chart-wrapper">
+            <yx-chart :year=this.yxChooseYear />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="9">
+          <div>
+            <div class="card-head">
+              <span class="card-name" @click="handleRouter('second')">{{ $t('芳烃产量及OAE') }}</span>
+              <el-dropdown placement="bottom" trigger="click" class="card-time">
+              <span class="el-dropdown-link">
+                <i class="el-icon-date"></i>
+              </span>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item @click.native="chooseOne(2)">{{this.searchFormField.year - 2}}</el-dropdown-item>
+                  <el-dropdown-item @click.native="chooseTwo(2)">{{this.searchFormField.year - 1}}</el-dropdown-item>
+                  <el-dropdown-item @click.native="chooseThree(2)">{{this.searchFormField.year}}</el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+            </div>
+          </div>
+          <div class="chart-wrapper">
+            <qzft-chart :year=this.qzftChooseYear />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="6">
+          <div>
+            <div class="card-head">
+              <span class="card-name">{{ $t('生日提醒') }}</span>
+            </div>
+          </div>
+          <div class="chart-wrapper">
+            <brith-chart />
+          </div>
+        </el-col>
+      </el-row>
+
+      <el-row :gutter="10">
+        <el-col :xs="24" :sm="24" :lg="9">
+          <div >
+            <div class="card-head">
+              <span class="card-name" @click="handleRouter('fourth')">{{ $t('能源消耗') }}</span>
+              <el-dropdown placement="bottom" trigger="click" class="card-time">
+              <span class="el-dropdown-link">
+                <i class="el-icon-date"></i>
+              </span>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item @click.native="chooseOne(3)">{{this.searchFormField.year - 2}}</el-dropdown-item>
+                  <el-dropdown-item @click.native="chooseTwo(3)">{{this.searchFormField.year - 1}}</el-dropdown-item>
+                  <el-dropdown-item @click.native="chooseThree(3)">{{this.searchFormField.year}}</el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+            </div>
+          </div>
+          <div class="chart-wrapper">
+            <nyxh-chart :year=this.nyxhChooseYear />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="9">
+          <div>
+            <div class="card-head">
+              <span class="card-name" @click="handleRouter('third')">{{ $t('产能利用率/工厂损失') }}</span>
+              <el-dropdown placement="bottom" trigger="click" class="card-time">
+              <span class="el-dropdown-link">
+                <i class="el-icon-date"></i>
+              </span>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item @click.native="chooseOne(4)">{{this.searchFormField.year - 2}}</el-dropdown-item>
+                  <el-dropdown-item @click.native="chooseTwo(4)">{{this.searchFormField.year - 1}}</el-dropdown-item>
+                  <el-dropdown-item @click.native="chooseThree(4)">{{this.searchFormField.year}}</el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+            </div>
+          </div>
+          <div class="chart-wrapper">
+            <cnlyl-chart :year=this.cnlylChooseYear />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="6">
+          <div >
+            <div class="card-head">
+              <span class="card-name">{{ $t('预警信息') }}</span>
+            </div>
+          </div>
+          <div class="chart-wrapper">
+            <warn-chart />
+          </div>
+        </el-col>
+      </el-row>
+
+      <el-row :gutter="10">
+        <el-col :xs="24" :sm="24" :lg="9">
+          <div>
+            <div class="card-head">
+              <span class="card-name" @click="handleRouter2('')">{{ $t('能耗管理统计') }}</span>
+            </div>
+          </div>
+          <div class="chart-wrapper">
+            <nhtj-chart />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="9">
+          <div>
+            <div class="card-head">
+              <span class="card-name" @click="handleRouter3('')">{{ $t('KPI考核') }}</span>
+            </div>
+          </div>
+          <div class="chart-wrapper">
+            <kpi-chart />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="6">
+          <div>
+            <div class="card-head">
+              <span class="card-name">{{ $t('隐患排查') }}</span>
+            </div>
+          </div>
+          <div class="chart-wrapper">
+            <yhpc-chart />
+          </div>
+        </el-col>
+      </el-row>
+
+    </div>
+  </div>
+</template>
+
+<script>
+  import PanelGroup from './dashboard/PanelGroup'
+  import LineChart from './dashboard/LineChart'
+  import YxChart from './dashboard/YxChart'
+  import QzftChart from './dashboard/QzftChart'
+  import BarChart from './dashboard/BarChart'
+  import CnlylChart from './dashboard/CnlylChart'
+  import NyxhChart from './dashboard/NyxhChart'
+  import NhtjChart from './dashboard/NhtjChart'
+  import KpiChart from './dashboard/KpiChart'
+  import YhpcChart from "./dashboard/YhpcChart"
+  import WarnChart from "./dashboard/WarnChart"
+  import BrithChart from "./dashboard/BrithChart";
+
+  const lineChartData = {
+    newVisitis: {
+      expectedData: [100, 120, 161, 134, 105, 160, 165],
+      actualData: [120, 82, 91, 154, 162, 140, 145]
+    },
+    messages: {
+      expectedData: [200, 192, 120, 144, 160, 130, 140],
+      actualData: [180, 160, 151, 106, 145, 150, 130]
+    },
+    purchases: {
+      expectedData: [80, 100, 121, 104, 105, 90, 100],
+      actualData: [120, 90, 100, 138, 142, 130, 130]
+    },
+    shoppings: {
+      expectedData: [130, 140, 141, 142, 145, 150, 160],
+      actualData: [120, 82, 91, 154, 162, 140, 130]
+    }
+  }
+
+  export default {
+    name: 'Index',
+    components: {
+      PanelGroup,
+      LineChart,
+      YxChart,
+      QzftChart,
+      BarChart,
+      CnlylChart,
+      NyxhChart,
+      NhtjChart,
+      KpiChart,
+      YhpcChart,
+      WarnChart,
+      BrithChart
+    },
+    data() {
+      return {
+        lineChartData: lineChartData.newVisitis,
+        heightObj: {
+          height: document.body.clientHeight -50 + "px"
+        },
+        // 获取当前年份
+        searchFormField: {
+          year: this.getNowTime(),
+        },
+        yxChooseYear: 0,
+        qzftChooseYear: 0,
+        nyxhChooseYear: 0,
+        cnlylChooseYear: 0,
+      }
+    },
+    created() {
+      // this.$i18n.locale = 'zh'
+      // this.$store.dispatch('app/setLanguage', 'zh')
+    },
+    methods: {
+      /** 获取当前年份 */
+      getNowTime() {
+        var now = new Date();
+        var year = now.getFullYear(); //得到年份
+        var defaultDate = `${year}`;
+        defaultDate = `${year}`
+        return defaultDate;
+        this.$set(this.searchFormField, "year", defaultDate);
+      },
+      handleSetLineChartData(type) {
+        this.lineChartData = lineChartData[type]
+      },
+      handleRouter(type){
+        this.$router.push({ path: '/production/monthplan', query: { type: type }});
+      },
+      handleRouter2(type){
+        this.$router.push({ path: '/production/lbnhjstj', query: { type: type }});
+      },
+      handleRouter3(type){
+        this.$router.push({ path: '/ehs/ehskpinew', query: { type: type }});
+      },
+
+      //变换年份
+      chooseOne (index) {
+        if (index === 1) {
+          this.yxChooseYear = this.searchFormField.year - 2;
+        }else if (index === 2) {
+          this.qzftChooseYear = this.searchFormField.year - 2;
+        }else if (index === 3) {
+          this.nyxhChooseYear = this.searchFormField.year - 2;
+        }else if (index === 4) {
+          this.cnlylChooseYear = this.searchFormField.year - 2;
+        }
+      },
+      chooseTwo (index) {
+        if (index === 1) {
+          this.yxChooseYear = this.searchFormField.year - 1;
+        }else if (index === 2) {
+          this.qzftChooseYear = this.searchFormField.year - 1;
+        }else if (index === 3) {
+          this.nyxhChooseYear = this.searchFormField.year - 1;
+        }else if (index === 4) {
+          this.cnlylChooseYear = this.searchFormField.year - 1;
+        }
+      },
+      chooseThree (index) {
+        if (index === 1) {
+          this.yxChooseYear = this.searchFormField.year - 0;
+        }else if (index === 2) {
+          this.qzftChooseYear = this.searchFormField.year - 0;
+        }else if (index === 3) {
+          this.nyxhChooseYear = this.searchFormField.year - 0;
+        }else if (index === 4) {
+          this.cnlylChooseYear = this.searchFormField.year - 0;
+        }
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .dashboard-editor-container {
+    padding: 10px;
+    background-color: #182e62;
+    position: relative;
+
+    .chart-wrapper {
+      background: rgba(253, 245, 245, 0) linear-gradient(to right, #11285a, #1d2d4a) repeat scroll 0% 0%;
+      padding: 10px 0 0;
+      margin-bottom: 10px;
+    }
+  }
+
+  /deep/.el-dropdown {
+    color: #ffffff;
+    margin-right: 10px;
+    margin-top: 2px;
+  }
+
+  .card-time {
+    float: right;
+  }
+
+  .card-name {
+    cursor: pointer;
+    font-size: 12px;
+    font-weight:bold;
+    color: #ffffff;
+    padding: 2px 0 2px 5px;
+  }
+
+  .card-head {
+    background: rgba(253, 245, 245, 0) linear-gradient(to right, #4a7cf9, #628fff) repeat scroll 0% 0%;
+  }
+
+  @media (max-width:1024px) {
+    .chart-wrapper {
+      padding: 8px;
+    }
+  }
+  body {
+    font-size: 12px !important;
+  }
+
+</style>

+ 28 - 20
ui/src/views/ehs/jobticket/index.vue

@@ -201,14 +201,18 @@
         </el-date-picker>
       </el-form-item>
       <el-form-item :label="$t('索引')" prop="tag">
-        <el-select v-model="queryParams.tag" :placeholder="$t('请选择') + $t('索引')" filterable clearable size="small"
-                   @change="handleQuery">
-          <el-option
-            v-for="dict in tagOptions"
-            :key="dict.tag"
-            :label="dict.tag"
-            :value="dict.tag"
-          />
+        <el-select v-model="queryParams.tag" clearable filterable @change="handleQuery" placeholder="请选择索引">
+          <el-option-group
+            v-for="group in tagOptions"
+            :key="group.tag"
+            :label="group.tag">
+            <el-option
+              v-for="item in group.children"
+              :key="item.tag"
+              :label="item.tag"
+              :value="item.tag">
+            </el-option>
+          </el-option-group>
         </el-select>
       </el-form-item>
       <el-form-item>
@@ -283,7 +287,6 @@
       </el-table-column>
       <el-table-column :label="$t('签发时间')" align="center" prop="qfsj" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('签发班组')" align="center" prop="qfbz" :formatter="qfbzFormat"/>
-      <el-table-column :label="$t('签发人')" align="center" prop="qfr" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('新票/续票')" align="center" prop="xpxp" width="100" :formatter="xpxpFormat"/>
       <el-table-column :label="$t('延期许可证号')" align="center" prop="yqxkzh" width="100" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('危害工作许可证号')" align="center" prop="whgzxkzh" width="100"
@@ -413,9 +416,6 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item :label="$t('签发人')" prop="qfr">
-          <el-input v-model="form.qfr" :placeholder="$t('请输入') + $t('签发人')"/>
-        </el-form-item>
         <el-form-item :label="$t('新票/续票')" prop="xpxp" v-if="isxp">
           <el-select v-model="form.xpxp" :placeholder="$t('请选择') + $t('新票/续票')">
             <el-option
@@ -472,9 +472,9 @@
                      @change="checkCategoryPromotionUpdate(form.userUnit)">
             <el-option
               v-for="dict in userUnitOptions"
-              :key="dict.dictValue"
-              :label="dict.dictLabel"
-              :value="dict.dictValue"
+              :key="dict.userUnit"
+              :label="dict.userUnit"
+              :value="dict.userUnit"
             ></el-option>
           </el-select>
         </el-form-item>
@@ -655,9 +655,6 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item :label="$t('签发人')" prop="qfr">
-          <el-input v-model="postponeform.qfr" :placeholder="$t('请输入') + $t('签发人')"/>
-        </el-form-item>
         <el-form-item :label="$t('延期许可证号')" prop="yqxkzh">
           <el-input v-model="postponeform.yqxkzh" :placeholder="$t('请输入') + $t('延期许可证号')"/>
         </el-form-item>
@@ -680,7 +677,16 @@ import {
   exportJobticket,
   selectChengbaoshang
 } from "@/api/ehs/jobticket";
-import {listUnit, getUnit, delUnit, addUnit, updateUnit, exportUnit, getUserByUnit} from "@/api/invoice/unit";
+import {
+  listUnit,
+  getUnit,
+  delUnit,
+  addUnit,
+  updateUnit,
+  exportUnit,
+  getUserByUnit,
+  getAllUserUnit
+} from "@/api/invoice/unit";
 import {treeselect, getDept} from "@/api/system/dept";
 import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
@@ -885,8 +891,9 @@ export default {
     this.getDicts("TICKED_WCXZT").then(response => {
       this.wcxztOptions = response.data;
     });
-    this.getDicts("book_user_unit").then(response => {
+    getAllUserUnit({}).then(response => {
       this.userUnitOptions = response.data;
+      console.log(this.userUnitOptions)
     });
   },
   methods: {
@@ -1214,6 +1221,7 @@ export default {
       this.form.zypzt = "10"
       this.form.xpxp = "10"
       this.isxp = false
+      this.form.deptId = this.$store.state.user.deptId
     },
     /** 修改按钮操作 */
     handleUpdate(row) {

+ 4 - 1
ui/src/views/index.vue

@@ -2,11 +2,13 @@
   <homepage v-if="homeType== 1"></homepage>
   <semshome v-else-if="homeType == 2"></semshome>
   <invoice v-else-if="homeType== 3"></invoice>
+  <byxhome v-else-if="homeType== 4"></byxhome>
 <!--  <semshome v-show="homeType == 2"></semshome>-->
 </template>
 
 <script>
   import homepage from "./homepage";
+  import byxhome from "./byxhome";
   import semshome from "./sems/specanalysis/index";
   import invoice from "./invoice/bookingworkticket/index";
   import '@/common/flexible.js';
@@ -20,7 +22,8 @@
     components: {
       homepage,
       semshome,
-      invoice
+      invoice,
+      byxhome
     },
     mounted() {
       console.log(this.$store.state.user.homeType)

+ 40 - 27
ui/src/views/invoice/bookingworkticket/index.vue

@@ -60,24 +60,30 @@
           />
         </el-select>
       </el-form-item>
-<!--      <el-form-item label="联系人" prop="contact">-->
-<!--        <el-input-->
-<!--          v-model="queryParams.contact"-->
-<!--          placeholder="请输入联系人"-->
-<!--          clearable-->
-<!--          size="small"-->
-<!--          @input="handleQuery"-->
-<!--        />-->
-<!--      </el-form-item>-->
-<!--      <el-form-item label="联系方式" prop="phonenumber">-->
-<!--        <el-input-->
-<!--          v-model="queryParams.phonenumber"-->
-<!--          placeholder="请输入联系方式"-->
-<!--          clearable-->
-<!--          size="small"-->
-<!--          @input="handleQuery"-->
-<!--        />-->
-<!--      </el-form-item>-->
+      <el-form-item label="票号" prop="allNo">
+        <el-input
+          v-model="queryParams.allNo"
+          placeholder="请输入联系人"
+          clearable
+          size="small"
+          @input="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="索引" prop="tag">
+        <el-select v-model="queryParams.tag" clearable filterable @change="handleQuery" placeholder="请选择索引">
+          <el-option-group
+            v-for="group in tagOptions"
+            :key="group.tag"
+            :label="group.tag">
+            <el-option
+              v-for="item in group.children"
+              :key="item.tag"
+              :label="item.tag"
+              :value="item.tag">
+            </el-option>
+          </el-option-group>
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -214,7 +220,7 @@
       <el-table-column label="续票预约" fixed="right" align="center" width="90">
         <template slot-scope="scope">
           <el-button
-            v-if="scope.row.bookingworkticket.status== 3"
+            v-if="scope.row.bookingworkticket.status== 3 && scope.row.whgzxkzh"
             size="mini"
             type="text"
             @click="handleXp(scope.row)"
@@ -501,13 +507,18 @@
           </el-select>
         </el-form-item>
         <el-form-item label="索引" prop="tag">
-          <el-select v-model="licenseForm.tag" clearable placeholder="请选择索引">
-            <el-option
-              v-for="dict in tagOptions"
-              :key="dict.tag"
-              :label="dict.tag"
-              :value="dict.tag"
-            ></el-option>
+          <el-select v-model="licenseForm.tag" clearable filterable placeholder="请选择索引">
+            <el-option-group
+              v-for="group in tagOptions"
+              :key="group.tag"
+              :label="group.tag">
+              <el-option
+                v-for="item in group.children"
+                :key="item.tag"
+                :label="item.tag"
+                :value="item.tag">
+              </el-option>
+            </el-option-group>
           </el-select>
         </el-form-item>
       </el-form>
@@ -686,7 +697,9 @@ export default {
         status: null,
         deptId: null,
         userMg: null,
-        userUnit: null
+        userUnit: null,
+        allNo: null,
+        tag: null
       },
       //申请的参数
       approveForm: {},

+ 53 - 2
ui/src/views/invoice/tag/index.vue

@@ -10,7 +10,22 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-
+      <el-form-item :label="$t('状态')" prop="status">
+        <el-select
+          v-model="queryParams.type"
+          :placeholder="$t('状态')"
+          clearable
+          size="small"
+          style="width: 240px"
+        >
+          <el-option
+            v-for="dict in typeOptions"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -54,6 +69,16 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="索引" align="center" prop="tag" :show-overflow-tooltip="true"/>
       <el-table-column label="排序" align="center" prop="sort" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('状态')" align="center">
+        <template slot-scope="scope">
+          <el-switch
+            v-model="scope.row.type"
+            active-value="1"
+            inactive-value="0"
+            @change="handleTypeChange(scope.row)"
+          ></el-switch>
+        </template>
+      </el-table-column>
       <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
       <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -138,7 +163,7 @@
 </template>
 
 <script>
-import { listTag, getTag, delTag, addTag, updateTag, exportTag, importTemplate} from "@/api/invoice/tag";
+import { listTag, getTag, delTag, addTag, updateTag, exportTag,changeTagType, importTemplate} from "@/api/invoice/tag";
 import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
@@ -168,6 +193,16 @@ export default {
       // 部门树选项
       deptOptions: undefined,
       clientHeight:300,
+      typeOptions:[
+        {
+          value: '1',
+          label: '在用'
+        },
+        {
+          value: '0',
+          label: '停用'
+        }
+      ],
       // 是否显示弹出层
       open: false,
         // 用户导入参数
@@ -310,6 +345,22 @@ export default {
         }
       });
     },
+    // 状态修改
+    handleTypeChange(row) {
+      //1为启用,0为停用
+      let text = row.type == "1" ? this.$t('启用') : this.$t('停用');
+      this.$confirm(this.$t('确认要') + text + '"' + row.tag + this.$t('"吗?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function() {
+        return changeTagType(row.id, row.type);
+      }).then(() => {
+        this.msgSuccess(text + this.$t('成功'));
+      }).catch(function() {
+        row.type = row.type === "0" ? "1" : "0";
+      });
+    },
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;