value
2024-05-30 651b886ec292e160a6ce2585173effb05f212996
Merge remote-tracking branch 'origin/master'

# Conflicts:
# src/components/view/person-manage.vue
已修改10个文件
745 ■■■■ 文件已修改
src/assets/api/controller.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/fiberoptic-config.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 151 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b3-work-time-management/work-time-config.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b3-work-time-management/work-time-management.vue 501 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b3-work-time-management/work-time-statistics.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tool/value-table.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b3-classes.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/role-manage.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js
@@ -25,7 +25,9 @@
    performanceShift,
    auxiliaryWorkingHours,
    unPass,
    companies
    companies,
    auxiliaryOutputWorkingHours,
    auxiliaryWorkingHoursDay,
  }
}
@@ -304,3 +306,20 @@
  addPersonUser: "/companies/addPersonUser", //获取人事系统组织下的人员
  selectPersonUser: "/companies/selectPersonUser", //通过员工号获取员工
}
const auxiliaryOutputWorkingHours = {
  selectAuxiliaryOutputWorkingHours: "/auxiliaryOutputWorkingHours/selectAuxiliaryOutputWorkingHours", //查询产量工时
  collectWorkingHours: "/auxiliaryOutputWorkingHours/collectWorkingHours", //统计产量工时汇总和辅助工时汇总
  exportWorkingHours: "/auxiliaryOutputWorkingHours/exportWorkingHours", //导出
}
const auxiliaryWorkingHoursDay = {
  selectAuxiliaryWorkingHoursDay: "/auxiliaryWorkingHoursDay/selectAuxiliaryWorkingHoursDay", //查询辅助工时
  deleteAuxiliaryWorkingHoursDay: "/auxiliaryWorkingHoursDay/deleteAuxiliaryWorkingHoursDay", //删除
  insertAuxiliaryWorkingHoursDay: "/auxiliaryWorkingHoursDay/insertAuxiliaryWorkingHoursDay", //新增
  selectAuxiliaryWorkingHoursByNumber: "/auxiliaryWorkingHoursDay/selectAuxiliaryWorkingHoursByNumber", //根据编号查询辅助工时配置信息
  selectshiftByUser: "/auxiliaryWorkingHoursDay/selectshiftByUser", //根据编号当前用户信息查询所在班次
  updateAuxiliaryWorkingHoursDay: "/auxiliaryWorkingHoursDay/updateAuxiliaryWorkingHoursDay", //编辑
  check: "/auxiliaryWorkingHoursDay/check", //审核
  approve: "/auxiliaryWorkingHoursDay/approve", //批准
}
src/components/do/b1-ins-order/fiberoptic-config.vue
@@ -355,6 +355,7 @@
        } else {
          this.bushing = []
        }
        console.log(1111111,this.bushing)
      },
      getStandTreeBySampleType() {
        this.$axios.post(this.$api.standardTree.getStandTreeBySampleType, {
@@ -635,6 +636,7 @@
          a.bushing = this.bushing
        })
        this.$message.success('已保存')
        console.log(11111111,this.bushing)
      }
    }
  }
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -175,6 +175,9 @@
    <el-row class="title">
      <el-col :span="12" style="padding-left: 20px;">检验单详情</el-col>
      <el-col :span="12" style="text-align: right;">
        <el-button size="small" type="primary" @click="fiberOpticVisible=true" v-if="fiberOptic.length>0">光纤切换</el-button>
        <el-button size="small" type="primary" @click="fiberOpticTapeVisible=true" v-if="fiberOpticTape.length>0">光纤带切换</el-button>
        <el-button size="small" type="primary" @click="bushingVisible=true" v-if="bushing.length>0">套管切换</el-button>
        <el-button size="small" type="primary" @click="sampleVisible=true">样品切换</el-button>
        <el-button size="small" type="primary" @click="taskVisible=true">任务切换</el-button>
        <el-button size="small" type="primary" @click="addVerifyDia = true" v-show="state==1"
@@ -290,6 +293,43 @@
        </table>
      </div>
    </div>
    <el-drawer title="光纤切换" :visible.sync="fiberOpticVisible" :size="500">
      <el-table class="el-table" ref="fiberOpticTable" :data="fiberOptic" height="100%" tooltip-effect="dark" border
        highlight-current-row @row-click="handleChangeOptic" :row-class-name="tableRowClassName"
        :current-row-key="currentKey" :row-key="record=>record.index" v-if="fiberOpticVisible">
        <el-table-column type="index" align="center" label="序号" width="70px" :key="Math.random()">
        </el-table-column>
        <el-table-column prop="bushColor" label="管套色标" min-width="100px" show-overflow-tooltip></el-table-column>
        <el-table-column prop="color" label="光纤色标" min-width="100px" show-overflow-tooltip></el-table-column>
        <el-table-column prop="model" label="光纤规格" min-width="130px" show-overflow-tooltip
         ></el-table-column>
        <el-table-column prop="standard" label="参考标准" width="100px" show-overflow-tooltip></el-table-column>
      </el-table>
    </el-drawer>
    <el-drawer title="光纤带切换" :visible.sync="fiberOpticTapeVisible" :size="500">
      <el-table class="el-table" ref="fiberOpticTapeTable" :data="fiberOpticTape" height="100%" tooltip-effect="dark" border
        highlight-current-row @row-click="handleChangeTape" :row-class-name="tableRowClassName"
        :current-row-key="currentKey" :row-key="record=>record.index" v-if="fiberOpticTapeVisible">
        <el-table-column type="index" align="center" label="序号" width="70px" :key="Math.random()">
        </el-table-column>
        <el-table-column prop="code" label="光纤带编号" min-width="110px" show-overflow-tooltip></el-table-column>
        <el-table-column prop="model" label="光纤带规格" min-width="110px" show-overflow-tooltip></el-table-column>
        <el-table-column prop="standard" label="参考标准" width="90px" show-overflow-tooltip></el-table-column>
        <el-table-column prop="num" label="光纤检测量" min-width="110px" show-overflow-tooltip
          ></el-table-column>
      </el-table>
    </el-drawer>
    <el-drawer title="套管切换" :visible.sync="bushingVisible" :size="500">
      <el-table class="el-table" ref="bushingTable" :data="bushing" height="100%" tooltip-effect="dark" border
        highlight-current-row @row-click="handleChangeBushing" :row-class-name="tableRowClassName"
        :current-row-key="currentKey" :row-key="record=>record.index" v-if="bushingVisible">
        <el-table-column type="index" align="center" label="序号" width="70px" :key="Math.random()">
        </el-table-column>
        <el-table-column prop="color" label="管色标" min-width="110px" show-overflow-tooltip></el-table-column>
        <el-table-column prop="num2" label="标量" min-width="110px" show-overflow-tooltip></el-table-column>
        <el-table-column prop="num3" label="测试量" min-width="90px" show-overflow-tooltip></el-table-column>
      </el-table>
    </el-drawer>
    <el-drawer title="样品切换" :visible.sync="sampleVisible" :size="500">
      <el-table class="el-table" ref="productTable" :data="sampleProduct" height="100%" tooltip-effect="dark" border
        highlight-current-row @row-click="handleChangeSample" :row-class-name="tableRowClassName"
@@ -353,9 +393,6 @@
</template>
<script>
  import {
    set
  } from 'shelljs';
  import ValueTable from '../../tool/value-table.vue'
  export default {
    props: ['sonLaboratory', 'orderId', 'state'],
@@ -423,7 +460,16 @@
        addVerifyDia: false,
        verifyUser: null,
        personList: [],
        enumList: []
        enumList: [],
        fiberOpticVisible:false,
        fiberOpticTapeVisible:false,
        bushingVisible:false,
        fiberOpticTape:[],//光纤带列表
        fiberOptic:[],//光纤列表
        bushing:[],//套管列表
        currentFiberOpticTape:null,//当前光纤带
        currentFiberOptic:null,//当前光纤
        currentBushing:null,//当前套管
      }
    },
    created() {
@@ -469,6 +515,14 @@
          this.getTableLists();
          this.componentData.currentId = val;
          this.currentKey = 1;
          // 清空光纤配置相关数据
          this.fiberOpticTape = []
          this.currentFiberOpticTape = null;
          this.fiberOptic = []
          this.currentFiberOptic = null;
          this.bushing = []
          this.currentBushing = null;
        })
      },
      currentTable(val1, val0) {
@@ -484,9 +538,71 @@
      }
    },
    methods: {
      handleChangeBushing(row, column, event){
        this.currentBushing = row;
        this.fiberOpticTape = []
        this.currentFiberOpticTape = null;
        this.fiberOptic = []
        this.currentFiberOptic = null;
        if(row.fiber&&row.fiber.length>0){
          // 直接配置光纤
          this.fiberOptic = row.fiber;
        }else if(row.fibers&&row.fibers.length>0){
          // 配置光纤带后,再配置光纤
          this.fiberOpticTape = row.fibers;
        }
        this.bushingVisible = false;
      },
      handleChangeOptic(row, column, event){
        this.currentFiberOptic = row;
        this.currentFiberOptic.productList.forEach(a => {
          this.param[a.id] = {
            insValue: [],
            comValue: [],
            resValue: null,
            equipValue: [],
            equipName: [],
            insResult: null
          }
        })
        this.getTableLists0(row)
        this.fiberOpticVisible = false;
        this.currentKey = row.index
      },
      handleChangeTape(row, column, event){
        this.currentFiberOpticTape = row;
        this.param = {}
        this.fiberOptic = []
        this.currentFiberOptic = null;
        this.currentFiberOpticTape.productList.forEach(a => {
          this.param[a.id] = {
            insValue: [],
            comValue: [],
            resValue: null,
            equipValue: [],
            equipName: [],
            insResult: null
          }
        })
        this.getTableLists0(row)
        if(row.fiber&&row.fiber.length>0){
          // 配置光纤
          this.fiberOptic = row.fiber;
        }
        this.fiberOpticTapeVisible = false;
        this.currentKey = row.index
      },
      handleChangeSample(row, column, event) {
        this.currentSample = row;
        this.param = {}
        // 清空光纤配置相关数据
        this.fiberOpticTape = []
        this.currentFiberOpticTape = null;
        this.fiberOptic = []
        this.currentFiberOptic = null;
        this.bushing = []
        this.currentBushing = null;
        this.currentSample.insProduct.forEach(a => {
          this.param[a.id] = {
            insValue: [],
@@ -497,6 +613,10 @@
            insResult: null
          }
        })
        let bushing = this.currentSample.insProduct.bushing
        if(bushing&&bushing.length>0){
          this.bushing = bushing
        }
        // this.handleTableData()
        this.getTableLists();
        this.sampleVisible = false;
@@ -590,6 +710,29 @@
          this.handleTableData()
        }
      },
      // 光纤配置相关模板table列表
      getTableLists0(obj){
        const mySet1 = new Set();
        this.tableLists = obj.productList.filter(m => {
          let num0 = mySet1.size;
          if (m.templateId != null&&m.template != null) {
            mySet1.add(JSON.stringify({
              template: m.template,
              templateId: m.templateId
            }))
          }
          let num1 = mySet1.size;
          if (num1 > num0) {
            return m
          }
        });
        if (this.tableLists && this.tableLists.length > 0) {
          this.tableList = null;
          this.tableList = [this.tableLists[0]]
          this.currentTable = this.tableLists[0].templateId;
          this.handleTableData()
        }
      },
      handleTableData() {
        this.excelMethodList = []
        this.widthList = this.tableList[0].style.columnlen;
src/components/do/b3-work-time-management/work-time-config.vue
@@ -8,7 +8,8 @@
            </div>
            <div class="search_thing">
                <div class="search_label">实验室:</div>
                <el-select v-model="componentData.entity.laboratory" placeholder="全部" size="small" @change="refreshTable()">
                <el-select v-model="componentData.entity.laboratory" placeholder="全部" size="small" @change="refreshTable()"
        clearable>
                    <el-option v-for="item in laboratoryList" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
@@ -16,10 +17,12 @@
            <div class="search_thing">
                <div class="search_label">部门:</div>
                <div class="search_input">
          <el-select v-model="componentData.entity.department" placeholder="全部" size="small" @change="refreshTable()">
          <!-- <el-select v-model="componentData.entity.department" placeholder="全部" size="small" @change="refreshTable()">
                      <el-option v-for="item in partList" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
          </el-select> -->
          <el-input size="small" placeholder="请输入" clearable
                        v-model="componentData.entity.department" @keyup.enter.native="refreshTable()"></el-input>
        </div>
            </div>
            <div class="search_thing" style="padding-left: 30px;">
@@ -37,7 +40,6 @@
</template>
<script>
import { number } from 'echarts'
import ValueTable from '../../tool/value-table.vue'
export default {
  components: {
@@ -67,7 +69,8 @@
                        id: 'update',
                        font: '编辑',
                        type: 'text',
                        method: 'doDiy'
                        method: 'doDiy',
            field: ['department']
                    }],
                    tagField: {
                        laboratory: {
@@ -93,8 +96,8 @@
                        //     select: []
                        // },
                    },
                    requiredAdd: ['number','auxiliaryProject','laboratory','unit','approvedWorkingHour','department'],
                    requiredUp: ['number','auxiliaryProject','laboratory','unit','approvedWorkingHour','department']
                    requiredAdd: ['number','auxiliaryProject','laboratory','unit','approvedWorkingHour'],
                    requiredUp: ['number','auxiliaryProject','laboratory','unit','approvedWorkingHour']
            },
      entityCopy: {},
            upIndex: 0,
src/components/do/b3-work-time-management/work-time-management.vue
@@ -5,15 +5,15 @@
                <div class="search_label">周次:</div>
                <div class="search_input" style="display: flex;align-items: center;">
          <el-input size="small" placeholder="开始周次" clearable
                        v-model="componentData.entity.number"></el-input>
                        v-model="entity.week1"></el-input>
            <span>&nbsp;-&nbsp;</span>
          <el-input size="small" placeholder="结束周次" clearable
                        v-model="componentData.entity.number"></el-input>
                        v-model="entity.week2"></el-input>
        </div>
            </div>
            <div class="search_thing" style="width: 200px;">
                <div class="search_label">星期:</div>
                <el-select v-model="componentData.entity.laboratory" placeholder="全部" size="small" @change="refreshTable()">
                <el-select v-model="entity.weekDay" placeholder="全部" size="small" @change="refreshTable()" clearable>
                    <el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
@@ -23,12 +23,14 @@
                <div class="search_input">
          <el-date-picker
            style="width: 100%;"
            v-model="componentData.entity.number"
            v-model="entity.dateTime"
            size="small"
            type="daterange"
            range-separator="至"
            format="yyyy-MM-dd HH:mm:ss"
            value-format="yyyy-MM-dd HH:mm:ss"
            start-placeholder="开始日期"
            end-placeholder="结束日期" @change="refreshTable()">
            end-placeholder="结束日期" @change="refreshTable()" clearable>
          </el-date-picker>
        </div>
            </div>
@@ -36,11 +38,11 @@
      <div class="search_thing" style="width: 200px;">
                <div class="search_label" >名字:</div>
                <el-input size="small" placeholder="请输入" clearable
                        v-model="componentData.entity.number" @keyup.enter.native="refreshTable()"></el-input>
                        v-model="entity.name" @keyup.enter.native="refreshTable()"></el-input>
            </div>
      <div class="search_thing" style="width: 200px;">
                <div class="search_label">状态:</div>
                <el-select v-model="componentData.entity.laboratory" placeholder="全部" size="small" @change="refreshTable()">
      <div class="search_thing" style="width: 200px;" v-if="currentTable == 'ValueTable0'">
                <div class="search_label" >状态:</div>
                <el-select v-model="entity.state" placeholder="全部" size="small" @change="refreshTable()">
                    <el-option v-for="item in stateList" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
@@ -61,69 +63,73 @@
      </el-radio-group>
      <div style="display: flex;align-items: center;">
        <p style="font-size: 14px;margin-right: 30px;">
        产量工时汇总:<span style="font-size: 16px;color: #3A7BFA;">11.333</span>&nbsp;&nbsp;&nbsp;&nbsp;辅助工时汇总:<span style="font-size: 16px;color: #3A7BFA;">12.333</span>
          总工时汇总:<span style="font-size: 16px;color: #3A7BFA;">{{ (totalInfo['产量工时汇总']+totalInfo['辅助工时汇总'])? (totalInfo['产量工时汇总']+totalInfo['辅助工时汇总']):0 }}</span>&nbsp;&nbsp;&nbsp;&nbsp;产量工时汇总:<span style="font-size: 16px;color: #3A7BFA;">{{totalInfo['产量工时汇总']?totalInfo['产量工时汇总']:0}}</span>&nbsp;&nbsp;&nbsp;&nbsp;辅助工时汇总:<span style="font-size: 16px;color: #3A7BFA;">{{totalInfo['辅助工时汇总']?totalInfo['辅助工时汇总']:0}}</span>
        </p>
        <el-button size="small" type="primary" style="margin-right: 16px;" @click="openAdd">录入数据</el-button>
        <el-button size="small" type="primary">导 出</el-button>
        <el-button size="small" type="primary" style="margin-right: 16px;" @click="openAdd" v-show="currentTable == 'ValueTable0'">录入数据</el-button>
        <el-button size="small" type="primary" @click="handleOut" :loading="outLoading">导 出</el-button>
      </div>
    </div>
    <div class="table">
      <ValueTable ref="ValueTable0"
        v-show="currentTable == 'ValueTable0'"
                :url="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :upUrl="$api.auxiliaryWorkingHours.upAuxiliaryWorkingHours"
                :delUrl="$api.auxiliaryWorkingHours.deleteAuxiliaryWorkingHours" :componentData="componentData" :key="upIndex" />
        v-if="currentTable == 'ValueTable0'"
                :url="$api.auxiliaryWorkingHoursDay.selectAuxiliaryWorkingHoursDay"
                :delUrl="$api.auxiliaryWorkingHoursDay.deleteAuxiliaryWorkingHoursDay" :componentData="componentData" :key="upIndex"
        @delete="handleDelete" />
      <ValueTable ref="ValueTable1"
      v-show="currentTable == 'ValueTable1'"
                :url="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :upUrl="$api.auxiliaryWorkingHours.upAuxiliaryWorkingHours"
                :delUrl="$api.auxiliaryWorkingHours.deleteAuxiliaryWorkingHours" :componentData="componentData1" :key="upIndex1" />
      v-if="currentTable == 'ValueTable1'"
                :url="$api.auxiliaryOutputWorkingHours.selectAuxiliaryOutputWorkingHours" :componentData="componentData1" :key="upIndex1" />
    </div>
    <el-dialog :title="formData.id?'编辑':'录入数据'" :visible.sync="addVisible" width="600px" :before-close="handleClose">
            <el-row style="display:flex;justify-content: space-around;">
                <el-col :span="12">
                    <el-form :model="formData" label-width="90px">
            <el-form-item label="录入时间:">
              <el-radio-group v-model="formData.value0" size="small">
                <el-radio :label="0">今天</el-radio>
                <el-radio :label="1">昨天</el-radio>
              <el-radio-group v-model="formData.dateTime" size="small">
                <el-radio :label="getYearAndMonthAndDays()+' 00:00:00'">今天</el-radio>
                <el-radio :label="getYearAndMonthAndDays(new Date((new Date()).getTime() - 24 * 60 * 60 * 1000))+' 00:00:00'">昨天</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="年份:">
              <el-input v-model="formData.year" disabled size="small"></el-input>
            </el-form-item>
            <el-form-item label="周次:">
              <el-input v-model="formData.value2" size="small" disabled></el-input>
              <el-input v-model="formData.week" size="small" disabled></el-input>
            </el-form-item>
            <el-form-item label="星期:">
              <el-input v-model="formData.value3" size="small" disabled></el-input>
              <!-- <el-input v-model="formData.weekDay" size="small" disabled></el-input> -->
              <el-select v-model="formData.weekDay" placeholder="请选择" size="small" disabled>
                <el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="班次:">
              <el-input v-model="formData.value4" size="small" disabled></el-input>
              <el-input v-model="formData.shift" size="small" disabled></el-input>
            </el-form-item>
          </el-form>
                </el-col>
        <el-col :span="12">
                    <el-form :model="formData" label-width="90px">
            <el-form-item label="编号:">
              <el-input v-model="formData.value5" size="small"></el-input>
            <el-form-item label="编号:" required>
              <el-input v-model="formData.number" size="small" @blur="getInfoByCode"></el-input>
            </el-form-item>
            <el-form-item label="数量:">
              <el-input v-model="formData.value6" size="small" ></el-input>
            <el-form-item label="数量:" required>
              <el-input v-model="formData.amount" size="small" ></el-input>
            </el-form-item>
            <el-form-item label="核准工时:">
              <el-input v-model="formData.value7" size="small" disabled></el-input>
              <el-input v-model="formData.approvedWorkingHour" size="small" disabled></el-input>
            </el-form-item>
            <el-form-item label="辅助工时:">
              <el-input v-model="formData.value8" size="small" disabled></el-input>
              <el-input v-model="formData.nonproductiveTime" size="small" disabled></el-input>
            </el-form-item>
            <el-form-item label="辅助项目:">
              <el-input v-model="formData.value9" size="small" disabled></el-input>
              <el-input v-model="formData.auxiliaryProject" size="small" disabled></el-input>
            </el-form-item>
          </el-form>
                </el-col>
            </el-row>
      <el-form :model="formData" label-width="90px">
        <el-form-item label="辅助说明:">
          <el-input v-model="formData.value10" type="textarea"
          <el-input v-model="formData.remarks" type="textarea"
  :rows="3" size="small"></el-input>
        </el-form-item>
      </el-form>
@@ -139,19 +145,23 @@
                <el-col :span="12">
                    <el-form :model="formData0" label-width="90px">
            <el-form-item label="年份:">
              <el-input v-model="formData0.year" size="small"></el-input>
              <el-input v-model="formData0.year" size="small" :disabled="title=='批准'"></el-input>
            </el-form-item>
            <el-form-item label="周次:">
              <el-input v-model="formData0.value2" size="small"></el-input>
              <el-input v-model="formData0.week" size="small" :disabled="title=='批准'"></el-input>
            </el-form-item>
            <el-form-item label="星期:">
              <el-input v-model="formData0.value3" size="small"></el-input>
              <!-- <el-input v-model="formData0.weekDay" size="small" :disabled="title=='批准'"></el-input> -->
              <el-select v-model="formData0.weekDay" placeholder="请选择" size="small" :disabled="title=='批准'">
                <el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="姓名:">
              <el-input v-model="formData0.value4" size="small" disabled></el-input>
              <el-input v-model="formData0.nameUser" size="small" disabled></el-input>
            </el-form-item>
            <el-form-item label="班次:">
              <el-select v-model="formData0.value4" placeholder="请选择" size="small">
              <el-select v-model="formData0.shift" placeholder="请选择" size="small" :disabled="title=='批准'">
                <el-option v-for="item in classType" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
@@ -160,28 +170,28 @@
                </el-col>
        <el-col :span="12">
                    <el-form :model="formData0" label-width="90px">
            <el-form-item label="编号:">
              <el-input v-model="formData0.value5" size="small"></el-input>
            <el-form-item label="编号:" required>
              <el-input v-model="formData0.number" size="small" :disabled="title=='批准'"></el-input>
            </el-form-item>
            <el-form-item label="数量:">
              <el-input v-model="formData0.value6" size="small" ></el-input>
            <el-form-item label="数量:" required>
              <el-input v-model="formData0.amount" size="small" :disabled="title=='批准'"></el-input>
            </el-form-item>
            <el-form-item label="核准工时:">
              <el-input v-model="formData0.value7" size="small" disabled></el-input>
              <el-input v-model="formData0.approvedWorkingHour" size="small" disabled></el-input>
            </el-form-item>
            <el-form-item label="辅助工时:">
              <el-input v-model="formData0.value8" size="small" disabled></el-input>
              <el-input v-model="formData0.nonproductiveTime" size="small" disabled></el-input>
            </el-form-item>
            <el-form-item label="辅助项目:">
              <el-input v-model="formData0.value9" size="small" disabled></el-input>
              <el-input v-model="formData0.auxiliaryProject" size="small" disabled></el-input>
            </el-form-item>
          </el-form>
                </el-col>
            </el-row>
      <el-form :model="formData0" label-width="90px">
        <el-form-item label="复核说明:">
          <el-input v-model="formData0.value10" type="textarea"
  :rows="3" size="small"></el-input>
          <el-input v-model="formData0.reviewerRemark" type="textarea"
  :rows="3" size="small" :disabled="title=='批准'"></el-input>
        </el-form-item>
      </el-form>
            <span slot="footer" class="dialog-footer">
@@ -196,17 +206,22 @@
<script>
import ValueTable from '../../tool/value-table.vue'
import {
        getYearAndMonthAndDays
    } from '../../../util/date'
export default {
  components: {
    ValueTable
  },
  data () {
    return{
      entity:{},
      componentData: {
                    entity: {
                        number: null,
                        department: null,
                        laboratory: null,
                        week: null,
                        weekDay: null,
                        dateTime: null,
            name:null,
                        orderBy: {
                            field: 'id',
                            order: 'desc'
@@ -237,37 +252,16 @@
                        method: 'handleRatify'
                    }],
                    tagField: {
                        deviceStatus: {
                            select: []
                        },
                        equipmentManager: {
                            select: []
                        },
                        authorizedPerson: {
                            select: []
                        },
            insProductIds:{
            shift:{
              select:[]
            }
                    },
                    linkEvent: {
                        deviceName: {
                            method: 'selectAllByOne'
                        }
                    },
          },
                    linkEvent: {},
                    selectField: {
                        authorizedPerson: {
                            select: [],
                            choose: true
                        },
                        equipmentManager: {
                            select: []
                        },
            insProductIds:{
              select:[],
              choose: true
            shift:{
              select:[]
            }
                    },
          },
                    requiredAdd: [],
                    requiredUp: []
            },
@@ -275,9 +269,10 @@
            upIndex: 0,
      componentData1: {
                    entity: {
                        number: null,
                        department: null,
                        laboratory: null,
                        week: null,
                        weekDay: null,
                        dateTime: null,
            name:null,
                        orderBy: {
                            field: 'id',
                            order: 'desc'
@@ -288,78 +283,52 @@
                    select: false,
                    do: [],
                    tagField: {
                        deviceStatus: {
                            select: []
                        },
                        equipmentManager: {
                            select: []
                        },
                        authorizedPerson: {
                            select: []
                        },
            insProductIds:{
              select:[]
            }
                    },
                    linkEvent: {
                        deviceName: {
                            method: 'selectAllByOne'
                        }
                    },
                    selectField: {
                        authorizedPerson: {
                            select: [],
                            choose: true
                        },
                        equipmentManager: {
                            select: []
                        },
            insProductIds:{
              select:[],
              choose: true
            }
                    },
                    linkEvent: {},
                    selectField: {},
                    requiredAdd: [],
                    requiredUp: []
            },
      upIndex1:0,
      entityCopy1: {},
      upIndex1:100,
      weekList:[
        {label: '星期一', value: 1},
        {label: '星期二', value: 2},
        {label: '星期三', value: 3},
        {label: '星期四', value: 4},
        {label: '星期五', value: 5},
        {label: '星期六', value: 6},
        {label: '星期日', value: 7}
        {label: '星期一', value: '1'},
        {label: '星期二', value: '2'},
        {label: '星期三', value: '3'},
        {label: '星期四', value: '4'},
        {label: '星期五', value: '5'},
        {label: '星期六', value: '6'},
        {label: '星期日', value: '7'}
      ],
      currentTable:'ValueTable0',
      addVisible:false,
      addLoad:false,
      formData:{
        value0:0,
        dateTime:getYearAndMonthAndDays()+' 00:00:00',
        year:new Date().getFullYear(),
        value2:this.getCurrentWeekNumber(),
        value3:this.getWeek(),
        value4:'',
        value5:'',
        value6:'',
        value7:'',
        value8:'',
        value9:'',
        value10:'',
        week:this.getCurrentWeekNumber(),
        weekDay:this.getWeek(),
        shift:'',
        number:'',
        amount:'',
        approvedWorkingHour:'',
        nonproductiveTime:'',
        auxiliaryProject:'',
        remarks:'',
      },
      formData0:{
        value0:0,
        dateTime:0,
        year:new Date().getFullYear(),
        value2:this.getCurrentWeekNumber(),
        value3:this.getWeek(),
        value4:'',
        value5:'',
        value6:'',
        value7:'',
        value8:'',
        value9:'',
        value10:'',
        week:this.getCurrentWeekNumber(),
        weekDay:this.getWeek(),
        createUser:'',
        shift:'',
        number:'',
        amount:'',
        approvedWorkingHour:'',
        nonproductiveTime:'',
        auxiliaryProject:'',
        reviewerRemark:'',
      },
      checkVisible:false,
      checkLoadN:false,
@@ -368,57 +337,129 @@
      classType:[],
      stateList:[
        {
          value:0,
          value:'已提交',
          label:'已提交'
        },
        {
          value:1,
          value:'已审核',
          label:'已审核'
        },
        {
          value:2,
          value:'已批准',
          label:'已批准'
        },
      ]
      ],
      totalInfo:{},
      auxiliaryWorking:null,
      outLoading:false
    }
  },
  watch:{
    'formData.value0'(val){
      if(val==0){
    'formData.dateTime'(val){
      if(val==(getYearAndMonthAndDays()+' 00:00:00')){
        this.formData.year = new Date().getFullYear();
        this.formData.value2 = this.getCurrentWeekNumber()
        this.formData.value3 = this.getWeek()
        this.formData.week = this.getCurrentWeekNumber()
        this.formData.weekDay = this.getWeek()
      }else{
        var today = new Date(); // 获取当前日期
        var yesterday = new Date(today); // 复制当前日期
        yesterday.setDate(today.getDate() - 1); // 设置为前一天
        var timestamp = new Date(yesterday.getTime());
        this.formData.year = timestamp.getFullYear();
        this.formData.value2 = this.getCurrentWeekNumber(timestamp)
        this.formData.value3 = this.getWeek(timestamp)
        this.formData.week = this.getCurrentWeekNumber(timestamp)
        this.formData.weekDay = this.getWeek(timestamp)
      }
    },
    'formData.amount'(val){
      if(val){
        if(!isNaN(val)){
          if(this.formData.approvedWorkingHour){
            this.formData.nonproductiveTime = this.formData.approvedWorkingHour*val
          }
        }else{
          this.$message.error('请输入数字')
          this.formData.amount = ''
        }
      }
    },
    'formData.approvedWorkingHour'(val){
      if(val&&this.formData.amount){
        this.formData.nonproductiveTime = this.formData.amount*val
      }
    },
    'formData0.amount'(val){
      if(val){
        if(!isNaN(val)){
          if(this.formData0.approvedWorkingHour){
            this.formData0.nonproductiveTime = this.formData0.approvedWorkingHour*val
          }
        }else{
          this.$message.error('请输入数字')
          this.formData0.amount = ''
        }
      }
    },
    'formData0.approvedWorkingHour'(val){
      if(val&&this.formData0.amount){
        this.formData0.nonproductiveTime = this.formData0.amount*val
      }
    }
  },
  mounted(){
    this.getCurrentWeekNumber()
    this.selectEnumByCategory()
    this.collectWorkingHours()
    this.selectshiftByUser()
    this.entityCopy = this.HaveJson(this.componentData.entity);
    this.entityCopy1 = this.HaveJson(this.componentData1.entity);
  },
  methods:{
    refreshTable(){},
    refresh(){},
    getYearAndMonthAndDays(date){
      return getYearAndMonthAndDays(date)
    },
    refreshTable(){
      let entity = {}
      if(this.entity.week1&&this.entity.week2){
        entity.week = JSON.stringify([this.entity.week1,this.entity.week2])
      }
      if(this.entity.dateTime){
        entity.dateTime = JSON.stringify(this.entity.dateTime)
      }
      entity.weekDay = this.entity.weekDay
      entity.name = this.entity.name
      if(this.currentTable=='ValueTable0'){
        entity.state = this.entity.state
        this.componentData.entity = {...this.componentData.entity,...entity}
        this.$refs['ValueTable0'].selectList()
      }else{
        this.componentData1.entity = {...this.componentData1.entity,...entity}
        this.$refs['ValueTable1'].selectList()
      }
    },
    refresh(){
      this.entity = {}
      if(this.currentTable=='ValueTable0'){
        this.componentData.entity = this.HaveJson(this.entityCopy)
        this.upIndex++
      }else{
        this.componentData1.entity = this.HaveJson(this.entityCopy1)
        this.upIndex1++
      }
      this.refreshTable()
    },
    openAdd(){
      this.formData = {
        value0:0,
        dateTime:getYearAndMonthAndDays()+' 00:00:00',
        year:new Date().getFullYear(),
        value2:this.getCurrentWeekNumber(),
        value3:this.getWeek(),
        value4:'',
        value5:'',
        value6:'',
        value7:'',
        value8:'',
        value9:'',
        value10:'',
        week:this.getCurrentWeekNumber(),
        weekDay:this.getWeek(),
        shift:'',
        number:'',
        amount:'',
        approvedWorkingHour:'',
        nonproductiveTime:'',
        auxiliaryProject:'',
        remarks:'',
      }
      this.addVisible = true
    },
@@ -426,19 +467,53 @@
      this.formData = row;
      this.addVisible = true
    },
    handleDelete(){
      this.collectWorkingHours()
    },
    handleClose(){
      this.addVisible = false
    },
    submitAdd(){
      if(!this.formData.value5){
      if(!this.formData.number){
        this.$message.error('请输入编号')
        return
      }
      if(!this.formData.value6){
      if(!this.formData.amount){
        this.$message.error('请输入数量')
        return
      }
      this.addLoad = true
      if(!this.formData.id){
        this.$axios.post(this.$api.auxiliaryWorkingHoursDay.insertAuxiliaryWorkingHoursDay, {
            ...this.formData
          }, {
            headers: {
              'Content-Type': 'application/json'
            }
          }).then(res => {
            this.addLoad = false
            if (res.code == 201) return
            this.$message.success('已提交')
            this.addVisible = false
            this.refreshTable()
            this.collectWorkingHours()
          })
      }else{
        this.$axios.post(this.$api.auxiliaryWorkingHoursDay.updateAuxiliaryWorkingHoursDay, {
            ...this.formData
          }, {
            headers: {
              'Content-Type': 'application/json'
            }
          }).then(res => {
            this.addLoad = false
            if (res.code == 201) return
            this.$message.success('操作成功')
            this.addVisible = false
            this.refreshTable()
            this.collectWorkingHours()
          })
      }
    },
    handleCheck(row){
      this.title = '审核'
@@ -451,21 +526,67 @@
      this.checkVisible = true
    },
    submitCheck(e){
      if(!this.formData0.value5){
      if(!this.formData0.number){
        this.$message.error('请输入编号')
        return
      }
      if(!this.formData0.value6){
      if(!this.formData0.amount){
        this.$message.error('请输入数量')
        return
      }
      this.checkLoadY = true
      if(this.title == '审核'){
        // if(e==0){
        //   // 审核不通过
        // }else{
        //   // 审核通过
        // }
        this.formData0.state = e==0?'审核不通过':'审核通过'
        this.$axios.post(this.$api.auxiliaryWorkingHoursDay.check, {
            ...this.formData0
        }, {
          headers: {
            'Content-Type': 'application/json'
          }
        }).then(res => {
          this.checkLoadY = false
          if (res.code == 201) return
          this.$message.success('操作成功')
          this.checkVisible = false
          this.refreshTable()
          this.collectWorkingHours()
        })
      }else{
        // if(e==0){
        //   // 审核不通过
        // }else{
        //   // 审核通过
        // }
        this.$axios.post(this.$api.auxiliaryWorkingHoursDay.approve, {
            id:this.formData0.id,
            state:e==0?'批准不通过':'批准通过'
        }, {
          headers: {
            'Content-Type': 'application/json'
          }
        }).then(res => {
          this.checkLoadY = false
          if (res.code == 201) return
          this.$message.success('操作成功')
          this.checkVisible = false
          this.refreshTable()
          this.collectWorkingHours()
        })
      }
    },
    selectEnumByCategory() {
      this.$axios.post(this.$api.enums.selectEnumByCategory, {
        category: "班次类型"
      }).then(res => {
        this.classType = res.data
        this.componentData.tagField.shift.select = res.data
        this.classType = res.data
        this.componentData.selectField.shift.select = res.data
      })
    },
    getCurrentWeekNumber(now=new Date()) {
@@ -491,7 +612,59 @@
      let d = e.getDay()
      // let c = str.charAt(d)
      // return `周${c}`
      return d
      return String(d)
    },
    collectWorkingHours(){
      this.$axios.post(this.$api.auxiliaryOutputWorkingHours.collectWorkingHours).then(res => {
        this.totalInfo = res.data
      })
    },
    selectshiftByUser(){
      this.$axios.post(this.$api.auxiliaryWorkingHoursDay.selectshiftByUser).then(res => {
        this.formData.shift = res.data
      })
    },
    getInfoByCode(){
      if(this.formData.number){
        this.$axios.post(this.$api.auxiliaryWorkingHoursDay.selectAuxiliaryWorkingHoursByNumber+'?number='+this.formData.number).then(res => {
        this.auxiliaryWorking = res.data
        this.formData.approvedWorkingHour = this.auxiliaryWorking.approvedWorkingHour
        this.formData.auxiliaryProject = this.auxiliaryWorking.auxiliaryProject
      })
      }
    },
    handleOut(){
      this.outLoading = true
      this.$axios.post(this.$api.auxiliaryOutputWorkingHours.exportWorkingHours,{responseType: 'blob'}).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        // let fileName="日工时汇总表";
        // const blob = new Blob([res], {
        //   type: 'application/force-download'
        // })
        // const filename = decodeURI(fileName+'.xlsx')
        // // 创建一个超链接,将文件流赋进去,然后实现这个超链接的单击事件
        // const elink = document.createElement('a')
        // elink.download = filename
        // elink.style.display = 'none'
        // elink.href = URL.createObjectURL(blob)
        // document.body.appendChild(elink)
        // elink.click()
        // URL.revokeObjectURL(elink.href) // 释放URL 对象
        // document.body.removeChild(elink)
        const blob = new Blob([res], {
          type: 'application/force-download'
        })
        const link = document.createElement('a')
        link.href = URL.createObjectURL(blob)
        link.download = decodeURI('日工时汇总表'+'.xlsx')
        document.body.appendChild(link)
        link.click()
        window.setTimeout(function () {
            URL.revokeObjectURL(blob)
            document.body.removeChild(link)
        }, 0)
      })
    },
  }
}
src/components/do/b3-work-time-management/work-time-statistics.vue
@@ -23,10 +23,12 @@
            <div class="search_thing">
                <div class="search_label">部门:</div>
                <div class="search_input">
          <el-select v-model="componentData.entity.laboratory" placeholder="全部" size="small" @change="refreshTable()">
                    <el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
          <!-- <el-select v-model="componentData.entity.laboratory" placeholder="全部" size="small" @change="refreshTable()">
            <el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select> -->
          <el-input size="small" placeholder="请输入" clearable
                        v-model="componentData.entity.department" @keyup.enter.native="refreshTable()"></el-input>
        </div>
            </div>
            <div class="search_thing" style="padding-left: 30px;width: 100px;">
src/components/tool/value-table.vue
@@ -764,6 +764,7 @@
                }
                this.$message.success('删除成功')
                this.selectList()
                this.$emit('delete')
              }).catch(e => {
                this.$message.error('删除失败')
              })
src/components/view/b3-classes.vue
@@ -68,7 +68,7 @@
            </div>
          </div>
        </div>
        <div class="scroll-right">
        <div class="scroll-right" id="nav" style="cursor: move;">
          <div class="content">
            <div class="content-title content-title-right" style="border-bottom: 0;">
              <div class="content-title-item" v-for="(item,index) in weeks" :key="'b'+index">
@@ -83,7 +83,7 @@
            v-on:mouseenter="onMouseEnter(index)"
          v-on:mouseleave="currentUserIndex=null">
              <div class="content-body-item" v-for="(m,i) in item.list" :key="'d'+i" :class="{hoverType:currentUserIndex==index}">
                <el-dropdown trigger="click" placement="bottom" @command="e=>handleCommand(e,m)" :disabled="!upPower">
                <el-dropdown trigger="click" placement="bottom" @command="e=>handleCommand(e,m)" :disabled="!upPower" style="width: 100%;height: 100%;cursor: pointer;">
                    <div class="work-box" :class="{type0:m.shift==='0',type1:m.shift==='1',type2:m.shift==='2',type3:m.shift==='3',type4:m.shift==='4',type5:m.shift==='5',type6:m.shift==='6'}">
                    <span style="cursor: pointer;" :style="`opacity: ${getShiftByDic(m.shift)=='无'?0:1};`">{{ getShiftByDic(m.shift) }}</span>
                  </div>
@@ -324,6 +324,7 @@
    }
    this.monthList.reverse()
    // this.getPower()
    this.scrollInit()
  },
  methods: {
    refresh(){
@@ -634,6 +635,33 @@
        return obj.label
      }
      return '无'
    },
    scrollInit() {
      // 获取要绑定事件的元素
      const nav = document.getElementById("nav")
      var flag; // 鼠标按下
      var downX; // 鼠标点击的x下标
      var scrollLeft; // 当前元素滚动条的偏移量
      nav.addEventListener("mousedown", function(event) {
        flag = true;
        downX = event.clientX; // 获取到点击的x下标
        scrollLeft = this.scrollLeft; // 获取当前元素滚动条的偏移量
      });
      nav.addEventListener("mousemove", function(event) {
        if (flag) { // 判断是否是鼠标按下滚动元素区域
          var moveX = event.clientX; // 获取移动的x轴
          var scrollX = moveX - downX; // 当前移动的x轴下标减去刚点击下去的x轴下标得到鼠标滑动距离
          this.scrollLeft = scrollLeft - scrollX // 鼠标按下的滚动条偏移量减去当前鼠标的滑动距离
        }
      });
      // 鼠标抬起停止拖动
      nav.addEventListener("mouseup", function() {
        flag = false;
      });
      // 鼠标离开元素停止拖动
      nav.addEventListener("mouseleave", function(event) {
        flag = false;
      });
    }
  }
}
@@ -698,6 +726,8 @@
  min-height: calc(100% - 10px); /* 视口高度 */
  margin-left: 220px;
  overflow-x: scroll;
  /* overflow-x: hidden; */
  cursor: move;
}
.content {
src/components/view/role-manage.vue
@@ -84,8 +84,8 @@
            <template slot="title">
              <i class="el-icon-circle-plus-outline" style="margin-right: 10px;"></i>{{category}}
            </template>
            <div style="padding: 3px 30px;" v-for="(a, ai) in menu" :key="ai" v-if="a.type==category"><el-checkbox
                v-model="a.isClick" :disabled="type=='查看'">{{a.remark}}</el-checkbox></div>
            <div style="padding: 3px 30px;display: flex;align-items: center;justify-content: space-between;" v-for="(a, ai) in menu" :key="ai" v-if="a.type==category" ><el-checkbox
                v-model="a.isClick" :disabled="type=='查看'">{{a.remark}}</el-checkbox> <el-checkbox v-model="a.look" v-if="a.remark.includes('查询')||a.remark.includes('获取')" :disabled="type=='查看'">只看我</el-checkbox></div>
          </el-collapse-item>
          <!-- <el-collapse-item title="查询">
                        <el-row style="padding: 3px 30px;" v-for="(a, ai) in menu" :key="ai" v-if="a.type=='查询'">
src/main.js
@@ -13,8 +13,8 @@
//本地
Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
const javaApi = 'http://192.168.11.200:8001';//李
// const javaApi = 'http://10.20.102.168:8001';//张
// const javaApi = 'http://192.168.11.200:8001';//李
const javaApi = 'http://192.168.144.249:8001';//张
// const javaApi = 'http://172.20.10.3:8001';//姜
// const javaApi = 'http://192.168.11.2:8001';//柴
//  const javaApi = 'http://127.0.0.1:8001';//晏