loulijun2021
2022-08-08 ddb41cb27f0b4027bb25717319fa3bcc5b1991f3
1.平板自适应完成部分2.整体样式修改完成部分
已添加4个文件
已修改18个文件
已删除1个文件
5112 ■■■■■ 文件已修改
src/components/ImportPicker/index.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Pagination/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Navbar.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/styles/global.css 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/styles/global_back.css 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/clearTabIndex.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/global.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/global_back.js 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/jcsz/jsqd.vue 266 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/jcsz/wldw.vue 221 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/jcsz/yhqd.vue 340 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/jcsz/yhqd_back.vue 1484 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/jcsz/zzjg.vue 171 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sbgl/sbqd.vue 245 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scgl/scdd.vue 240 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/template2.vue 453 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wlgl/ckdy.vue 204 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wlgl/kwdy.vue 193 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zzmx/chda.vue 337 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zzmx/gxdy.vue 229 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zzmx/gylx.vue 295 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zzmx/jpgj.vue 210 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/ImportPicker/index.vue
@@ -14,13 +14,13 @@
        <el-step title="完成" />
      </el-steps>
      <div v-if="div1" class="mb40">
      <div v-if="div1" style="margin-left: 85px;margin-top: 35px" class="mb40">
        <h3>导入提示</h3>
        <p>1. å¯¼å…¥æ–‡ä»¶æ”¯æŒç±»åž‹ï¼š.xlsx,最大不能超10M</p>
        <p>2. è¯·å‹¿è°ƒæ•´å¯¼å…¥æ¨¡ç‰ˆä¸­å­—段的左右顺序或新增sheet页</p>
      </div>
      <div v-if="div2 && div2_state === '301'">
      <div v-if="div2 && div2_state === '301'" style="margin-left: 85px;margin-right: 85px">
        <p><span class="gth_icon">!</span>文件中有<span style="color:red">{{ error_list.length }}</span>条错误数据,请修改后重新导入</p>
        <el-table class="table" :data="error_list" :header-cell-style="{background:'#f5f5f5'}">
          <el-table-column label="序号" prop="Seq" width="50" />
@@ -29,13 +29,13 @@
          <el-table-column label="错误详情" prop="ErrorCont" min-width="300" />
        </el-table>
      </div>
      <div v-if="div2 && div2_state === '200'" style="position:relative;margin-top:100px;">
      <div v-if="div2 && div2_state === '200'" style="position:relative;margin:100px 85px;">
        <div class="progress_bar bar-color-a" />
        <div :class="{'progress_bar':true, 'bar-color-b':true,'position_div':true,'cg':cg4,}" />
        <div class="mt"><img src="@/assets/images/succ.png" class="img_position"> æ ¡éªŒæ•°æ® (成功)</div>
        <div class="mt">即将导入{{ total_num }}条数据</div>
      </div>
      <div v-if="div1" class="mb40">
      <div v-if="div1" style="margin-left:85px" class="mb40">
        <h3>上传文件</h3>
        <el-upload
          style="display: inline-block;"
@@ -51,8 +51,8 @@
        <el-button type="text" style="font-size: 14px;cursor: pointer" icon="el-icon-download" @click="clickDown(code)">下载数据模版</el-button>
        , å¹¶æŒ‰ç…§æ¨¡ç‰ˆç¼–辑导入数据
      </div>
      <p v-if="div1">{{ file_name }}</p>
      <div v-show="div1 && getDataing" class="yz">
      <p v-if="div1" style="margin:0 85px 5px">{{ file_name }}</p>
      <div v-show="div1 && getDataing" style="margin: 0 85px" class="yz">
        <ul>
          <li>
            <div class="progress_bar bar-color-a" />
@@ -364,7 +364,8 @@
        // console.log(process.env.VUE_APP_BASE_API, 8989899)
        // console.log(process.env.VUE_APP_BASE_API_FILE)
        // console.log(window.location.origin + res.data)
        window.location.href = process.env.VUE_APP_BASE_API_FILE + res.data
        // window.location.href = process.env.VUE_APP_BASE_API_FILE + res.data
        window.location.href = res.data
      })
    }
  }
src/components/Pagination/index.vue
@@ -93,8 +93,8 @@
<style scoped>
.pagination-container {
  background: #fff;
  padding: 32px 16px;
  background: #f8f8fa;
  padding: 10px 0;
}
.pagination-container.hidden {
  display: none;
@@ -128,4 +128,8 @@
  //  color: #fff;
  //}
}
.el-pagination button, .el-pagination span:not([class*=suffix]){
  font-size: 14px;
}
</style>
src/layout/components/Navbar.vue
@@ -172,6 +172,8 @@
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
  //background-color: #f8f8fa;
  .hamburger-container {
    line-height: 46px;
    height: 100%;
src/main.js
@@ -57,6 +57,9 @@
import watermark from './utils/watermark.js'
Vue.prototype.$watermark = watermark
import clearTabIndex from './utils/clearTabIndex.js' // åˆ é™¤el-tooltip tabindex
clearTabIndex.install(Vue)
new Vue({
  el: '#app',
  router,
src/styles/global.css
@@ -18,9 +18,25 @@
  display: flex;
  flex-direction: column;
  height: 100%;
  /*background-color: #eee;*/
  background-color: #eaecef;
  margin: 0;
  padding: 0 10px;
}
/*头部按钮组样式*/
.bodyTopButtonGroup{
  /*padding-left: 10px;*/
  display: flex;
  background-color: #f8f8fa;
  margin-top: 10px;
  padding: 5px 10px;
  border-bottom: 3px solid #eee;
}
/*头部表单组样式*/
.bodyTopFormGroup{
  background-color: #f8f8fa;
  padding: 10px;
}
.elForm {
@@ -33,10 +49,28 @@
.elTableDiv {
  display: flex;
  border: 1px solid #eee;
  width: 99%;
  margin: 0 auto;
  /*width: 99%;*/
  width: 100%;
  margin: 10px auto;
  /*margin-top: 20px;*/
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/*对话框按钮底部*/
.footerButton {
  display: flex;
  justify-content: end;
}
/*
定义滚动条高宽及背景
高宽分别对应横竖滚动条的尺寸
src/styles/global_back.css
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,73 @@
/*全局样式表*/
html, body, #app {
  height: 100%;
  margin: 0;
  padding: 0;
  /*min-width: 1800px;*/
  /*overflow-y: hidden;*/
  /*overflow-x: hidden;*/
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}
.body {
  display: flex;
  flex-direction: column;
  height: 100%;
  /*background-color: #eee;*/
  margin: 0;
  padding: 0 10px;
}
.elForm {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  flex-wrap: wrap;
}
.elTableDiv {
  display: flex;
  border: 1px solid #eee;
  width: 99%;
  margin: 0 auto;
}
/*
定义滚动条高宽及背景
高宽分别对应横竖滚动条的尺寸
*/
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
  background-color: white;
}
::-webkit-scrollbar-thumb {
  box-shadow: inset 0 0 0px white;
  -webkit-box-shadow: inset 0 0 0px white;
  background-color: rgb(193, 193, 193);
  /*滚动条的背景颜色*/
  border-radius: 20px;
}
/*解决表格固定列时的压样式问题*/
.el-table__fixed {
  height: calc(100% - 7px) !important;
}
.el-table__fixed-right {
  height: calc(100% - 12px) !important;
}
.el-table__fixed-right::before,
.el-table__fixed::before {
  background-color: unset !important;
}
/*scrollbar END*/
src/utils/clearTabIndex.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
const vueClearIndex = {}
/*
* è§£å†³tooltips,在弹框之后再次出现的问题,原因是由于tabindex导致
*/
vueClearIndex.install = Vue => {
  Vue.directive('delTabIndex', {
    bind(el, binding) { // el为绑定的元素,binding为绑定给指令的对象
      el.__vueSetTimeoutIndex__ = setTimeout(() => {
        // æ¸…除当前tabIndex
        el.removeAttribute('tabindex')
        clearTimeout(el.__vueSetTimeoutIndex__)
      }, 0)
    },
    unbind(el) {
      clearTimeout(el.__vueSetTimeoutIndex__)
    }
  })
}
export default vueClearIndex
src/utils/global.js
@@ -8,7 +8,8 @@
// å¤„理表头单元格样式
export function headerCellStyle() {
  const option = {
    background: '#eee', padding: '0'
    // background: '#eee', padding: '0'
    background: '#f8f8fa', padding: '0', color: '#a7a7a7'
  }
  return option
}
@@ -16,7 +17,9 @@
// å¤„理表格单元格样式
export function cellStyle() {
  const option = {
    // padding: '5px 0'
    padding: '5px 0'
  }
  return option
}
src/utils/global_back.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,58 @@
import { NewEncodingRules } from '@/api/xtsz'
// å…¨å±€ä¸»è¦é¢œè‰²
export function getGlobalColor() {
  return { globalColor: `#42b983` }
}
// å¤„理表头单元格样式
export function headerCellStyle() {
  const option = {
    background: '#eee', padding: '0'
  }
  return option
}
// å¤„理表格单元格样式
export function cellStyle() {
  const option = {
    padding: '5px 0'
  }
  return option
}
// æ—¶é—´å¤„理函数
export function handleDatetime(value) {
  const data = new Date(value)
  const month = data.getMonth() < 9 ? '0' + (data.getMonth() + 1) : data.getMonth() + 1
  const date = data.getDate() <= 9 ? '0' + data.getDate() : data.getDate()
  return data.getFullYear() + '-' + month + '-' + date
}
// èŽ·å–è§„åˆ™ç”Ÿæˆçš„ç¼–ç 
export async function getNewEncodingRules(encode) {
  const res = await NewEncodingRules({ rightcode: encode })
  if (res.code === '200') {
    return { RightCode: res.data[0], numvalue: res.data[1] }
  }
}
// é€’归清除数组每个元素下的children为空的数组
const clearAllChildren = (items, childrenName = 'children') => {
  for (let i = 0; i < items.length; i++) {
    const item = items[i]
    // å½“前对象存在children
    if (item && item[childrenName]) {
      // children为空数组时删除
      if (item[childrenName].length === 0) {
        delete item[childrenName]
      } else {
        // é€’归当前children数组
        clearAllChildren(item[childrenName], childrenName)
      }
    }
  }
  return items
}
export default clearAllChildren
src/views/jcsz/jsqd.vue
@@ -1,7 +1,14 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
      <div class="bodyTopButtonGroup">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button icon="el-icon-setting" @click="settingButton">设置</el-button>
        <el-button icon="el-icon-download" @click="upload">导入</el-button>
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
@@ -43,18 +50,12 @@
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button type="primary" icon="el-icon-setting" @click="settingButton">设置</el-button>
        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          border
          stripe
          :row-class-name="tableRowClassName"
          :height="tableHeight+'px'"
          :style="{width: 100+'%',height: tableHeight+'px'}"
          highlight-current-row
@@ -121,8 +122,8 @@
            sortable="custom"
          >
            <template slot-scope="{row}">
              <i v-if="row.is_user==='Y'" class="el-icon-user-solid" @click="userClick(row)" />
              <i v-if="row.is_user==='N'" class="el-icon-user-solid" style="color: rgb(180 ,181, 185)" @click="userClick(row)" />
              <i v-if="row.is_user==='Y'" class="el-icon-user-solid" style="color:#42b983;cursor: pointer" @click="userClick(row)" />
              <i v-if="row.is_user==='N'" class="el-icon-user-solid" style="color: rgb(180 ,181, 185);cursor: pointer" @click="userClick(row)" />
            </template>
          </el-table-column>
          <el-table-column
@@ -143,8 +144,12 @@
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">编辑</el-button>
                <el-button type="text" @click="del(row)">删除</el-button>
                <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                  <i class="el-icon-edit-outline" @click="edit('edit',row)" />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" @click="del(row)" />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
@@ -157,7 +162,7 @@
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="prev, pager, next,sizes"
        layout="total ,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getRoleSearch"
      />
@@ -222,12 +227,14 @@
        <!--        <el-button type="primary" icon="el-icon-delete" @click="delSetting">删除</el-button>-->
      </div>
      <el-table
        ref="RoleTypeCodeArr"
        :data="RoleTypeCodeArr"
        border
        height="300"
        highlight-current-row
        :header-cell-style="this.$headerCellStyle"
        :cell-style="this.$cellStyle"
        :row-class-name="tableRowClassName"
        @sort-change="sortChangeOfSetting"
      >
        <!--        :style="{width: 100+'%',height:tableHeight-300+'px'}"-->
@@ -278,7 +285,8 @@
        :page.sync="formSetting.page"
        :limit.sync="formSetting.rows"
        align="right"
        layout="prev, pager, next,sizes"
        style="margin-top: 10px"
        layout="total ,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getRoleTypeSearch"
      />
@@ -308,7 +316,7 @@
      <div style="margin-bottom: 10px">
        <i class="el-icon-s-operation" style="color:#42b983;" /> ç”¨æˆ·åˆ—表
      </div>
      <div style="display: flex;min-height: 50px">
      <div style="display: flex;min-height: 50px;margin-bottom: 10px">
        <el-form ref="dialogFormUser" inline :model="dialogFormUser" label-width="80px">
          <el-form-item label="用户编码">
            <el-input
@@ -374,10 +382,11 @@
        :data="dialogFormUserTable"
        border
        highlight-current-row
        height="370"
        :height="isIpad?400:365"
        :header-cell-style="this.$headerCellStyle"
        :cell-style="this.$cellStyle"
        :row-key="getRowKey"
        :row-class-name="tableRowClassName"
        @sort-change="sortChangeOfUser"
        @selection-change="handleSelectionChange"
      >
@@ -427,7 +436,8 @@
        :page.sync="dialogFormUser.page"
        :limit.sync="dialogFormUser.rows"
        align="right"
        layout="prev, pager, next,sizes"
        style="margin-top: 10px"
        layout="total ,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getRoleAssociationUser"
      />
@@ -483,7 +493,7 @@
      <div style="margin-bottom: 10px">
        <i class="el-icon-s-operation" style="color:#42b983;" /> åŠŸèƒ½æƒé™
      </div>
      <div style="height: 400px;overflow-y: scroll">
      <div style="height: 393px;overflow-y: scroll">
        <el-tree
          v-if="dialogFormRight.rightCurrentCode==='PC'"
          ref="rightPCRef"
@@ -518,7 +528,7 @@
    </el-dialog>
    <!--导入组件-->
    <import-picker ref="importPickerFunc" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
    <import-picker ref="importPickerFunc" class="importPickerClass" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
  </div>
</template>
@@ -705,6 +715,9 @@
    settingButton() {
      this.settingDialogVisible = true
      this.getRoleTypeSearch()
      this.$nextTick(() => {
        this.$refs.RoleTypeCodeArr.doLayout()
      })
    },
    // èŽ·å–æ‰€å±žç»„ç»‡
    async getUserOrganization() {
@@ -825,14 +838,16 @@
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 50
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 200
        if (window.innerHeight < 769) {
          this.tableHeight = this.tableHeight - 50
          this.tableHeight = this.tableHeight - 40
        }
        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
      })
    },
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    },
    /* è®¾ç½®æ¨¡å—*/
    // è®¾ç½®å¯¹è¯æ¡†å…³é—­äº‹ä»¶
@@ -908,6 +923,9 @@
      this.userForm.roleName = row.role_name
      this.dialogFormUser.rolecode = row.role_code
      this.getRoleAssociationUser()
      this.$nextTick(() => {
        this.$refs.multipleTable.doLayout()
      })
    },
    // èŽ·å–è§’è‰²æ¸…å•å…³è”ç”¨æˆ·
    async getRoleAssociationUser() {
@@ -1114,9 +1132,11 @@
        }
      }
      // ç›®å‰ä¸€æœŸè‚¯å®šæ˜¯è¿™ä¸ª
      if (this.PCTrue && !this.APPTrue) {
        pcIsSelected1 = true
        if (rightPCArrFlag === 'Y') {
          pcIsSelected1 = true
          // pcIsSelected1 = true
          pcIsSelected2 = true
          const interval = setInterval(() => {
@@ -1131,8 +1151,9 @@
            }
          }, 100)
          this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
          // this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
        }
        this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
      }
      if (!this.PCTrue && this.APPTrue) {
@@ -1472,58 +1493,10 @@
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
}
::v-deep .el-button--primary:hover {
  border: none;
}
::v-deep .el-button--info {
  //background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
.settingDialogVisible, .userDialogVisible, .dialogVisibleRight {
  ::v-deep .el-dialog__body {
    padding: 10px 20px !important;
@@ -1590,86 +1563,82 @@
  }
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
</style>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline{
  margin-right: 15px;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
::v-deep .el-button--primary, .el-button--default, .el-button--info {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
::v-deep .el-button--primary {
  //background-color: $main_color !important;
}
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
::v-deep .el-table .caret-wrapper {
  //float: right;
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  justify-content: space-between;
}
.el-icon-share, .el-icon-user-solid {
  color: $main_color;
  cursor: pointer;
::v-deep .el-table::before {
  height: 0;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
::v-deep .el-table__body .el-table__row.hover-row td{
  background-color: #eaecef ;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
@@ -1681,45 +1650,14 @@
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select-dropdown__item.selected {
  color: $main_color;
}
::v-deep .el-textarea__inner:focus {
  border-color: $main_color;
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
</style>
<style lang="scss">
.elCascader {
  //.el-cascader-node.in-active-path, .el-cascader-node.is-active, .el-cascader-node.is-selectable.in-checked-path {
  //  color: #42b983 ;
  //}
  .el-cascader-node.is-selectable.in-checked-path {
    color: #42b983;
  }
<style>
  .el-radio__input.is-checked .el-radio__inner {
    background-color: #42b983;
    border-color: #42b983;
  }
  .el-radio__input.is-checked .el-radio__inner:hover {
    border-color: #42b983;
  }
  .el-input__inner {
    border-color: #42b983 !important;
  }
.el-table .custom-row {
  background: #f8f8fa;
}
</style>
src/views/jcsz/wldw.vue
@@ -1,7 +1,18 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
      <div class="bodyTopButtonGroup">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button
          icon="el-icon-refresh-right"
          @click="syncSeaveSearchPartner"
        >同步往来单位
        </el-button>
        <el-button icon="el-icon-download" @click="upload">导入</el-button>
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
@@ -42,24 +53,13 @@
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button
          type="primary"
          icon="el-icon-refresh-right"
          @click="syncSeaveSearchPartner"
        >同步往来单位
        </el-button>
        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          border
          :height="tableHeight+'px'"
          stripe
          :row-class-name="tableRowClassName"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
@@ -159,8 +159,12 @@
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">编辑</el-button>
                <el-button type="text" @click="del(row)">删除</el-button>
                <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                  <i class="el-icon-edit-outline" @click="edit('edit',row)" />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" @click="del(row)" />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
@@ -221,7 +225,7 @@
    </el-dialog>
    <!--导入组件-->
    <import-picker ref="importPickerFunc" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
    <import-picker ref="importPickerFunc" class="importPickerClass" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
  </div>
</template>
@@ -522,13 +526,18 @@
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 50
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 200
        if (window.innerHeight < 769) {
          this.tableHeight = this.tableHeight - 50
          this.tableHeight = this.tableHeight - 40
        }
      })
    },
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    },
    // å¯¼å…¥æŒ‰é’®
    upload() {
      this.shows = true
@@ -541,36 +550,49 @@
}
</script>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline{
  margin-right: 15px;
}
::v-deep .el-button--primary, .el-button--default, .el-button--info {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
}
::v-deep .el-button--primary:hover {
  border: none;
}
::v-deep .el-button--info {
  //background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
::v-deep .el-input__inner {
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
@@ -578,104 +600,30 @@
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
}
::v-deep .el-table .caret-wrapper {
  //float: right;
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  justify-content: space-between;
}
.el-icon-share {
  color: $main_color;
  cursor: pointer;
::v-deep .el-table::before {
  height: 0;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
::v-deep .el-table__body .el-table__row.hover-row td{
  background-color: #eaecef ;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
@@ -687,25 +635,14 @@
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-select .el-input__inner:focus {
  border-color: $main_color;
}
</style>
<style>
::v-deep .el-select-dropdown__item.selected {
  color: $main_color;
.el-table .custom-row {
  background: #f8f8fa;
}
::v-deep .el-checkbox__inner:hover {
  border-color: $main_color;
}
::v-deep .el-textarea__inner:focus {
  border-color: $main_color;
}
</style>
src/views/jcsz/yhqd.vue
@@ -1,7 +1,13 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
      <div class="bodyTopButtonGroup">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button icon="el-icon-menu" @click="workingTramClick">生产班组</el-button>
        <el-button icon="el-icon-download" @click="upload">导入</el-button>
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
@@ -61,29 +67,23 @@
              </el-select>
            </el-form-item>
          </div>
          <div style="display: flex;align-items: start;margin-top: 5px;">
          <div style="display: flex;align-items: flex-start;margin-top: 3px">
            <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
            <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button type="primary" icon="el-icon-menu" @click="workingTramClick">生产班组</el-button>
        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          border
          stripe
          :height="tableHeight+'px'"
          highlight-current-row
          :style="{width: 100+'%',height:tableHeight+'px'}"
          :header-cell-style="this.$headerCellStyle"
          :row-class-name="tableRowClassName"
          :cell-style="this.$cellStyle"
          border
          @sort-change="sortChange"
        >
          <!--          <el-table-column-->
@@ -166,8 +166,14 @@
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.enable==='Y'"><svg-icon icon-class="circleYes" style="margin-right: 2px" />在职</div>
              <div v-if="row.enable==='N'"><svg-icon icon-class="circleNo" style="margin-right: 2px" />离职</div>
              <div v-if="row.enable==='Y'">
                <svg-icon icon-class="circleYes" style="margin-right: 2px" />
                åœ¨èŒ
              </div>
              <div v-if="row.enable==='N'">
                <svg-icon icon-class="circleNo" style="margin-right: 2px" />
                ç¦»èŒ
              </div>
            </template>
          </el-table-column>
          <el-table-column
@@ -189,7 +195,12 @@
          >
            <template slot-scope="{row}">
              <i v-if="row.is_role==='Y'" class="el-icon-share" @click="roleClick({row})" />
              <i v-if="row.is_role==='N'" class="el-icon-share" style="color: rgb(180 ,181, 185)" @click="roleClick({row})" />
              <i
                v-if="row.is_role==='N'"
                class="el-icon-share"
                style="color: rgb(180 ,181, 185)"
                @click="roleClick({row})"
              />
            </template>
          </el-table-column>
          <el-table-column
@@ -199,8 +210,12 @@
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">编辑</el-button>
                <el-button type="text" @click="del(row.id)">删除</el-button>
                <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                  <i class="el-icon-edit-outline" @click="edit('edit',row)" />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" @click="del(row.id)" />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
@@ -213,7 +228,7 @@
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="prev, pager, next,sizes"
        layout="total ,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getUserSearch"
      />
@@ -393,17 +408,24 @@
      class="workingDialogVisible"
      @close="handleCloseWorking"
    >
      <!--      <div style="margin-bottom: 10px; padding: 10px 0; background-color: #f8f8fa; display: flex">-->
      <!--        <el-button style="margin-left: 10px;" type="primary" icon="el-icon-circle-plus-outline" @click="addWorking">新增</el-button>-->
      <!--        &lt;!&ndash;        <el-button type="primary" icon="el-icon-delete" @click="delSetting">删除</el-button>&ndash;&gt;-->
      <!--      </div>-->
      <div style="margin-bottom: 20px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="addWorking">新增</el-button>
        <!--        <el-button type="primary" icon="el-icon-delete" @click="delSetting">删除</el-button>-->
      </div>
      <el-table
        ref="workingTableData"
        :data="workingTableData"
        border
        height="300"
        height="377"
        highlight-current-row
        :header-cell-style="this.$headerCellStyle"
        :cell-style="this.$cellStyle"
        :row-class-name="tableRowClassName"
        @sort-change="sortChangeOfWorking"
      >
        <!--        :style="{width: 100+'%',height:tableHeight-300+'px'}"-->
@@ -464,7 +486,8 @@
        :page.sync="formWorking.page"
        :limit.sync="formWorking.rows"
        align="right"
        layout="prev, pager, next,sizes"
        style="margin-top: 10px"
        layout="total,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getUserGroupSearch"
      />
@@ -477,7 +500,7 @@
    </el-dialog>
    <!--导入组件-->
    <import-picker ref="importPickerFunc" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
    <import-picker ref="importPickerFunc" class="importPickerClass" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
  </div>
</template>
@@ -847,10 +870,11 @@
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 50
        // this.mainHeight = window.innerHeight - 250
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 200
        if (window.innerHeight < 769) {
          this.tableHeight = this.tableHeight - 50
          this.tableHeight = this.tableHeight - 40
        }
        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
      })
@@ -1145,6 +1169,10 @@
    workingTramClick() {
      this.workingDialogVisible = true
      this.getUserGroupSearch()
      // é¡µé¢åŠ è½½å®ŒåŽé‡æ–°æ¸²æŸ“è¡¨æ ¼
      this.$nextTick(() => {
        this.$refs.workingTableData.doLayout()
      })
    },
    // ç”Ÿäº§ç­ç»„对话框关闭事件
    handleCloseWorking() {
@@ -1234,145 +1262,23 @@
    // ç”Ÿäº§ç­ç»„返回按钮
    WorkingDialogVisibleCancel() {
      this.workingDialogVisible = false
    },
    tableRowClassName({ row, rowIndex }) {
      // console.log(row, rowIndex, 12)
      // if (rowIndex === 1) {
      //   return 'warning-row'
      // } else if (rowIndex === 3) {
      //   return 'success-row'
      // }
      return 'custom-row'
    }
  }
}
</script>
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
}
::v-deep .el-button--primary:hover {
  border: none;
}
::v-deep .el-button--info {
  //background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
.workingDialogVisible ::v-deep .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.el-icon-share {
  color: $main_color;
  cursor: pointer;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
}
.dialogVisibleRoles {
  .myCheckboxGroup {
@@ -1428,6 +1334,87 @@
  }
}
.workingDialogVisible ::v-deep .el-dialog__body {
  padding: 20px 20px !important;
}
</style>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline{
  margin-right: 15px;
}
::v-deep .el-button--primary, .el-button--default, .el-button--info {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
::v-deep .el-button--primary {
  //background-color: $main_color !important;
}
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-input__inner {
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
::v-deep .el-table::before {
  height: 0;
}
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-table__body .el-table__row.hover-row td{
  background-color: #eaecef ;
}
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
@@ -1438,47 +1425,10 @@
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select-dropdown__item.selected {
  color: $main_color;
}
::v-deep .el-input__inner:focus {
  border-color: #42b983 !important;
}
//::v-deep   .el-cascader:not(.is-disabled):hover .el-input__inner:focus {
//  border-color: #42b983 !important;
//}
</style>
<style lang="scss">
.elCascader {
  //.el-cascader-node.in-active-path, .el-cascader-node.is-active, .el-cascader-node.is-selectable.in-checked-path {
  //  color: #42b983 ;
  //}
  .el-cascader-node.is-selectable.in-checked-path {
    color: #42b983;
  }
<style>
  .el-radio__input.is-checked .el-radio__inner {
    background-color: #42b983;
    border-color: #42b983;
  }
  .el-radio__input.is-checked .el-radio__inner:hover {
    border-color: #42b983;
  }
  .el-input__inner {
    border-color: #42b983 !important;
  }
.el-table .custom-row {
  background: #f8f8fa;
}
</style>
src/views/jcsz/yhqd_back.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1484 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
        <el-form
          ref="form"
          :model="form"
          label-width="80px"
          inline
          style="display: flex;justify-content: space-between"
        >
          <div class="elForm">
            <el-form-item label="用户编码" style=" display: flex;">
              <el-input v-model="form.UserCode" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="用户名称" style=" display: flex;">
              <el-input v-model="form.UserName" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="所属组织" style=" display: flex;">
              <el-cascader
                ref="cascader"
                filterable
                popper-class="elCascader"
                :options="StuOrgArr"
                :props="defaultProps"
                @change="cascaderChange"
              />
              <!--              @focus="getUserOrganization"-->
            </el-form-item>
            <el-form-item label="工资类型" style=" display: flex;">
              <el-select
                v-model="form.wagetype"
                :popper-append-to-body="false"
                filterable
                style="width: 200px"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in wagetypeArr"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="在职状态" style=" display: flex;">
              <el-select
                v-model="form.Enable"
                :popper-append-to-body="false"
                filterable
                style="width: 200px"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in EnableArr"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>
          </div>
          <div style="display: flex;align-items: start;margin-top: 5px;">
            <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
            <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button type="primary" icon="el-icon-menu" @click="workingTramClick">生产班组</el-button>
        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          border
          stripe
          :height="tableHeight+'px'"
          highlight-current-row
          :style="{width: 100+'%',height:tableHeight+'px'}"
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
          @sort-change="sortChange"
        >
          <!--          <el-table-column-->
          <!--            type="selection"-->
          <!--            width="50"-->
          <!--          />-->
          <el-table-column
            prop="RowNum"
            width="50"
            label="序号"
            fixed
          />
          <el-table-column
            prop="usercode"
            label="用户编码"
            min-width="110"
            sortable="custom"
          />
          <el-table-column
            prop="username"
            label="用户名称"
            min-width="110"
            sortable="custom"
          />
          <el-table-column
            prop="password"
            label="用户密码"
            min-width="110"
            sortable="custom"
          />
          <el-table-column
            prop="org_name"
            label="所属组织"
            min-width="110"
            sortable="custom"
          />
          <el-table-column
            prop="group_name"
            label="生产班组"
            min-width="110"
            sortable="custom"
          />
          <el-table-column
            prop="wagetype"
            label="工资类型"
            sortable="custom"
            width="110"
          >
            <template slot-scope="{row}">
              <div v-if="row.wagetype==='1'">计时制</div>
              <div v-if="row.wagetype==='2'">计件制</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="mobile"
            label="联系方式"
            min-width="110"
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.mobile===''">/</div>
              <div v-else>{{ row.mobile }}</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="email"
            label="电子邮箱"
            sortable="custom"
            min-width="110"
          >
            <template slot-scope="{row}">
              <div v-if="row.email===''">/</div>
              <div v-else>{{ row.email }}</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="enable"
            label="在职状态"
            width="110"
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.enable==='Y'"><svg-icon icon-class="circleYes" style="margin-right: 2px" />在职</div>
              <div v-if="row.enable==='N'"><svg-icon icon-class="circleNo" style="margin-right: 2px" />离职</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="lm_user"
            label="创建人员"
            width="110"
            sortable="custom"
          />
          <el-table-column
            prop="lm_date"
            label="创建时间"
            width="160"
            sortable="custom"
          />
          <el-table-column
            prop="is_role"
            label="关联角色"
            width="110"
          >
            <template slot-scope="{row}">
              <i v-if="row.is_role==='Y'" class="el-icon-share" @click="roleClick({row})" />
              <i v-if="row.is_role==='N'" class="el-icon-share" style="color: rgb(180 ,181, 185)" @click="roleClick({row})" />
            </template>
          </el-table-column>
          <el-table-column
            label="操作"
            fixed="right"
            width="120"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">编辑</el-button>
                <el-button type="text" @click="del(row.id)">删除</el-button>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <!--分页-->
      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getUserSearch"
      />
    </div>
    <!--    ç”¨æˆ·æ¸…单新增、编辑-->
    <el-dialog
      :title="operation==='add'?'新增':'编辑'"
      :visible.sync="dialogVisible"
      width="800px"
      :close-on-click-modal="false"
      top="15vh"
      @closed="handleClose"
      @close="handleClose"
    >
      <el-form ref="dialogForm" :rules="dialogFormRules" inline :model="dialogForm" label-width="80px">
        <el-form-item label="用户编码" prop="UserCode">
          <el-input v-model="dialogForm.UserCode" :disabled="operation!=='add'" style="width: 200px" />
        </el-form-item>
        <el-form-item label="用户名称" prop="UserName">
          <el-input v-model="dialogForm.UserName" style="width: 200px" />
        </el-form-item>
        <el-form-item label="用户密码" prop="Password">
          <el-input v-model="dialogForm.Password" style="width: 200px" />
        </el-form-item>
        <el-form-item label="在职状态" prop="Enable">
          <el-select
            v-model="dialogForm.Enable"
            :popper-append-to-body="false"
            filterable
            style="width: 200px"
            placeholder="请选择"
          >
            <el-option
              v-for="item in EnableArr"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="所属组织" prop="StuOrg" style="display: flex;float: left">
          <el-cascader
            ref="dialogCascader"
            key="cascaderKey"
            filterable
            popper-class="elCascader"
            :options="StuOrgArr2"
            :props="defaultProps"
            style="width: 200px;"
            @change="dialogCascaderChange"
          />
        </el-form-item>
        <el-form-item label="所属班组" prop="groupcode">
          <el-select
            v-model="dialogForm.groupcode"
            :popper-append-to-body="false"
            filterable
            style="width: 200px"
            placeholder="请选择"
          >
            <el-option
              v-for="item in usergroupArr"
              :key="item.group_code"
              :label="item.group_name"
              :value="item.group_code"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="工资类型" prop="wagetype">
          <el-select
            v-model="dialogForm.wagetype"
            :popper-append-to-body="false"
            filterable
            style="width: 200px"
            placeholder="请选择"
          >
            <el-option
              v-for="item in wagetypeArr"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="联系方式" prop="Mobile">
          <el-input v-model="dialogForm.Mobile" style="width: 200px" />
        </el-form-item>
        <el-form-item label="电子邮箱" prop="Email">
          <el-input v-model="dialogForm.Email" style="width: 200px" />
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button @click="dialogVisibleCancel">取 æ¶ˆ</el-button>
          <el-button type="primary" @click="dialogVisibleConfirm">ç¡® å®š</el-button>
        </div>
      </span>
    </el-dialog>
    <!--    å…³è”角色-->
    <el-dialog
      title="关联角色"
      :visible.sync="dialogVisibleRoles"
      width="800px"
      :top="isIpad?'3vh':'15vh'"
      :fullscreen="isIpad"
      :close-on-click-modal="false"
      class="dialogVisibleRoles"
      @closed="handleCloseRoles"
      @close="handleCloseRoles"
    >
      <!--      @opened="handleOpenedRoles"-->
      <div>
        <i class="el-icon-s-comment" style="color:#42b983;" /> ç”¨æˆ·åç§°ï¼š{{ dialogFormRoles.username }}
      </div>
      <el-divider />
      <div>
        <div style="margin-bottom:20px">
          <i class="el-icon-s-operation" style="color:#42b983;" /> è§’色类型集合:
        </div>
        <div class="myCheckboxGroup">
          <div
            v-for="item in dialogFormRoles.rolesArr"
            :key="item.code"
            :style="{border:item.isSelected1?'1px solid #42b983':'1px solid #eee'}"
            class="myCheckbox"
            @click="myCheckboxClick(item)"
          >
            <input
              class="myCheckboxInput"
              type="checkbox"
              :value="item.code"
              :name="item.name"
              :style="{color:item.isSelected2?'#42b983':'#fff'}"
              @click="myCheckboxInputClick(item)"
            >{{ item.name }}
            <!--            çˆ¶å­ç‚¹å‡»äº‹ä»¶ä¸å½±å“-->
            <!--            onClick="event.cancelBubble = true"-->
          </div>
        </div>
      </div>
      <el-divider />
      <div>
        <div style="margin-bottom:20px">
          <i class="el-icon-s-operation" style="color:#42b983;" /> è§’色:
        </div>
        <el-tree
          ref="roleTree"
          :data="dialogFormRoles.roleTree"
          show-checkbox
          node-key="code"
          default-expand-all
          style="height: 300px"
          :props="defaultPropsOfRoleTree"
          @check="checkBoxClick"
        />
        <!--        @check-change="checkChange"-->
      </div>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button @click="rolesDialogVisibleCancel">取 æ¶ˆ</el-button>
          <el-button type="primary" @click="rolesDialogVisibleConfirm">ç¡® å®š</el-button>
        </div>
      </span>
    </el-dialog>
    <!--    äº§ç»„按钮对话框-->
    <el-dialog
      title="生产班组"
      :visible.sync="workingDialogVisible"
      width="800px"
      top="15vh"
      :close-on-click-modal="false"
      class="workingDialogVisible"
      @close="handleCloseWorking"
    >
      <div style="margin-bottom: 20px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="addWorking">新增</el-button>
        <!--        <el-button type="primary" icon="el-icon-delete" @click="delSetting">删除</el-button>-->
      </div>
      <el-table
        :data="workingTableData"
        border
        height="300"
        highlight-current-row
        :header-cell-style="this.$headerCellStyle"
        :cell-style="this.$cellStyle"
        @sort-change="sortChangeOfWorking"
      >
        <!--        :style="{width: 100+'%',height:tableHeight-300+'px'}"-->
        <!--        <el-table-column-->
        <!--          type="selection"-->
        <!--          width="50"-->
        <!--        />-->
        <el-table-column
          width="50"
          label="序号"
          prop="RowNum"
        />
        <el-table-column
          prop="group_code"
          label="班组编码"
          sortable="custom"
        >
          <template slot-scope="{row}">
            <el-input v-if="row.isVisible===1" v-model="row.group_code" placeholder="请输入" />
            <div v-else> {{ row.group_code }}</div>
          </template>
        </el-table-column>
        <el-table-column
          prop="group_name"
          label="班组名称"
          sortable="custom"
        >
          <template slot-scope="{row}">
            <el-input v-if="row.isVisible===1" v-model="row.group_name" placeholder="请输入" />
            <div v-else> {{ row.group_name }}</div>
          </template>
        </el-table-column>
        <el-table-column
          prop="description"
          label="班组描述"
          sortable="custom"
        >
          <template slot-scope="{row}">
            <el-input v-if="row.isVisible===1" v-model="row.description" placeholder="请输入" />
            <div v-else> {{ row.description }}</div>
          </template>
        </el-table-column>
        <el-table-column label="操作">
          <template slot-scope="{row}">
            <div class="operationClass">
              <el-button v-if="row.isVisible===0" type="text" @click="delWorking(row)">删除</el-button>
              <el-button v-if="row.isVisible===1" type="text" @click="saveWorking(row)">保存</el-button>
              <el-button v-if="row.isVisible===1" type="text" @click="cancelWorking(row)">取消</el-button>
            </div>
          </template>
        </el-table-column>
      </el-table>
      <!--分页-->
      <pagination
        v-show="workingTableDataLength>0"
        :total="workingTableDataLength"
        :page.sync="formWorking.page"
        :limit.sync="formWorking.rows"
        align="right"
        layout="prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getUserGroupSearch"
      />
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button @click="WorkingDialogVisibleCancel">返回</el-button>
          <!--          <el-button type="primary" @click="settingDialogVisibleConfirm">ç¡® å®š</el-button>-->
        </div>
      </span>
    </el-dialog>
    <!--导入组件-->
    <import-picker ref="importPickerFunc" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
  </div>
</template>
<script>
import Pagination from '@/components/Pagination'
import ImportPicker from '@/components/ImportPicker'
import {
  AddUpdateUser,
  DeleteUser,
  SaveUserAssoctRole,
  UserAssociationRole,
  UserGroupAdd,
  UserGroupDelete,
  UserGroupSearch,
  UserOrganization,
  UserSearch
} from '@/api/jcsz'
import { getCookie } from '@/utils/auth'
import $ from 'jquery'
import clearAllChildren from '@/utils/global'
import { MesOrderStepReportSelectUserGroup } from '@/api/scgl'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
  name: 'YYQD',
  components: {
    Pagination, ImportPicker
  },
  data() {
    const validateName = (rule, value, callback) => {
      if (!value) {
        return callback(new Error('请输入编码'))
      } else {
        if (SER_HZ.test(value)) {
          return callback(new Error('编码不能为中文'))
        } else {
          callback()
        }
      }
    }
    const validateMobile = (rule, value, callback) => {
      if (!value) {
        callback()
        // return callback(new Error('请输入电话号码'))
      } else {
        const mobile = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ // é•¿å·
        const mobile2 = /^[0-9]{6}$/ // çŸ­å·
        if (mobile.test(value) || mobile2.test(value)) {
          callback()
          // return callback(new Error('电话号码不符合规则'))
        } else {
          return callback(new Error('电话号码不符合规则'))
          // callback()
        }
      }
    }
    const validateEmail = (rule, value, callback) => {
      if (!value) {
        callback()
        // return callback(new Error('请输入电子邮箱'))
      } else {
        const email = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+$/
        if (email.test(value)) {
          callback()
        } else {
          return callback(new Error('电子邮箱不符合规则'))
        }
      }
    }
    return {
      isIpad: false,
      mainHeight: 0,
      tableHeight: 0,
      form: {
        UserCode: '', // ç”¨æˆ·ç¼–码
        UserName: '', // ç”¨æˆ·åç§°
        StuOrg: '', // æ‰€å±žç»„织
        wagetype: '', // å·¥èµ„类型
        Enable: '', // åœ¨èŒçŠ¶æ€
        prop: 'lm_date', // æŽ’序字段
        order: 'desc', // æŽ’序字段
        page: 1, // ç¬¬å‡ é¡µ
        rows: 20 // æ¯é¡µå¤šå°‘条
      },
      StuOrgArr: [], // æ‰€å±žç»„织数组
      StuOrgArr2: [], // æ‰€å±žç»„织数组  å¯¹è¯æ¡†
      defaultProps: {
        checkStrictly: true,
        value: 'code',
        label: 'name',
        children: 'children'
      },
      EnableArr: [
        { value: 'Y', label: '在职' },
        { value: 'N', label: '离职' }
      ], // åœ¨èŒçŠ¶æ€
      total: 10,
      tableData: [],
      dialogVisible: false,
      dialogForm: {
        id: '',
        UserCode: '',
        UserName: '',
        Password: '',
        Enable: 'Y',
        StuOrg: '',
        Mobile: '',
        Email: '',
        groupcode: '',
        Operator: '',
        OperType: '',
        wagetype: ''
      },
      usergroupArr: [], // ç”Ÿäº§ç­ç»„数组
      wagetypeArr: [
        { value: '2', label: '计件制' },
        { value: '1', label: '计时制' }
      ],
      operation: '',
      dialogFormRules: {
        UserCode: [
          { required: true, validator: validateName, trigger: ['blur', 'change'] }
        ],
        UserName: [
          { required: true, message: '请输入用户名称', trigger: ['blur', 'change'] }
        ],
        Password: [
          { required: true, message: '请输入用户密码', trigger: ['blur', 'change'] }
        ],
        Enable: [
          { required: true, message: '请选择在职状态', trigger: ['blur', 'change'] }
        ],
        StuOrg: [
          { required: true, message: '请选择所属组织', trigger: ['blur', 'change'] }
        ],
        wagetype: [
          { required: true, message: '请选择工资类型', trigger: ['blur', 'change'] }
        ],
        groupcode: [
          { required: true, message: '请选择所属班组', trigger: ['blur', 'change'] }
        ],
        Mobile: [
          { required: false, validator: validateMobile, trigger: ['blur', 'change'] }
        ],
        Email: [
          { required: false, validator: validateEmail, trigger: ['blur', 'change'] }
        ]
      },
      dialogVisibleRoles: false,
      dialogFormRoles: {
        username: '', // ç”¨æˆ·åç§°
        usercode: '', // ç”¨æˆ·ç¼–码
        rolesArr: [], // è§’色类型集合
        rolesArrSelectedArr: [], // è§’色类型集合选中
        roleTree: [], // è§’色树
        roleTreeSelectedArr: [] // è§’色树选中
      },
      rolesAll: [], // è§’色所有
      defaultPropsOfRoleTree: {
        value: 'code',
        label: 'name',
        children: 'children'
      },
      workingDialogVisible: false,
      workingTableData: [],
      workingTableDataLength: 0,
      formWorking: {
        rows: 10,
        page: 1,
        prop: 'group_code',
        order: 'desc'
      },
      title_value: '数据导入 / ç”¨æˆ·æ¸…单',
      code: '2',
      shows: false
    }
  },
  watch: {
    shows() {
      if (!this.shows) {
        this.getUserSearch()
      }
    }
  },
  created() {
    this.handleRequest()
  },
  mounted() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  methods: {
    handleRequest() {
      this.getUserSearch().then(res => {
        if (res.code === '200') {
          this.getUserOrganization()
        }
      })
    },
    // èŽ·å–ç”¨æˆ·æ¸…å•
    async getUserSearch() {
      const res = await UserSearch(this.form)
      this.tableData = res.data
      this.total = res.count
      return { code: res.code }
    },
    // èŽ·å–æ‰€å±žç»„ç»‡
    async getUserOrganization() {
      const { data: res } = await UserOrganization()
      this.StuOrgArr = clearAllChildren(res)
    },
    // èŽ·å–æ‰€å±žç»„ç»‡å¯¹è¯æ¡†
    async getUserOrganization2() {
      const { data: res } = await UserOrganization()
      this.StuOrgArr2 = clearAllChildren(res)
    },
    // å¯¼å…¥æŒ‰é’®
    upload() {
      this.shows = true
      this.$refs.importPickerFunc.newDataFunc()
    },
    colos() {
      this.shows = false
    },
    // æŽ’序改变时
    sortChange({ column, prop, order }) {
      if (order === 'descending') {
        order = 'desc'
      } else if (order === 'ascending') {
        order = 'asc'
      } else {
        order = 'desc'
      }
      this.form.order = order
      this.form.prop = prop
      this.getUserSearch()
    },
    // æŸ¥è¯¢
    search() {
      this.getUserSearch()
    },
    // é‡ç½®
    reset() {
      this.form.UserCode = ''
      this.form.UserName = ''
      this.form.StuOrg = ''
      this.form.Enable = 'Y'
      this.form.wagetype = ''
      this.$refs.cascader.checkedValue = ''// çº§è”选择器的清空
      this.getUserSearch()
    },
    // çº§è”选择器改变事件
    cascaderChange(val) {
      this.form.StuOrg = val[val.length - 1]
    },
    dialogCascaderChange(val) {
      this.dialogForm.StuOrg = val[val.length - 1]
    },
    // èŽ·å–ä¸‹æ‹‰ç”Ÿäº§ç­ç»„
    async getMesOrderStepReportSelectUserGroup() {
      const { data: res } = await MesOrderStepReportSelectUserGroup()
      this.usergroupArr = res
    },
    // æ–°å¢žæŒ‰é’®
    add(operation) {
      this.operation = operation
      this.dialogVisible = true
      this.getUserOrganization2()
      this.getMesOrderStepReportSelectUserGroup()
    },
    // ä¿®æ”¹æŒ‰é’®
    edit(operation, row) {
      this.operation = operation
      this.dialogVisible = true
      console.log(row)
      this.$nextTick(() => {
        this.dialogForm.id = row.id
        this.dialogForm.UserCode = row.usercode
        this.dialogForm.UserName = row.username
        this.dialogForm.Password = row.password
        this.dialogForm.groupcode = row.group_code
        this.dialogForm.Enable = row.enable
        this.dialogForm.StuOrg = row.stu_torgcode
        this.$refs.dialogCascader.checkedValue = row.stu_torgcode
        this.dialogForm.Mobile = row.mobile
        this.dialogForm.Email = row.email
        this.dialogForm.wagetype = row.wagetype
      })
      this.getMesOrderStepReportSelectUserGroup()
      this.getUserOrganization2()
    },
    // åˆ é™¤æŒ‰é’®
    async del(id) {
      this.$confirm('是否确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        DeleteUser({ Userid: id }).then(res => {
          if (res.code === '200') {
            this.$message.success('删除成功!')
            this.getUserSearch()
          }
        })
      }).catch(() => {
        this.$message.info('已取消删除')
      })
    },
    // å¯¹è¯æ¡†å…³é—­äº‹ä»¶
    handleClose() {
      this.dialogForm.UserCode = ''
      this.dialogForm.UserCode = ''
      this.dialogForm.UserName = ''
      this.dialogForm.Password = ''
      this.dialogForm.Enable = 'Y'
      this.$refs.dialogCascader.checkedValue = ''
      this.dialogForm.StuOrg = ''
      this.dialogForm.Mobile = ''
      this.dialogForm.Email = ''
      this.dialogForm.groupcode = ''
      this.dialogForm.wagetype = ''
      this.$refs.dialogForm.clearValidate()
    },
    // å¯¹è¯æ¡†å–消
    dialogVisibleCancel() {
      this.dialogVisible = false
    },
    // å¯¹è¯æ¡†ç¡®è®¤
    dialogVisibleConfirm() {
      this.$refs.dialogForm.validate(valid => {
        if (valid) {
          const data = {
            id: this.dialogForm.id,
            UserCode: this.dialogForm.UserCode,
            UserName: this.dialogForm.UserName,
            Password: this.dialogForm.Password,
            Enable: this.dialogForm.Enable,
            // StuOrg: this.dialogForm.StuOrg,
            StuOrg: Array.isArray(this.$refs.dialogCascader.checkedValue) ? this.$refs.dialogCascader.checkedValue[this.$refs.dialogCascader.checkedValue.length - 1] : this.$refs.dialogCascader.checkedValue,
            Mobile: this.dialogForm.Mobile,
            Email: this.dialogForm.Email,
            groupcode: this.dialogForm.groupcode,
            wagetype: this.dialogForm.wagetype,
            OperType: this.operation === 'add' ? 'Add' : 'Update',
            Operator: getCookie('admin')
          }
          AddUpdateUser(data).then(res => {
            if (res.code === '200') {
              this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!')
              this.dialogVisible = false
              this.getUserSearch()
            } else {
              this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!')
            }
          })
        }
      })
    },
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 50
        if (window.innerHeight < 769) {
          this.tableHeight = this.tableHeight - 50
        }
        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
      })
    },
    // å…³è”角色点击事件
    async roleClick({ row }) {
      this.dialogFormRoles.rolesArrSelectedArr = []
      this.dialogFormRoles.rolesArr = []
      this.dialogFormRoles.roleTreeSelectedArr = []
      this.dialogVisibleRoles = true
      this.dialogFormRoles.username = row.username
      this.dialogFormRoles.usercode = row.usercode
      const { data: res } = await UserAssociationRole({ usercode: row.usercode })
      this.rolesAll = res
      const nodeKey = []// æ ‘形回显key
      res.forEach((item, index) => {
        this.dialogFormRoles.rolesArr.push({
          code: item.code,
          name: item.name,
          flag: item.flag,
          isSelected1: false,
          isSelected2: false
        })
        if (item.flag === 'Y') {
          this.dialogFormRoles.rolesArr[index].isSelected2 = true
          this.$nextTick(() => {
            // $('input:checkbox').eq(index).attr('checked', true)// è‡ªå®šä¹‰å•选框回显
            $('input:checkbox').eq(index).prop('checked', true)// è‡ªå®šä¹‰å•选框回显
          })
          this.dialogFormRoles.rolesArrSelectedArr.push(item.name)
          if (item.children && item.children.length > 0) {
            const Data = []
            item.children.forEach(it => {
              if (it.flag === 'Y') {
                nodeKey.push(it.code)
                Data.push(it.code)
              }
            })
            this.dialogFormRoles.roleTreeSelectedArr.push({ Code: item.code, Name: item.name, Data: Data })
          }
        }
      })
      console.log(this.dialogFormRoles.roleTreeSelectedArr, 11)
      console.log(this.dialogFormRoles.rolesArr, 888)
      this.dialogFormRoles.rolesArr[0].isSelected1 = true// é»˜è®¤é€‰ä¸­ç¬¬ä¸€ä¸ª
      // this.dialogFormRoles.rolesArr[0].name = '全部'
      this.dialogFormRoles.roleTree = this.rolesAll.filter(item => item.code === this.dialogFormRoles.rolesArr[0].code)
      this.dialogFormRoles.roleTree[0].name = '全部'
      // this.dialogFormRoles.rolesArr
      console.log(nodeKey, 1)
      this.$refs.roleTree.setCheckedKeys(nodeKey)
    },
    // å¤„理用户关联对话框关闭事件
    handleCloseRoles() {
      this.$refs.roleTree.setCheckedKeys([])
      this.dialogFormRoles.rolesArrSelectedArr = []
    },
    // ç”¨æˆ·å…³è”对话框取消事件
    rolesDialogVisibleCancel() {
      this.dialogVisibleRoles = false
    },
    // ç”¨æˆ·å…³è”对话框确认事件
    async rolesDialogVisibleConfirm() {
      console.log(this.dialogFormRoles.roleTreeSelectedArr, 333337)
      const res = await SaveUserAssoctRole(this.dialogFormRoles.roleTreeSelectedArr, this.dialogFormRoles.usercode)
      if (res.code === '200') {
        this.$message.success('保存成功!')
        await this.getUserSearch()
        this.dialogVisibleRoles = false
      }
    },
    // æ ‘形复选框点击事件
    checkBoxClick(obj, { checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys }) {
      // console.log(obj, checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys, 78787878)
      // æ‰¾åˆ° checkedFatherCode  çˆ¶code值
      // å½“halfCheckedKeys不等等零的时候
      // let checkedFatherCode = halfCheckedKeys.length !== 0 ? halfCheckedKeys[0] : checkedKeys[0]
      let checkedFatherCode = '' // æ‰¾åˆ° checkedFatherCode  çˆ¶code值
      // if (checkedFatherCode === undefined) {
      // console.log(this.rolesAll, 66666)
      this.rolesAll.forEach((item, index) => {
        if (item.code === obj.code) {
          checkedFatherCode = item.code
        }
        if (item.children && item.children.length > 0) {
          item.children.forEach((it, ind) => {
            if (it.code === obj.code) {
              checkedFatherCode = item.code
            }
          })
        }
      })
      // }
      console.log(checkedFatherCode, 8)
      // 1.第一种情况当树形   åŠå¶ ä¸ä¸ºé›¶   å…¨å¶ ä¸ä¸ºé›¶
      if (halfCheckedKeys.length !== 0 && checkedKeys.length !== 0) {
        this.dialogFormRoles.rolesArr.forEach((item, index) => {
          if (item.code === checkedFatherCode) {
            console.log('1.第一种情况当树形   åŠå¶ ä¸ä¸ºé›¶   å…¨å¶ ä¸ä¸ºé›¶')
            this.dialogFormRoles.rolesArr[index].isSelected2 = true
            this.$nextTick(() => {
              // $('input:checkbox').eq(index).attr('checked', true)// è‡ªå®šä¹‰å•选框回显
              $('input:checkbox').eq(index).prop('checked', true)// è‡ªå®šä¹‰å•选框回显
            })
            const temp = this.rolesAll.filter(it => it.code === checkedFatherCode)// è¿‡æ»¤å‡ºæ¯æ¬¡é€‰ä¸­çš„大项
            temp.forEach(it => {
              const a = []
              it.children.forEach(it => {
                if (it.code === obj.code) {
                  a.push(it.code)
                }
              })
              // console.log(!this.dialogFormRoles.roleTreeSelectedArr.some(i => i.Code === checkedFatherCode))
              if (!this.dialogFormRoles.roleTreeSelectedArr.some(i => i.Code === checkedFatherCode)) { // å½“直接选父code时执行
                this.dialogFormRoles.roleTreeSelectedArr.push({
                  Code: it.code,
                  Name: it.name,
                  Data: a
                })
              } else {
                this.dialogFormRoles.roleTreeSelectedArr.forEach((i, ind) => { // å½“选子code时执行
                  if (i.Code === checkedFatherCode) {
                    this.dialogFormRoles.roleTreeSelectedArr[ind].Data.forEach((i1, ind2) => {
                      if (i1 === a[0]) {
                        // this.dialogFormRoles.roleTreeSelectedArr[ind].Data.splice(ind2, 1)// å½“子code与现在的code相同时执行
                        this.dialogFormRoles.roleTreeSelectedArr[ind].Data = this.dialogFormRoles.roleTreeSelectedArr[ind].Data.filter(i2 => i2 !== a[0])
                      } else {
                        this.dialogFormRoles.roleTreeSelectedArr[ind].Data.push(a[0])// //当子code与现在的code不相同时执行
                      }
                    })
                    // this.dialogFormRoles.roleTreeSelectedArr[ind].Data.filter((i1, ind2) => i1 !== a[0])// è¿‡æ»¤æŽ‰é€‰ä¸­ç›¸åŒçš„
                  }
                })
              }
            })
          }
        })
      }
      console.log(this.dialogFormRoles.roleTreeSelectedArr, 11)
      // 2.第二种情况当树形   åŠå¶ ä¸ºé›¶   å…¨å¶ ä¸ºé›¶
      if (halfCheckedKeys.length === 0 && checkedKeys.length === 0) {
        this.dialogFormRoles.rolesArr.forEach((item, index) => {
          if (item.code === checkedFatherCode) {
            console.log('2.第二种情况当树形   åŠå¶ ä¸ºé›¶   å…¨å¶ ä¸ºé›¶')
            this.dialogFormRoles.rolesArr[index].isSelected2 = false
            this.$nextTick(() => {
              // console.log($('input:checkbox').eq(1).attr('checked', false), 88888)
              $('input:checkbox').eq(index).prop('checked', false)// è‡ªå®šä¹‰å•选框回显
            })
            this.dialogFormRoles.roleTreeSelectedArr.forEach((it, ind) => {
              if (it.Code === checkedFatherCode) {
                console.log(it.Code, 9)
                this.dialogFormRoles.roleTreeSelectedArr.splice(ind, 1)
              }
            })
            this.dialogFormRoles.rolesArrSelectedArr.forEach((i, i1) => {
              if (i === checkedFatherCode) {
                this.dialogFormRoles.rolesArrSelectedArr.splice(i1, 1)
              }
            })
          }
        })
      }
      console.log(this.dialogFormRoles.roleTreeSelectedArr, 22)
      // 3.第三种种情况当树形   åŠå¶ ä¸ºé›¶   å…¨å¶ ä¸ä¸ºé›¶
      if (halfCheckedKeys.length === 0 && checkedKeys.length !== 0) {
        // this.dialogFormRoles.roleTreeSelectedArr = []
        this.dialogFormRoles.rolesArr.forEach((item, index) => {
          if (item.code === checkedFatherCode) {
            console.log(' 3.第三种种情况当树形   åŠå¶ ä¸ºé›¶   å…¨å¶ ä¸ä¸ºé›¶')
            this.dialogFormRoles.rolesArr[index].isSelected2 = true
            this.$nextTick(() => {
              // $('input:checkbox').eq(index).attr('checked', true)// è‡ªå®šä¹‰å•选框回显
              $('input:checkbox').eq(index).prop('checked', true)// è‡ªå®šä¹‰å•选框回显
            })
          }
        })
        const temp = this.rolesAll.filter(it => it.code === checkedFatherCode)// è¿‡æ»¤å‡ºæ¯æ¬¡é€‰ä¸­çš„大项
        // console.log(!this.dialogFormRoles.roleTreeSelectedArr.some(i => i.Code === checkedFatherCode))
        if (!this.dialogFormRoles.roleTreeSelectedArr.some(i => i.Code === checkedFatherCode)) { // å½“父类为全叶时
          temp.forEach(it => {
            this.dialogFormRoles.roleTreeSelectedArr.push({
              Code: it.code,
              Name: it.name,
              Data: it.children.map(i => i.code)
            })
          })
        } else { // å½“父类由半叶变为全叶时
          this.dialogFormRoles.roleTreeSelectedArr.forEach((i1, ind) => {
            if (i1.Code === checkedFatherCode) { // i1没找对
              this.dialogFormRoles.roleTreeSelectedArr.splice(ind, 1)
              temp.forEach(it => {
                this.dialogFormRoles.roleTreeSelectedArr.push({
                  Code: it.code,
                  Name: it.name,
                  Data: it.children.map(i => i.code)
                })
              })
            }
          })
        }
      }
    },
    // myCheckBox点击事件    å¤§ç›’子点击
    myCheckboxClick(item) {
      console.log(this.dialogFormRoles.rolesArr, 7)
      this.dialogFormRoles.rolesArr.forEach(it => {
        it.isSelected1 = it.code === item.code
      })
      this.dialogFormRoles.roleTree = this.rolesAll.filter(it => it.code === item.code)
      this.dialogFormRoles.roleTree[0].name = '全部'
      if (this.dialogFormRoles.roleTree[0].children.length < 1) {
        this.dialogFormRoles.roleTree = ''
      }
      const temp = this.dialogFormRoles.roleTreeSelectedArr.filter(it => it.Code === item.code)
      console.log(temp, 33)
      if (temp.length > 0) {
        this.$refs.roleTree.setCheckedKeys(temp[0].Data)// æ ‘形选中回显
      } else {
        this.$refs.roleTree.setCheckedKeys([])// å½“长度为零时置空
      }
    },
    // myCheckBoxInput点击事件  å°ç›’子点击(input)
    myCheckboxInputClick(item) {
      item.isSelected2 = !item.isSelected2
      this.dialogFormRoles.rolesArrSelectedArr = [...new Set(this.dialogFormRoles.rolesArrSelectedArr)]// æ•°ç»„去重
      if (item.isSelected2) { // ä»Žæ²¡é€‰ä¸­åˆ°é€‰ä¸­
        console.log('从没选中到选中')
        this.dialogFormRoles.rolesArr.forEach(it => {
          if (it.code === item.code && item.isSelected2) {
            this.dialogFormRoles.rolesArrSelectedArr.push(it.code)
          }
        })
        const temp = this.rolesAll.filter(it => it.code === item.code)// è¿‡æ»¤å‡ºæ¯æ¬¡é€‰ä¸­çš„大项
        temp.forEach(it => {
          this.dialogFormRoles.roleTreeSelectedArr.push({
            Code: it.code,
            Name: it.name,
            Data: it.children.map(i => i.code)
          })
        })
      }
      if (!item.isSelected2) { // ä»Žé€‰ä¸­åˆ°æ²¡é€‰ä¸­
        console.log('从选中到没选中')
        this.dialogFormRoles.rolesArr.forEach((it, ind) => {
          if (it.code === item.code && !item.isSelected2) {
            console.log('进来了')
            console.log(this.dialogFormRoles.rolesArrSelectedArr, 78)
            this.dialogFormRoles.rolesArrSelectedArr.forEach((i, i1) => {
              if (i === it.code) {
                this.dialogFormRoles.rolesArrSelectedArr.splice(i1, 1)
              }
            })
            this.dialogFormRoles.roleTreeSelectedArr.forEach((i, i1) => {
              if (i.Code === it.code) {
                this.dialogFormRoles.roleTreeSelectedArr.splice(i1, 1)
              }
            })
          }
        })
      }
      this.$refs.roleTree.setCheckedKeys(this.dialogFormRoles.rolesArrSelectedArr)
      // this.$refs.roleTree.getCheckedKeys()//只能获取到第一个树形
      this.dialogFormRoles.rolesArrSelectedArr = [...new Set(this.dialogFormRoles.rolesArrSelectedArr)]// æ•°ç»„去重
      // æ•°ç»„中对象相同的去重
      // this.dialogFormRoles.roleTreeSelectedArr = this.dialogFormRoles.roleTreeSelectedArr.filter((currentValue, currentIndex, selfArr) => {
      //   return selfArr.findIndex(item => item.code === currentValue.Code) === currentIndex
      // })
      console.log(this.dialogFormRoles.rolesArrSelectedArr, 6666)
      console.log(this.dialogFormRoles.roleTreeSelectedArr, 6777)
    },
    /*
      ç”Ÿäº§ç­ç»„模块
   */
    // ç”Ÿäº§ç­ç»„按钮点击
    workingTramClick() {
      this.workingDialogVisible = true
      this.getUserGroupSearch()
    },
    // ç”Ÿäº§ç­ç»„对话框关闭事件
    handleCloseWorking() {
      this.workingTableData.forEach((item, index) => {
        if (item.isVisible === 1) {
          this.workingTableData.splice(index, 1)
        }
      })
      this.getMesOrderStepReportSelectUserGroup()
    },
    // ç”Ÿäº§ç­ç»„排序
    sortChangeOfWorking({ column, prop, order }) {
      if (order === 'descending') {
        order = 'desc'
      } else if (order === 'ascending') {
        order = 'asc'
      } else {
        order = 'desc'
      }
      this.form.order = order
      this.form.prop = prop
      this.getUserGroupSearch()
    },
    // èŽ·å–ç”Ÿäº§ç­ç»„åˆ—è¡¨
    async getUserGroupSearch() {
      const res = await UserGroupSearch(this.formWorking)
      this.workingTableData = res.data
      this.workingTableDataLength = res.count
      this.workingTableData.forEach(item => {
        item.isVisible = 0
      })
    },
    // æ–°å¢ž
    addWorking() {
      let number = Math.random() * Math.random()// ä½œä¸ºåˆ é™¤æ—¶çš„æ ‡è¯†ç¬¦
      number = number === 0 ? (10 + Math.random()) : number
      const data = { group_code: '', group_name: '', description: '', isVisible: 1, number: number }
      this.workingTableData.unshift(data)
    },
    // åˆ é™¤
    delWorking(row) {
      this.$confirm('是否确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        UserGroupDelete({ UserGrupCode: row.group_code }).then(res => {
          if (res.code === '200') {
            this.$message.success('删除成功!')
            this.getUserGroupSearch()
          }
        })
      }).catch(() => {
        this.$message.info('已取消删除')
      })
    },
    // ä¿å­˜
    async saveWorking(row) {
      if (row.group_code.trim().length < 1) {
        return this.$message.info('班组编码不能为空!')
      }
      if (row.group_name.trim().length < 1) {
        return this.$message.info('班组名称不能为空!')
      }
      // if (row.description.trim().length < 1) {
      //   return this.$message.info('班组描述不能为空!')
      // }
      const data = {
        code: row.group_code,
        name: row.group_name,
        flag: row.description
      }
      const res = await UserGroupAdd([data])
      if (res.code === '200') {
        this.$message.success('保存成功!')
        await this.getUserGroupSearch()
      }
    },
    // å–消
    cancelWorking(row) {
      this.workingTableData.forEach((item, index) => {
        if (item.isVisible === 1 && item.number === row.number) {
          this.workingTableData.splice(index, 1)
        }
      })
    },
    // ç”Ÿäº§ç­ç»„返回按钮
    WorkingDialogVisibleCancel() {
      this.workingDialogVisible = false
    }
  }
}
</script>
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
}
::v-deep .el-button--primary:hover {
  border: none;
}
::v-deep .el-button--info {
  //background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
.workingDialogVisible ::v-deep .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.el-icon-share {
  color: $main_color;
  cursor: pointer;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
}
.dialogVisibleRoles {
  .myCheckboxGroup {
    display: flex;
    flex-wrap: wrap;
    .myCheckbox {
      border: 1px solid #eee;
      display: flex;
      min-width: 100px;
      padding: 10px;
      margin: 10px 30px 0 0;
      border-radius: 5px;
      cursor: default;
      .myCheckboxInput {
        margin: 1px 5px 0 0;
        cursor: pointer;
      }
    }
    input[type=checkbox] {
      cursor: pointer;
      position: relative;
      width: 14px;
      height: 14px;
      font-size: 14px;
    }
    input[type=checkbox]::after {
      position: absolute;
      top: 0;
      color: $main_color;
      width: 14px;
      height: 14px;
      display: inline-block;
      visibility: visible;
      padding-left: 0;
      text-align: center;
      content: ' ';
      border-radius: 3px
    }
    input[type=checkbox]:checked::after {
      content: "✓";
      //content: "√";
      color: #fff;
      font-size: 12px;
      font-weight: bold;
      background-color: $main_color;
    }
  }
}
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
  margin: 10px auto;
}
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select-dropdown__item.selected {
  color: $main_color;
}
::v-deep .el-input__inner:focus {
  border-color: #42b983 !important;
}
//::v-deep   .el-cascader:not(.is-disabled):hover .el-input__inner:focus {
//  border-color: #42b983 !important;
//}
</style>
<style lang="scss">
.elCascader {
  //.el-cascader-node.in-active-path, .el-cascader-node.is-active, .el-cascader-node.is-selectable.in-checked-path {
  //  color: #42b983 ;
  //}
  .el-cascader-node.is-selectable.in-checked-path {
    color: #42b983;
  }
  .el-radio__input.is-checked .el-radio__inner {
    background-color: #42b983;
    border-color: #42b983;
  }
  .el-radio__input.is-checked .el-radio__inner:hover {
    border-color: #42b983;
  }
  .el-input__inner {
    border-color: #42b983 !important;
  }
}
</style>
src/views/jcsz/zzjg.vue
@@ -1,7 +1,12 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
      <div class="bodyTopButtonGroup">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
@@ -36,16 +41,11 @@
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          border
          stripe
          :row-class-name="tableRowClassName"
          :style="{width: 100+'%',height:tableHeight+'px'}"
          highlight-current-row
          :height="tableHeight+'px'"
@@ -120,8 +120,12 @@
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">编辑</el-button>
                <el-button type="text" @click="del(row.id)">删除</el-button>
                <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                  <i class="el-icon-edit-outline" @click="edit('edit',row)" />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" @click="del(row.id)" />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
@@ -134,7 +138,7 @@
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="prev, pager, next,sizes"
        layout="total ,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getOrganizationSearch"
      />
@@ -445,41 +449,63 @@
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 50
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 200
        if (window.innerHeight < 769) {
          this.tableHeight = this.tableHeight - 50
          this.tableHeight = this.tableHeight - 40
        }
        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
      })
    },
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    }
  }
}
</script>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline{
  margin-right: 15px;
}
::v-deep .el-button--primary, .el-button--default, .el-button--info {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
  //background-color: $main_color !important;
}
::v-deep .el-button--primary:hover {
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-button--info{
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
::v-deep .el-input__inner {
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
@@ -487,87 +513,46 @@
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height:30px;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  justify-content: space-between;
}
.body ::v-deep .el-divider{
::v-deep .el-table::before {
  height: 0;
}
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-table__body .el-table__row.hover-row td{
  background-color: #eaecef ;
}
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
  margin: 10px auto;
}
.body ::v-deep .el-form-item{
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
</style>
<style>
::v-deep .el-select .el-input__inner:focus{
  border-color: $main_color;
}
::v-deep .el-select-dropdown__item.selected{
color: $main_color;
.el-table .custom-row {
  background: #f8f8fa;
}
</style>
src/views/sbgl/sbqd.vue
@@ -1,7 +1,15 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
      <div class="bodyTopButtonGroup">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button icon="el-icon-c-scale-to-original" @click="deviceTypeButton">设备类型</el-button>
        <el-button icon="el-icon-document-copy" @click="deviceGroupButton">设备组</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
@@ -92,21 +100,14 @@
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button type="primary" icon="el-icon-c-scale-to-original" @click="deviceTypeButton">设备类型</el-button>
        <el-button type="primary" icon="el-icon-document-copy" @click="deviceGroupButton">设备组</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          border
          :height="tableHeight+'px'"
          stripe
          highlight-current-row
          :row-class-name="tableRowClassName"
          :style="{width: 100+'%',height:(tableHeight-50)+'px'}"
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
@@ -207,8 +208,12 @@
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">编辑</el-button>
                <el-button type="text" @click="del(row)">删除</el-button>
                <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                  <i class="el-icon-edit-outline" @click="edit('edit',row)" />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" @click="del(row)" />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
@@ -221,7 +226,7 @@
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="prev, pager, next,sizes"
        layout="total,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getDeviceMangerSearch"
      />
@@ -367,10 +372,12 @@
        <!--        <el-button type="primary" icon="el-icon-delete" @click="delSetting">删除</el-button>-->
      </div>
      <el-table
        ref="DeviceTypeArray"
        :data="DeviceTypeArray"
        border
        height="300"
        highlight-current-row
        :row-class-name="tableRowClassName"
        :header-cell-style="this.$headerCellStyle"
        :cell-style="this.$cellStyle"
        @sort-change="sortChangeOfDeviceType"
@@ -427,7 +434,8 @@
        :page.sync="formDeviceType.page"
        :limit.sync="formDeviceType.rows"
        align="right"
        layout="prev, pager, next,sizes"
        style="margin-top: 10px"
        layout="total,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getDeviceTypeSearchDialog"
      />
@@ -446,6 +454,7 @@
      width="800px"
      :close-on-click-modal="false"
      top="15vh"
      class="DeviceTypeDialogVisible"
      @close="handleCloseDeviceGroup"
    >
@@ -453,10 +462,12 @@
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="addDeviceGroup">新增</el-button>
      </div>
      <el-table
        ref="DeviceGroupArray"
        :data="DeviceGroupArray"
        border
        highlight-current-row
        height="300"
        :row-class-name="tableRowClassName"
        :header-cell-style="this.$headerCellStyle"
        :cell-style="this.$cellStyle"
        @sort-change="sortChangeOfDeviceGroup"
@@ -536,7 +547,8 @@
        :page.sync="formDeviceGroup.page"
        :limit.sync="formDeviceGroup.rows"
        align="right"
        layout="prev, pager, next,sizes"
        style="margin-top: 10px"
        layout="total, prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getDeviceGroupSearchDialog"
      />
@@ -851,8 +863,11 @@
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 100
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 240
        // if (window.innerHeight < 769) {
        //   this.tableHeight = this.tableHeight - 50
        // }
      })
    },
@@ -861,6 +876,9 @@
    deviceTypeButton() {
      this.DeviceTypeDialogVisible = true
      this.getDeviceTypeSearchDialog()
      this.$nextTick(() => {
        this.$refs.DeviceTypeArray.doLayout()
      })
    },
    async getDeviceTypeSearchDialog() {
      const res = await DeviceTypeSearch(this.formDeviceType)
@@ -956,6 +974,9 @@
    deviceGroupButton() {
      this.DeviceGroupDialogVisible = true
      this.getDeviceGroupSearchDialog()
      this.$nextTick(() => {
        this.$refs.DeviceGroupArray.doLayout()
      })
    },
    // è®¾å¤‡ç»„对话框关闭事件
    handleCloseDeviceGroup() {
@@ -1059,37 +1080,62 @@
          this.DeviceGroupArray.splice(index, 1)
        }
      })
    },
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    }
  }
}
</script>
<style lang="scss" scoped>
::v-deep .DeviceTypeDialogVisible .el-dialog__body {
  padding: 20px 20px !important;
}
</style>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline{
  margin-right: 15px;
}
::v-deep .el-button--primary, .el-button--default, .el-button--info {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
}
::v-deep .el-button--primary:hover {
  border: none;
}
::v-deep .el-button--info {
  //background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-input__inner {
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
@@ -1097,116 +1143,30 @@
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
.DeviceTypeDialogVisible {
  ::v-deep .el-dialog__body {
    padding: 20px 20px !important;
  }
  ::v-deep .el-select .el-input .el-select__caret {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
}
::v-deep .el-table .caret-wrapper {
  //float: right;
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  justify-content: space-between;
}
.el-icon-share {
  color: $main_color;
  cursor: pointer;
::v-deep .el-table::before {
  height: 0;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
::v-deep .el-table__body .el-table__row.hover-row td{
  background-color: #eaecef ;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
@@ -1218,23 +1178,14 @@
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-select .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select-dropdown__item.selected {
  color: $main_color;
}
</style>
<style lang="scss">
.dateStyle {
  .el-date-table td.today span {
    color: #42b983;
  }
<style>
.el-table .custom-row {
  background: #f8f8fa;
}
</style>
src/views/scgl/scdd.vue
@@ -1,11 +1,25 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
      <div class="bodyTopButtonGroup">
        <el-button
          icon="el-icon-refresh-right"
          @click="syncERP"
        >同步ERP
        </el-button>
        <el-button
          icon="el-icon-switch-button"
          @click="orderClose"
        >关闭订单
        </el-button>
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
          label-width="80px"
          label-width="100px"
          inline
          style="display: flex;justify-content: space-between"
        >
@@ -42,13 +56,14 @@
            <el-form-item label="创建人员" style=" display: flex;">
              <el-input v-model="form.creatuser" style="width: 200px" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="预计开工时间" label-width="100px" style=" display: flex;">
            <el-form-item label="预计开工时间" label-width="100px" style=" display: flex;font-size: 14px">
              <el-date-picker
                v-model="form.paystartdate"
                type="daterange"
                range-separator="~"
                class="timeMini"
                size="mini"
                style="width: 240px"
                style="width: 225px;display: flex"
                :clearable="false"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
@@ -56,14 +71,15 @@
              <!--              :picker-options="expireTimeOption"-->
            </el-form-item>
            <el-form-item label="预计完工时间" label-width="100px" style=" display: flex;">
            <el-form-item label="预计完工时间" label-width="100px" style=" display: flex;font-size: 14px">
              <el-date-picker
                v-model="form.payenddate"
                type="daterange"
                :clearable="false"
                class="timeMini"
                range-separator="~"
                start-placeholder="开始日期"
                style="width: 240px"
                style="width: 225px;display: flex"
                end-placeholder="结束日期"
                size="mini"
              />
@@ -116,28 +132,12 @@
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button
          type="primary"
          icon="el-icon-refresh-right"
          @click="syncERP"
        >同步ERP
        </el-button>
        <el-button
          type="primary"
          icon="el-icon-switch-button"
          @click="orderClose"
        >关闭订单
        </el-button>
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          :height="tableHeight+'px'"
          border
          stripe
          :row-class-name="tableRowClassName"
          :style="{width: 100+'%',height:tableHeight+'px',}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
@@ -680,43 +680,74 @@
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 110
        this.isIpad = window.innerHeight < 769
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 260
        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
        if (this.isIpad) {
          this.tableHeight = this.tableHeight - 30
          this.tableHeight = this.tableHeight - 20
        }
      })
    },
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    }
  }
}
</script>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-range-input{
  font-size: 14px ;
}
::v-deep .el-range-separator{
  display: flex;
  justify-content: center;
  align-items: center;
}
.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline{
  margin-right: 15px;
}
::v-deep .el-button--primary, .el-button--default, .el-button--info {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
  //background-color: $main_color !important;
}
::v-deep .el-button--primary:hover {
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-button--info {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
::v-deep .el-input__inner {
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
@@ -724,106 +755,30 @@
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  justify-content: space-between;
}
.el-icon-share {
  color: $main_color;
  cursor: pointer;
::v-deep .el-table::before {
  height: 0;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
::v-deep .el-table__body .el-table__row.hover-row td{
  background-color: #eaecef ;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
@@ -835,36 +790,19 @@
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-select .el-input__inner:focus {
  border-color: $main_color;
</style>
<style>
.el-table .custom-row {
  background: #f8f8fa;
}
::v-deep .el-select-dropdown__item.selected {
  color: $main_color;
}
::v-deep .el-checkbox__inner:hover {
  border-color: $main_color;
}
::v-deep .el-textarea__inner:focus {
  border-color: $main_color;
}
.elTableDiv {
  ::v-deep .el-radio__label {
    display: none;
  }
}
</style>
<style>
.osloading{
  font-size: 40px;
}
</style>
src/views/template2.vue
ÎļþÒÑɾ³ý
src/views/wlgl/ckdy.vue
@@ -1,7 +1,18 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
      <div class="bodyTopButtonGroup">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button
          icon="el-icon-refresh-right"
          @click="syncSeaveSearchWhareHouseLocation"
        >同步仓库/库位
        </el-button>
        <el-button icon="el-icon-download" @click="upload">导入</el-button>
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
@@ -29,25 +40,13 @@
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button
          type="primary"
          icon="el-icon-refresh-right"
          @click="syncSeaveSearchWhareHouseLocation"
        >同步仓库/库位
        </el-button>
        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          border
          stripe
          :height="tableHeight+'px'"
          :style="{width: 100+'%',height:tableHeight+'px',}"
          :row-class-name="tableRowClassName"
          :style="{width: 100+'%',height:tableHeight+'px'}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
@@ -61,6 +60,7 @@
            prop="RowNum"
            width="50"
            label="序号"
            fixed
          />
          <el-table-column
            prop="code"
@@ -91,11 +91,16 @@
          <el-table-column
            label="操作"
            width="120"
            fixed="right"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">编辑</el-button>
                <el-button type="text" @click="del(row)">删除</el-button>
                <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                  <i class="el-icon-edit-outline" @click="edit('edit',row)" />
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" @click="del(row)" />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
@@ -108,7 +113,7 @@
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="prev, pager, next,sizes"
        layout="total,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getWareHouseDefSearch"
      />
@@ -143,7 +148,7 @@
    </el-dialog>
    <!--导入组件-->
    <import-picker ref="importPickerFunc" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
    <import-picker ref="importPickerFunc" class="importPickerClass" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
  </div>
</template>
@@ -357,41 +362,63 @@
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 50
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 200
        if (window.innerHeight < 769) {
          this.tableHeight = this.tableHeight - 50
          this.tableHeight = this.tableHeight - 40
        }
      })
    },
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    }
  }
}
</script>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline{
  margin-right: 15px;
}
::v-deep .el-button--primary, .el-button--default, .el-button--info {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
  //background-color: $main_color !important;
}
::v-deep .el-button--primary:hover {
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-button--info {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
::v-deep .el-input__inner {
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
@@ -399,102 +426,30 @@
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  justify-content: space-between;
}
.el-icon-share {
  color: $main_color;
  cursor: pointer;
::v-deep .el-table::before {
  height: 0;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
::v-deep .el-table__body .el-table__row.hover-row td{
  background-color: #eaecef ;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
@@ -507,11 +462,14 @@
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-textarea__inner:focus{
  border-color: $main_color;
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
</style>
<style>
.el-table .custom-row {
  background: #f8f8fa;
}
</style>
src/views/wlgl/kwdy.vue
@@ -1,7 +1,13 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
      <div class="bodyTopButtonGroup">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
@@ -45,17 +51,12 @@
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          border
          stripe
          :row-class-name="tableRowClassName"
          :height="tableHeight+'px'"
          :style="{width: 100+'%',height:tableHeight+'px',}"
          highlight-current-row
@@ -71,6 +72,7 @@
            prop="RowNum"
            width="50"
            label="序号"
            fixed
          />
          <el-table-column
            prop="code"
@@ -106,11 +108,16 @@
          <el-table-column
            label="操作"
            width="120"
            fixed="right"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">编辑</el-button>
                <el-button type="text" @click="del(row)">删除</el-button>
                <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                  <i class="el-icon-edit-outline" @click="edit('edit',row)" />
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" @click="del(row)" />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
@@ -123,7 +130,7 @@
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="prev, pager, next,sizes"
        layout="total,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getStorageDefSearch"
      />
@@ -372,43 +379,64 @@
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 50
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 200
        if (window.innerHeight < 769) {
          this.tableHeight = this.tableHeight - 50
        }
      })
    },
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    }
  }
}
</script>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline{
  margin-right: 15px;
}
::v-deep .el-button--primary, .el-button--default, .el-button--info {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
  //background-color: $main_color !important;
}
::v-deep .el-button--primary:hover {
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-button--info {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
::v-deep .el-input__inner {
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
@@ -416,102 +444,30 @@
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  justify-content: space-between;
}
.el-icon-share {
  color: $main_color;
  cursor: pointer;
::v-deep .el-table::before {
  height: 0;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
::v-deep .el-table__body .el-table__row.hover-row td{
  background-color: #eaecef ;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
@@ -523,21 +479,14 @@
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-textarea__inner:focus {
  border-color: $main_color;
}
</style>
<style>
::v-deep .el-select .el-input__inner:focus {
  border-color: $main_color;
.el-table .custom-row {
  background: #f8f8fa;
}
::v-deep .el-select-dropdown__item.selected {
  color: $main_color;
}
</style>
src/views/zzmx/chda.vue
@@ -1,7 +1,29 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
      <div class="bodyTopButtonGroup">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <!--        <el-button type="primary" icon="el-icon-office-building" @click="office">单位</el-button>-->
        <el-button
          icon="el-icon-refresh-right"
          @click="syncSeaveSearchUnit"
        >同步计量单位
        </el-button>
        <el-button
          icon="el-icon-refresh-right"
          @click="syncInventoryFileSelect"
        >同步存货档案
        </el-button>
        <el-button
          icon="el-icon-refresh-right"
          @click="syncStockTypeSelect"
        >同步存货类型
        </el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
@@ -77,38 +99,14 @@
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <!--        <el-button type="primary" icon="el-icon-office-building" @click="office">单位</el-button>-->
        <el-button
          type="primary"
          icon="el-icon-refresh-right"
          @click="syncSeaveSearchUnit"
        >同步计量单位
        </el-button>
        <el-button
          type="primary"
          icon="el-icon-refresh-right"
          @click="syncInventoryFileSelect"
        >同步存货档案
        </el-button>
        <el-button
          type="primary"
          icon="el-icon-refresh-right"
          @click="syncStockTypeSelect"
        >同步存货类型
        </el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          border
          stripe
          :height="tableHeight"
          width="100%"
          :row-class-name="tableRowClassName"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
@@ -208,8 +206,12 @@
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">编辑</el-button>
                <el-button type="text" @click="del(row)">删除</el-button>
                <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                  <i class="el-icon-edit-outline" @click="edit('edit',row)" />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" @click="del(row)" />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
@@ -463,7 +465,7 @@
      title="关联工艺路线"
      :visible.sync="dialogVisibleRoute"
      width="800px"
      top="15vh"
      top="10vh"
      :fullscreen="isIpad"
      class="dialogVisibleRoute"
      @closed="handleCloseRoute"
@@ -523,9 +525,11 @@
      </div>
      <div style="overflow-y: scroll">
        <el-table
          ref="projectTableData"
          :data="projectTableData"
          border
          height="280"
          :row-class-name="tableRowClassName"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
@@ -534,6 +538,7 @@
            prop="seq"
            width="100"
            label="工序序号"
            fixed
          />
          <el-table-column
            prop="stepcode"
@@ -546,10 +551,11 @@
          <el-table-column
            prop="enable"
            label="启用状态"
            fixed="right"
          >
            <template slot-scope="{row}">
              <div v-if="row.enable==='Y'">是</div>
              <div v-if="row.enable==='N'">否</div>
              <div v-if="row.enable==='Y'"><svg-icon icon-class="circleYes" style="margin-right: 2px" />是</div>
              <div v-if="row.enable==='N'"><svg-icon icon-class="circleNo" style="margin-right: 2px" />否</div>
            </template>
          </el-table-column>
        </el-table>
@@ -938,10 +944,10 @@
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 50
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 200
        if (window.innerHeight < 769) {
          this.tableHeight = this.tableHeight - 50
          this.tableHeight = this.tableHeight - 40
        }
        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
      })
@@ -1141,6 +1147,10 @@
    // è¿”回
    officeDialogVisibleCancel() {
      this.officeDialogVisible = false
    },
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    }
  }
}
@@ -1148,57 +1158,6 @@
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
}
::v-deep .el-button--primary:hover {
  border: none;
}
::v-deep .el-button--info {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
.dialogVisibleRoute {
  ::v-deep .el-dialog__body {
    padding: 20px 20px !important;
@@ -1209,115 +1168,6 @@
  ::v-deep .el-dialog__body {
    padding: 20px 20px !important;
  }
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.el-icon-share {
  color: $main_color;
  cursor: pointer;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
}
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
  margin: 10px auto;
}
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-textarea__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select-dropdown__item.selected {
  color: $main_color;
}
::v-deep .el-select .el-input .el-select__caret {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dialogVisibleRoute {
@@ -1380,3 +1230,100 @@
  }
}
</style>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline{
  margin-right: 15px;
}
::v-deep .el-button--primary, .el-button--default, .el-button--info {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
::v-deep .el-button--primary {
  //background-color: $main_color !important;
}
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-input__inner {
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
::v-deep .el-table::before {
  height: 0;
}
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-table__body .el-table__row.hover-row td{
  background-color: #eaecef ;
}
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
  margin: 10px auto;
}
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
</style>
<style>
.el-table .custom-row {
  background: #f8f8fa;
}
</style>
src/views/zzmx/gxdy.vue
@@ -1,7 +1,13 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
      <div class="bodyTopButtonGroup">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
@@ -58,19 +64,14 @@
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          :height="tableHeight"
          border
          stripe
          :style="{width: 100+'%',height:tableHeight+'px',}"
          :row-class-name="tableRowClassName"
          :style="{width: 100+'%',height:tableHeight+'px'}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
@@ -180,8 +181,12 @@
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">编辑</el-button>
                <el-button type="text" @click="del(row)">删除</el-button>
                <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                  <i class="el-icon-edit-outline" @click="edit('edit',row)" />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" @click="del(row)" />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
@@ -497,6 +502,9 @@
    this.getHeight()
  },
  methods: {
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    },
    async getStepSearch() {
      const res = await StepSearch(this.form)
      this.tableData = res.data
@@ -609,12 +617,13 @@
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 50
        // this.mainHeight = window.innerHeight - 250
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 200
        if (window.innerHeight < 769) {
          this.tableHeight = this.tableHeight - 50
          this.tableHeight = this.tableHeight - 40
        }
        this.isIpad = window.innerHeight < 769
        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
      })
    },
    /* å…³è”工作站模块*/
@@ -956,71 +965,10 @@
  }
}
</script>
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
}
::v-deep .el-button--primary:hover {
  border: none;
}
::v-deep .el-button--info {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
.defectDialogVisible {
  ::v-deep .el-dialog__body {
    padding: 20px 20px !important;
  }
}
.workDialogVisible {
  ::v-deep .el-dialog__body {
    padding: 20px 20px !important;
  }
  .myCheckboxGroup {
    display: flex;
    flex-wrap: wrap;
@@ -1074,27 +1022,60 @@
  }
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
</style>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
.el-icon-share, .el-icon-delete, .el-icon-edit-outline {
  color: $main_color;
  cursor: pointer;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
.el-icon-edit-outline {
  margin-right: 15px;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
::v-deep .el-button--primary, .el-button--default, .el-button--info {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
::v-deep .el-button--primary {
  //background-color: $main_color !important;
}
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .workDialogVisible .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .defectDialogVisible .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
::v-deep .el-table .caret-wrapper {
@@ -1102,57 +1083,25 @@
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  justify-content: space-between;
}
.el-icon-share {
  color: $main_color;
  cursor: pointer;
::v-deep .el-table::before {
  height: 0;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
::v-deep .el-table__body .el-table__row.hover-row td {
  background-color: #eaecef;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
@@ -1165,24 +1114,14 @@
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-select .el-input__inner:focus {
  border-color: $main_color;
}
</style>
<style>
::v-deep .el-select-dropdown__item.selected {
  color: $main_color;
.el-table .custom-row {
  background: #f8f8fa;
}
::v-deep .el-checkbox__inner:hover {
  border-color: $main_color;
}
::v-deep .el-textarea__inner:focus {
  border-color: $main_color;
}
</style>
src/views/zzmx/gylx.vue
@@ -1,7 +1,13 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
      <div class="bodyTopButtonGroup">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
@@ -29,18 +35,13 @@
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          :height="tableHeight"
          border
          stripe
          :row-class-name="tableRowClassName"
          :style="{width: 100+'%',height:tableHeight+'px',}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
@@ -55,6 +56,7 @@
            prop="RowNum"
            width="50"
            label="序号"
            fixed
          />
          <el-table-column
            prop="code"
@@ -95,12 +97,16 @@
          <el-table-column
            label="操作"
            width="120"
            fixed="right"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <!--                <el-button type="text" @click="edit('edit',row)">编辑</el-button>-->
                <el-button type="text" @click="edit('edit',row)">预览</el-button>
                <el-button type="text" @click="del(row)">删除</el-button>
                <el-tooltip class="item" effect="dark" content="预览" placement="top">
                  <i class="el-icon-view" style="margin-right:15px;cursor: pointer;color:#42b983  " @click="edit('edit',row)" />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" @click="del(row)" />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
@@ -113,7 +119,7 @@
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="prev, pager, next,sizes"
        layout="total,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getRouteSearch"
      />
@@ -656,13 +662,16 @@
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 50
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 200
        if (window.innerHeight < 769) {
          this.tableHeight = this.tableHeight - 50
          this.tableHeight = this.tableHeight - 40
        }
        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
      })
    },
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    }
  }
}
@@ -670,165 +679,6 @@
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  border: 1px solid $main_color;
  padding: 0 20px;
}
::v-deep .el-button--info {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
//::v-deep .el-dialog__body {
//  padding: 20px 100px !important;
//}
::v-deep .el-dialog__body {
  padding: 20px 60px !important;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.el-icon-share {
  color: $main_color;
  cursor: pointer;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
}
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
  margin: 10px auto;
}
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select-dropdown__item.selected {
  color: $main_color;
}
::v-deep .el-checkbox__inner:hover {
  border-color: $main_color;
}
::v-deep .el-textarea__inner:focus {
  border-color: $main_color;
}
/*
实现工艺设置动态添加样式
@@ -943,3 +793,100 @@
  }
}
</style>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline{
  margin-right: 15px;
}
::v-deep .el-button--primary, .el-button--default, .el-button--info {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
::v-deep .el-button--primary {
  //background-color: $main_color !important;
}
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-input__inner {
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
::v-deep .el-table::before {
  height: 0;
}
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-table__body .el-table__row.hover-row td{
  background-color: #eaecef ;
}
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
  margin: 10px auto;
}
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
</style>
<style>
.el-table .custom-row {
  background: #f8f8fa;
}
</style>
src/views/zzmx/jpgj.vue
@@ -1,7 +1,13 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
      <div class="bodyTopButtonGroup">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
@@ -88,18 +94,13 @@
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          :height="tableHeight"
          border
          stripe
          :row-class-name="tableRowClassName"
          :style="{width: 100+'%',height:tableHeight+'px',}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
@@ -190,8 +191,12 @@
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">编辑</el-button>
                <el-button type="text" @click="del(row)">删除</el-button>
                <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                  <i class="el-icon-edit-outline" @click="edit('edit',row)" />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="编辑" placement="top">
                  <i class="el-icon-delete" @click="del(row)" />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
@@ -302,7 +307,7 @@
          :height="tableHeight"
          :style="{width: 100+'%',height:tableHeight-50+'px',}"
          border
          stripe
          :row-class-name="tableRowClassName"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
@@ -312,6 +317,7 @@
            width="50"
            label="序号"
            prop="RowNum"
            fixed
          />
          <el-table-column
            prop="eqpcode"
@@ -397,6 +403,8 @@
          </el-table-column>
          <el-table-column
            label="操作"
            width="120"
            fixed="right"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
@@ -546,7 +554,9 @@
    this.getHeight()
  },
  methods: {
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    },
    handleRequest() {
      this.getBeatRateSearch().then(res => {
        if (res.code === '200') {
@@ -726,6 +736,7 @@
      if (res.code === '200') {
        this.$message.success('复制成功!')
        await this.getEqpTable()
        this.isEqpTableEdit = true
      }
    },
    // è®¾å¤‡èŠ‚æ‹å€¼æ”¹å˜
@@ -838,10 +849,10 @@
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 50
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 200
        if (window.innerHeight < 769) {
          this.tableHeight = this.tableHeight - 50
          this.tableHeight = this.tableHeight - 40
        }
        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
      })
@@ -850,31 +861,53 @@
}
</script>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
.el-button--text{
  font-size: 14px;
  cursor: pointer;
}
.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline{
  margin-right: 15px;
}
::v-deep .el-button--primary, .el-button--default, .el-button--info {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
  //background-color: $main_color !important;
}
::v-deep .el-button--primary:hover {
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-button--info {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
::v-deep .el-input__inner {
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
::v-deep .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
@@ -882,106 +915,30 @@
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  justify-content: space-between;
}
.el-icon-share {
  color: $main_color;
  cursor: pointer;
::v-deep .el-table::before {
  height: 0;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
::v-deep .el-table__body .el-table__row.hover-row td{
  background-color: #eaecef ;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
@@ -993,25 +950,14 @@
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-select .el-input__inner:focus {
  border-color: $main_color;
}
</style>
<style>
::v-deep .el-select-dropdown__item.selected {
  color: $main_color;
.el-table .custom-row {
  background: #f8f8fa;
}
::v-deep .el-checkbox__inner:hover {
  border-color: $main_color;
}
::v-deep .el-textarea__inner:focus {
  border-color: $main_color;
}
</style>