Merge remote-tracking branch 'origin/master'
| | |
| | | page:"/performanceShift/page",//绩效管理-班次-分页查询 |
| | | update:"/performanceShift/update",//绩效管理-班次-班次状态修改 |
| | | pageYear:"/performanceShift/pageYear",//绩效管理-班次-年份分页查询 |
| | | export:"/performanceShift/export",//绩效管理-班次-导出 |
| | | } |
| | | |
| | | const auxiliaryWorkingHours = { |
| | |
| | | <el-col class="search_thing" :span="6"> |
| | | <div class="search_label"><span class="required-span">* </span>来样方式:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" clearable v-model="addObj.formType" :readonly="active>1"></el-input> |
| | | <el-select v-model="addObj.formType" size="small" :disabled="active>1" style="width: 100%;"> |
| | | <el-option v-for="(a,ai) in formType" :key="ai" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.standardMethodListId" :disabled="scope.row.model==null||active>1" |
| | | placeholder="检验标准" size="small" :loading="methodLoad" @change="(value)=>methodChange(value, scope.row)" |
| | | @focus="methodFocus" :readonly="active>1"> |
| | | @focus="methodFocus" :readonly="active>1" style="width: 100%;"> |
| | | <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | tell: '', |
| | | noLoading: false, |
| | | orderType: [], |
| | | filters: [] |
| | | filters: [], |
| | | formType: [] |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.selectStandardMethods() |
| | | this.selectEnumByCategoryForOrderType() |
| | | this.selectEnumByCategoryForSonLaboratory() |
| | | this.selectEnumByCategoryForSampleForm() |
| | | if (this.active != 1) { |
| | | // 查看/审核流程 |
| | | // 请求接口,回显数据 |
| | |
| | | this.addObj.sampleNum = this.sampleList.length |
| | | this.$nextTick(() => { |
| | | this.$refs.sampleTable.doLayout() |
| | | if(this.addObj.sampleNum>0){ |
| | | this.$refs.sampleTable.setCurrentRow(this.sampleList[0],true) |
| | | this.rowClick(this.sampleList[0]) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | |
| | | }, |
| | | activeStandardTree() { |
| | | let trees = this.selectTree.split(" - ") |
| | | if (trees.length < 4) { |
| | | this.$message.error('未选择样品') |
| | | if (trees.length < 5) { |
| | | this.$message.error('未选择型号') |
| | | return |
| | | } |
| | | this.addObj.factory = trees[0] |
| | |
| | | } |
| | | }) |
| | | }, |
| | | selectEnumByCategoryForSampleForm() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "来样方式" |
| | | }).then(res => { |
| | | this.formType = res.data |
| | | if(this.formType.length > 0){ |
| | | this.addObj.formType = this.formType[0].value |
| | | } |
| | | }) |
| | | }, |
| | | methodChange(val, row) { |
| | | if(val===null||val==='')return |
| | | this.getProductLoad = true |
| | |
| | | flex-direction: column; |
| | | flex-wrap: wrap; |
| | | width: 100%; |
| | | /* overflow-x: hidden; */ |
| | | overflow-x: scroll; |
| | | overflow-x: hidden; |
| | | /* overflow-x: scroll; */ |
| | | cursor: grab; |
| | | } |
| | | |
| | | .center-box:active{ |
| | | cursor: grabbing; |
| | | } |
| | | |
| | | .tables { |
| | |
| | | padding: 5px; |
| | | box-sizing: border-box; |
| | | overflow: hidden; |
| | | user-select: none; |
| | | } |
| | | |
| | | .content *{ |
| | | user-select: none; |
| | | } |
| | | |
| | |
| | | size="small">{{ item.templateName }}</el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | <div class="center-box"> |
| | | <div class="center-box" id="nav"> |
| | | <table border="1" class="tables" cellpadding="10" v-for="(item,index) in tableList" :key="index"> |
| | | <tbody> |
| | | <tr v-for="(m,i) in item.arr" :key="i"> |
| | |
| | | v-else-if="getInspectionValueType(n.i) == 4">/</span> |
| | | </template> |
| | | <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='结论'"> |
| | | <el-select v-if="(getInspectionValueType(n.i) == 2 || getInspectionValueType(n.i) == 5) && state==1" class="table_input" v-model="n.v.v" |
| | | @change="saveInsContext()"> |
| | | <el-select v-if="(getInspectionValueType(n.i) == 2 || getInspectionValueType(n.i) == 5) && state==1" |
| | | class="table_input" v-model="n.v.v" @change="saveInsContext()"> |
| | | <el-option label="合格" :value="1"></el-option> |
| | | <el-option label="不合格" :value="0"></el-option> |
| | | </el-select> |
| | |
| | | </el-drawer> |
| | | <el-drawer title="任务切换" :visible.sync="taskVisible" :size="500"> |
| | | <ValueTable class="value-table" ref="insOrderPlan" :url="$api.insOrderPlan.selectInsOrderPlanList" |
| | | :componentData="componentData" :key="upIndex" /> |
| | | :componentData="componentData" :key="upIndex" style="max-height: 100%;height: inherit;"/> |
| | | </el-drawer> |
| | | <el-dialog title="检验复核" :visible.sync="reviewDia" width="500px"> |
| | | <div class="body" style="display: flex;padding: 10px;" v-if="reviewDia"> |
| | |
| | | this.getInsStateDicts() |
| | | this.getComparisonList() |
| | | this.getAuthorizedPerson() |
| | | this.scrollInit() |
| | | }, |
| | | watch: { |
| | | id(val) { |
| | |
| | | }, |
| | | selectEnumByCategoryOfSelect(val) { |
| | | this.enumList = [] |
| | | if(val===undefined||val===null){ |
| | | if (val === undefined || val === null) { |
| | | return |
| | | } |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | |
| | | const mySet1 = new Set(); |
| | | this.tableLists = this.currentSample.insProduct.filter(m => { |
| | | let num0 = mySet1.size; |
| | | if (m.templateId != null) { |
| | | if (m.templateId != null&&m.template != null) { |
| | | mySet1.add(JSON.stringify({ |
| | | template: m.template, |
| | | templateId: m.templateId |
| | |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | 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; |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">实验室:</div> |
| | | <el-select v-model="componentData.entity.laboratory" placeholder="全部" size="small"> |
| | | <el-select v-model="componentData.entity.laboratory" placeholder="全部" size="small" @change="refreshTable()"> |
| | | <el-option v-for="item in laboratoryList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | <div class="search_thing"> |
| | | <div class="search_label">部门:</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="componentData.entity.department" placeholder="全部" size="small"> |
| | | <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> |
| | |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 24px); |
| | | padding: 20px; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <div class="search_thing" style="width: 200px;"> |
| | | <div class="search_label">星期:</div> |
| | | <el-select v-model="componentData.entity.laboratory" placeholder="全部" size="small"> |
| | | <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> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">时间范围:</div> |
| | | <div class="search_label" style="width: 90px;">时间范围:</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | style="width: 100%;" |
| | |
| | | type="daterange" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | end-placeholder="结束日期" @change="refreshTable()"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="search_thing" style="width: 200px;"> |
| | | <div class="search_label" >名字:</div> |
| | | <el-input size="small" placeholder="请输入" clearable |
| | | v-model="componentData.entity.number"></el-input> |
| | | v-model="componentData.entity.number" @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"> |
| | | <el-select v-model="componentData.entity.laboratory" 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> |
| | |
| | | <template> |
| | | <div class="work-time-statistics"> |
| | | 工时统计 |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">日期:</div> |
| | | <div class="search_input" style="display: flex;align-items: center;"> |
| | | <el-date-picker |
| | | v-model="componentData.entity.laboratory" |
| | | type="month" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="选择月" size="small" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">员工:</div> |
| | | <el-select v-model="componentData.entity.laboratory" placeholder="全部" size="small" @change="refreshTable()"> |
| | | <el-option v-for="item in personList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <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> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;width: 100px;"> |
| | | <el-button size="small" @click="refresh()">重 置</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button> |
| | | </div> |
| | | <el-button size="small" type="primary" style="position: absolute;right: 50px;" @click="handleDown">导 出</el-button> |
| | | <el-button size="small" type="primary" style="position: absolute;right: 120px;" @click="handleUp" v-show="currentTable == 'value0'">导 入</el-button> |
| | | </div> |
| | | <el-radio-group v-model="currentTable" size="small" :key="'111'" style="margin-top: 10px;"> |
| | | <el-radio-button label="value0"> |
| | | 原始工时 |
| | | </el-radio-button> |
| | | <el-radio-button label="value1"> |
| | | 修正工时 |
| | | </el-radio-button> |
| | | </el-radio-group> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable0" |
| | | v-show="currentTable == 'value0'" |
| | | :url="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" |
| | | :componentData="componentData" :inputUrl="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :downUrl="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :key="upIndex" /> |
| | | <ValueTable ref="ValueTable1" |
| | | v-show="currentTable == 'value1'" |
| | | :url="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" |
| | | :componentData="componentData0" :key="upIndex" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../../tool/value-table.vue' |
| | | export default { |
| | | components: { |
| | | ValueTable |
| | | }, |
| | | data () { |
| | | return{ |
| | | |
| | | componentData: { |
| | | entity: { |
| | | number: null, |
| | | department: null, |
| | | laboratory: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | 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 |
| | | } |
| | | }, |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | | }, |
| | | componentData0: { |
| | | entity: { |
| | | number: null, |
| | | department: null, |
| | | laboratory: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | 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 |
| | | } |
| | | }, |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | | }, |
| | | upIndex:0, |
| | | weekList:[], |
| | | personList:[], |
| | | currentTable:'value0' |
| | | } |
| | | }, |
| | | mounted(){ |
| | | this.getUsers() |
| | | }, |
| | | methods: { |
| | | refresh(){}, |
| | | refreshTable(){}, |
| | | getUsers(){ |
| | | this.$axios.post(this.$api.user.selectUserList, { |
| | | page: { |
| | | current: -1, |
| | | size: -1, |
| | | }, |
| | | entity: { |
| | | name: null, |
| | | } |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | let arr = res.data.body.records |
| | | this.personList = arr |
| | | }) |
| | | }, |
| | | handleDown(){ |
| | | if(this.currentTable == 'value0'){ |
| | | this.$refs.ValueTable0.downFile(false) |
| | | }else{ |
| | | this.$refs.ValueTable1.downFile(false) |
| | | } |
| | | }, |
| | | handleUp(){ |
| | | this.$refs.ValueTable0.openUpload() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | <style scoped> |
| | | .work-time-statistics{ |
| | | height: 100%; |
| | | } |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 270px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 60px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 60px); |
| | | } |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 40px - 25px); |
| | | padding: 20px; |
| | | } |
| | | </style> |
| | |
| | | <div class="scroll-pagination" ref="content" @scroll="onScroll"> |
| | | <slot></slot> |
| | | <el-button |
| | | v-if="isLoding" |
| | | v-show="isLoding" |
| | | type="text" |
| | | style="display: flex; margin: 0 auto; color: #909399" |
| | | ><i class="el-icon-loading" style="font-size:20px"></i |
| | | ></el-button> |
| | | <el-button |
| | | type="text" |
| | | v-if="finishLoding" |
| | | v-show="finishLoding" |
| | | style="display: flex; margin: 0 auto; color: #909399" |
| | | >已经没有更多啦~</el-button |
| | | > |
| | |
| | | finishLoding: { |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | list:{ |
| | | type:Array, |
| | | default:()=>[] |
| | | } |
| | | }, |
| | | watch: { |
| | | list:{ |
| | | deep:true, |
| | | handler(){ |
| | | this.isLoding = false |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | }, |
| | | created(){ |
| | | // 防抖 |
| | | this.onScroll = this.debounce(this.scrollFn,2000); |
| | | this.onScroll = this.debounce(this.scrollFn,500); |
| | | // 节流 |
| | | // this.onScroll = this.throttle(this.scrollFn,1000); |
| | | }, |
| | |
| | | this.isLoding = true |
| | | setTimeout(() => { |
| | | this.$emit('load') |
| | | this.isLoding = false |
| | | }, 1000) |
| | | }, 500) |
| | | }, |
| | | debounce(func, delay) { |
| | | let timer = null; |
| | |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .el-table__empty-text{ |
| | | text-align: left; |
| | | width: 100%; |
| | | display: inline-block; |
| | | margin-left: 200px; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | |
| | | children:[] |
| | | }, |
| | | { |
| | | value:'额外类型', |
| | | label:'额外类型', |
| | | value:'报告类型', |
| | | label:'报告类型', |
| | | children:null |
| | | }, |
| | | ], |
| | |
| | | </div> |
| | | </el-image> |
| | | <!-- 表单 --> |
| | | <el-form :label-position="labelPosition" :model="formData" label-width="100px"> |
| | | <el-form-item label="仪器名称:"> |
| | | <el-form :label-position="labelPosition" :model="formData" label-width="120px"> |
| | | <el-form-item label="仪器名称:" required> |
| | | <el-input :disabled="isUp" v-model="formData.deviceName" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="仪器名称EN:"> |
| | | <el-form-item label="仪器名称EN:" required> |
| | | <el-input :disabled="isUp" v-model="formData.enDeviceName" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="规格型号:"> |
| | | <el-form-item label="规格型号:" required> |
| | | <el-input :disabled="isUp" v-model="formData.specificationModel" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="生产厂家:"> |
| | |
| | | <el-form-item label="出厂编号:"> |
| | | <el-input :disabled="isUp" v-model="formData.factoryNo" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="管理编号:"> |
| | | <el-form-item label="管理编号:" required> |
| | | <el-input :disabled="isUp" v-model="formData.managementNumber" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="购置日期:"> |
| | |
| | | format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="选择日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="启用日期:"> |
| | | <el-form-item label="启用日期:" required> |
| | | <el-date-picker :disabled="isUp" style="width:100%" v-model="formData.activationDate" type="date" |
| | | format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="选择日期"> |
| | | </el-date-picker> |
| | |
| | | <el-form-item label="单价(万元):"> |
| | | <el-input :disabled="isUp" v-model="formData.unitPrice" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="当前状态:"> |
| | | <el-form-item label="当前状态:" required> |
| | | <el-select :disabled="isUp" v-model="formData.deviceStatus" placeholder="请选择" size="small" style="width:100%"> |
| | | <el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="校准周期(月):"> |
| | | <el-form-item label="校准周期(月):" required> |
| | | <el-input :disabled="isUp" v-model="formData.calibrationDate" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="图片:"> |
| | |
| | | </div> |
| | | </el-image> |
| | | <!-- 表单 --> |
| | | <el-form :label-position="labelPosition" :model="formData2" label-width="100px"> |
| | | <el-form-item label="仪器名称:"> |
| | | <el-form :label-position="labelPosition" :model="formData2" label-width="120px"> |
| | | <el-form-item label="仪器名称:" required> |
| | | <el-input v-model="formData2.deviceName" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="仪器名称EN:"> |
| | | <el-form-item label="仪器名称EN:" required> |
| | | <el-input v-model="formData2.enDeviceName" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="规格型号:"> |
| | | <el-form-item label="规格型号:" required> |
| | | <el-input v-model="formData2.specificationModel" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="生产厂家:"> |
| | |
| | | <el-form-item label="出厂编号:"> |
| | | <el-input v-model="formData2.factoryNo" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="管理编号:"> |
| | | <el-form-item label="管理编号:" required> |
| | | <el-input v-model="formData2.managementNumber" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="购置日期:"> |
| | |
| | | format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="选择日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="启用日期:"> |
| | | <el-form-item label="启用日期:" required> |
| | | <el-date-picker style="width:100%" v-model="formData2.activationDate" type="date" |
| | | format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="选择日期"> |
| | | </el-date-picker> |
| | |
| | | <el-form-item label="单价(万元):"> |
| | | <el-input v-model="formData2.unitPrice" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="当前状态:"> |
| | | <el-form-item label="当前状态:" required> |
| | | <el-select v-model="formData2.deviceStatus" placeholder="请选择" size="small" style="width:100%"> |
| | | <el-option v-for="item in deviceStatusList" :key="item.id" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="校准周期(月):"> |
| | | <el-form-item label="校准周期(月):" required> |
| | | <el-input v-model="formData2.calibrationDate" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="图片:"> |
| | |
| | | } |
| | | }, |
| | | submitForm() { |
| | | if(!this.formData.deviceName){ |
| | | this.$message.error('未输入仪器名称') |
| | | return |
| | | } |
| | | if(!this.formData.enDeviceName){ |
| | | this.$message.error('未输入仪器名称EN') |
| | | return |
| | | } |
| | | if(!this.formData.specificationModel){ |
| | | this.$message.error('未输入规格型号') |
| | | return |
| | | } |
| | | if(!this.formData.managementNumber){ |
| | | this.$message.error('未输入管理编号') |
| | | return |
| | | } |
| | | if(!this.formData.activationDate){ |
| | | this.$message.error('未输入启用日期') |
| | | return |
| | | } |
| | | if(!this.formData.deviceStatus){ |
| | | this.$message.error('未选择当前状态') |
| | | return |
| | | } |
| | | if(!this.formData.calibrationDate){ |
| | | this.$message.error('未输入校准周期(月)') |
| | | return |
| | | } |
| | | delete this.formData.createTime |
| | | delete this.formData.updateTime |
| | | delete this.formData.createUser |
| | |
| | | }) |
| | | }, |
| | | submitForm2() { |
| | | if(!this.formData2.deviceName){ |
| | | this.$message.error('未输入仪器名称') |
| | | return |
| | | } |
| | | if(!this.formData2.enDeviceName){ |
| | | this.$message.error('未输入仪器名称EN') |
| | | return |
| | | } |
| | | if(!this.formData2.specificationModel){ |
| | | this.$message.error('未输入规格型号') |
| | | return |
| | | } |
| | | if(!this.formData2.managementNumber){ |
| | | this.$message.error('未输入管理编号') |
| | | return |
| | | } |
| | | if(!this.formData2.activationDate){ |
| | | this.$message.error('未输入启用日期') |
| | | return |
| | | } |
| | | if(!this.formData2.deviceStatus){ |
| | | this.$message.error('未选择当前状态') |
| | | return |
| | | } |
| | | if(!this.formData2.calibrationDate){ |
| | | this.$message.error('输入校准周期(月)') |
| | | return |
| | | } |
| | | this.upLoad2 = true; |
| | | this.formData2.insProductIds = this.formData2.insProductIds.join() |
| | | this.$axios.post(this.$api.deviceScope.addDeviceParameter, this.formData2, { |
| | |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">重 置</el-button> |
| | | <el-button size="small" type="primary" @click="currentPage= 1,list=[],finishLoding = false,refreshTable()">查 询</el-button> |
| | | <el-button size="small" type="primary" @click="currentPage= 1,keyMap = {},list=[],finishLoding = false,refreshTable()">查 询</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table" v-loading="loading"> |
| | | <scroll-pagination @load="refreshTable" :finishLoding="finishLoding"> |
| | | <scroll-pagination @load="refreshTable" :finishLoding="finishLoding" :list="list"> |
| | | <ul class="card"> |
| | | <li v-for="(m,i) in list" :key="i"> |
| | | <el-image class="img" :src="javaApi+'/img/'+m.imageUpload"> |
| | |
| | | pageSize: 16, // 一页16条 |
| | | total: '', |
| | | loading: true, // 组件loading的展示,默认为true |
| | | finishLoding: false // 加载完成,显示已经没有更多了 |
| | | finishLoding: false, // 加载完成,显示已经没有更多了 |
| | | keyMap: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.selectEnumByCategory() |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.refreshTable(); |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | | const key = `_${this.currentPage}` |
| | | const value = this.keyMap[key] |
| | | // 如果value存在,表示缓存有值,那么阻止请求 |
| | | if(value) { |
| | | return |
| | | } |
| | | // value不存在,表示第一次请求,设置占位 |
| | | this.keyMap[key] = 'temp' |
| | | if(this.currentPage==1){ |
| | | this.loading = true |
| | | } |
| | |
| | | }) |
| | | }, |
| | | refresh() { |
| | | this.keyMap = {}; |
| | | this.currentPage= 1; |
| | | this.list=[]; |
| | | this.finishLoding = false; |
| | |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">重 置</el-button> |
| | | <el-button size="small" type="primary" @click="currentPage= 1,list=[],finishLoding = false,refreshTable()">查 询</el-button> |
| | | <el-button size="small" type="primary" @click="currentPage= 1,list=[],finishLoding = false,keyMap = {},refreshTable()">查 询</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table" v-loading="loading"> |
| | | <scroll-pagination @load="refreshTable" :finishLoding="finishLoding"> |
| | | <scroll-pagination @load="refreshTable" :finishLoding="finishLoding" :list="list"> |
| | | <ul class="card" style="margin-top: 10px;"> |
| | | <li v-for="(m,i) in list" :key="i"> |
| | | <el-image style="width: 80px; |
| | |
| | | pageSize: 16, // 一页16条 |
| | | total: '', |
| | | loading: true, // 组件loading的展示,默认为true |
| | | finishLoding: false // 加载完成,显示已经没有更多了 |
| | | finishLoding: false, // 加载完成,显示已经没有更多了 |
| | | keyMap: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.refreshTable(); |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | | const key = `_${this.currentPage}` |
| | | const value = this.keyMap[key] |
| | | // 如果value存在,表示缓存有值,那么阻止请求 |
| | | if(value) { |
| | | return |
| | | } |
| | | // value不存在,表示第一次请求,设置占位 |
| | | this.keyMap[key] = 'temp' |
| | | if(this.currentPage==1){ |
| | | this.loading = true |
| | | } |
| | |
| | | }) |
| | | }, |
| | | refresh() { |
| | | this.keyMap = {}; |
| | | this.currentPage= 1; |
| | | this.list=[]; |
| | | this.finishLoding = false; |
| | |
| | | multiple: true |
| | | }, |
| | | }, |
| | | requiredAdd: ['code', 'name', 'structureTestObjectId', 'isProduct', 'isUse', 'nameEn'], |
| | | requiredUp: ['code', 'name', 'structureTestObjectId', 'isProduct', 'isUse', 'nameEn'] |
| | | requiredAdd: ['code', 'name', 'isProduct', 'isUse', 'nameEn'], |
| | | requiredUp: ['code', 'name', 'isProduct', 'isUse', 'nameEn'] |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">委托人:</div> |
| | | <div class="search_label">委托单位:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable |
| | | v-model="componentData.entity.name" @keyup.enter.native="refreshTable()"></el-input></div> |
| | | v-model="componentData.entity.company" @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">重 置</el-button> |
| | |
| | | return { |
| | | componentData: { |
| | | entity: { |
| | | name: null, |
| | | company: null, |
| | | dates: null, |
| | | orderBy: { |
| | | field: 'id,ins_sample_id', |
| | |
| | | .ins-order-plan-main .el-form-item__label{ |
| | | color: #000; |
| | | } |
| | | |
| | | .ins-order-plan-main .el-table th.el-table__cell>.cell{ |
| | | height: 46px; |
| | | line-height: 30px; |
| | | } |
| | | </style> |
| | | <template> |
| | | <div class="ins-order-plan-main"> |
| | |
| | | font: '复核', |
| | | type: 'text', |
| | | method: 'handleReview', |
| | | /* disabFun: (row, index) => { |
| | | disabFun: (row, index) => { |
| | | return row.userId == null || row.insState != 3 || row.verifyUser != 1 |
| | | } */ |
| | | } |
| | | }, { |
| | | id: '', |
| | | font: '认领', |
| | |
| | | }, |
| | | // 下载报告 |
| | | download(row) { |
| | | // console.log(row); |
| | | let url = row.url; |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + url; |
| | | link.target = '_blank'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | let url = row.urlS?row.urlS:row.url; |
| | | if(url){ |
| | | url = url.split('.')[0]+'.pdf' |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + url; |
| | | link.target = '_blank'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | } |
| | | }, |
| | | // 审核 |
| | | handleVerify(row) { |
| | |
| | | <style scoped> |
| | | .standard { |
| | | padding: 20px 0; |
| | | padding: 10px 0; |
| | | display: flex; |
| | | } |
| | | |
| | | .left { |
| | | width: 270px; |
| | | height: calc(100% - 40px - 30px); |
| | | height: calc(100% - 40px - 10px); |
| | | background-color: white; |
| | | padding: 15px; |
| | | } |
| | |
| | | } |
| | | |
| | | .right .title { |
| | | height: 50px; |
| | | line-height: 50px; |
| | | height: 34px; |
| | | line-height: 34px; |
| | | padding: 0 10px; |
| | | background-color: white; |
| | | } |
| | |
| | | |
| | | .product_table { |
| | | border-top: 1px solid #ebeef5; |
| | | height: calc(100% - 275px); |
| | | height: calc(100% - 235px); |
| | | margin-top: 5px; |
| | | background-color: white; |
| | | user-select: none; |
| | | } |
| | | |
| | | .product_table .el-table { |
| | | height: 100%; |
| | | height: calc(100% - 35px) !important; |
| | | } |
| | | |
| | | .sort { |
| | | width: 80% !important; |
| | | overflow: hidden; |
| | | } |
| | | >>>.el-table__body-wrapper{ |
| | | height: calc(100% - 46px) !important; |
| | | } |
| | | >>>.header-class{ |
| | | height: 40px !important; |
| | | } |
| | | >>>.header-class th.el-table__cell>.cell{ |
| | | line-height: 20px !important; |
| | | padding-top: 0 !important; |
| | | padding-bottom: 0 !important; |
| | | } |
| | | >>>.el-table__row{ |
| | | height: 35px !important; |
| | | } |
| | | </style> |
| | | <style> |
| | |
| | | <div class="right"> |
| | | <el-row class="title"> |
| | | <el-col :span="24" style="font-size: 14px;color: #999;">{{selectTree}}</el-col> |
| | | <!-- <el-col :span="selectTree==''?24:14" style="text-align: right;" v-if="selectTree!=''"> --> |
| | | <!-- <el-button size="small" type="primary" @click="addStandardDia = true" |
| | | v-if="addStandardMethod">新增标准</el-button> |
| | | <el-button size="small" type="primary" @click="addProductDia = true" v-if="addStandardProduct">新增项目</el-button> |
| | | <el-button size="small" @click="delStandardProductByIds" v-if="delStandardProduct"> |
| | | <i class="el-icon-delete" style="color: #3A7BFA;"></i> |
| | | <span style="color: #3A7BFA;">删除</span> |
| | | </el-button> --> |
| | | <!-- </el-col> --> |
| | | </el-row> |
| | | <el-row class="standard_table" v-loading="tableLoad"> |
| | | <el-table class="el-table" :data="standardList" style="width: 100%;" height="220" tooltip-effect="dark" |
| | | highlight-current-row @row-click="rowClick" ref="standard"> |
| | | <el-table class="el-table" :data="standardList" style="width: 100%;height: 220px !important;" height="220" tooltip-effect="dark" |
| | | highlight-current-row @row-click="rowClick" ref="standard" header-row-class-name="header-class"> |
| | | <el-table-column prop="code" label="标准编号" show-overflow-tooltip width="200"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: red;font-size: 14px;">{{scope.row['code']}}</span> |
| | |
| | | </el-row> |
| | | <el-row class="product_table" v-loading="tableLoad2"> |
| | | <el-table :data="productList" ref="productTable" style="width: 100%;" height="100%" tooltip-effect="dark" stripe |
| | | :fit="true" border @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" |
| | | @select="upProductSelect" @select-all="handleAll"> |
| | | <el-table-column type="selection" width="65"> |
| | | :fit="true" border |
| | | @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" |
| | | @select="upProductSelect" |
| | | @select-all="handleAll" |
| | | class="productTable" |
| | | header-row-class-name="header-class"> |
| | | <el-table-column type="selection" width="50" > |
| | | </el-table-column> |
| | | <el-table-column prop="model" label="型号" min-width="120" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="model" label="型号" min-width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="inspectionItem" label="检验项" min-width="140" show-overflow-tooltip></el-table-column> |
| | | <!-- <el-table-column prop="inspectionItemClassify" label="检验项类型" width="120" show-overflow-tooltip></el-table-column> --> |
| | | <el-table-column prop="inspectionItemSubclass" label="检验项子项" min-width="140" |
| | |
| | | <el-table-column prop="manHourGroup" label="工时分组" width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="templateId" label="模板" width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.templateId" size="small" @change="(value)=>upStandardProductListOfTemplate(value,scope.row.id)"> |
| | | <el-select v-model="scope.row.templateId" size="small" filterable |
| | | @change="(value)=>upStandardProductListOfTemplate(value,scope.row.id)"> |
| | | <el-option v-for="(a, ai) in templateList" :key="ai" :label="a.name" :value="a.id"></el-option> |
| | | </el-select> |
| | | </template> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | | style="position: absolute;right: 16px;bottom: 1px;" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="currentPage" |
| | | :page-size="pageSize" |
| | | layout="total, prev, pager, next, jumper" |
| | | :total="total"> |
| | | </el-pagination> |
| | | </el-row> |
| | | </div> |
| | | <el-dialog title="分类添加" :visible.sync="addDia" width="400px"> |
| | |
| | | <el-button type="primary" @click="addStandardTree" :loading="addLoad">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="新增标准" :visible.sync="addStandardDia" width="400px"> |
| | | <!-- <el-dialog title="新增标准" :visible.sync="addStandardDia" width="400px"> |
| | | <div class="body"> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | |
| | | <el-button @click="addStandardDia = false">取 消</el-button> |
| | | <el-button type="primary" @click="addStandardMethodList" :loading="addLoad2">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="新增项目" :visible.sync="addProductDia" width="70%"> |
| | | </el-dialog> --> |
| | | <!-- <el-dialog title="新增项目" :visible.sync="addProductDia" width="70%"> |
| | | <div class="body" style="height: 60vh;" v-if="addProductDia"> |
| | | <ValueTable ref="ValueTable" :url="$api.capacityScope.selectItemParameterList" :componentData="componentData" /> |
| | | </div> |
| | |
| | | <el-button @click="addProductDia = false">取 消</el-button> |
| | | <el-button type="primary" @click="addStandardProductDo" :loading="addLoad3">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </el-dialog> --> |
| | | <el-dialog title="区间设置" :visible.sync="sectionUpDia" width="70%"> |
| | | <div class="body" style="padding: 5px 0;"> |
| | | <el-table :data="sectionList" border style="width: 100%" height="350px"> |
| | |
| | | sectionLoad: false, |
| | | sectionRow: null, |
| | | sectionList: [], |
| | | templateList: [] |
| | | templateList: [], |
| | | total:0, |
| | | pageSize:100, |
| | | currentPage:1, |
| | | standardId: 0 |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }, |
| | | rowClick(row, column, event) { |
| | | this.tableLoad2 = true |
| | | this.standardId = row.id |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductListByMethodId, { |
| | | id: row.id, |
| | | tree: this.selectTree |
| | | tree: this.selectTree, |
| | | page: this.currentPage |
| | | }).then(res => { |
| | | this.productList = res.data |
| | | this.productList = res.data.productList |
| | | this.total = res.data.total |
| | | setTimeout(() => { |
| | | this.productList.forEach(a => { |
| | | if (a.state == 1) this.toggleSelection(a) |
| | | }) |
| | | }, 300) |
| | | }, 200) |
| | | this.tableLoad2 = false |
| | | }) |
| | | }, |
| | |
| | | return ''; |
| | | }, |
| | | upProductSelect(selection, row) { |
| | | row.state = row.state == 1 ? 0 : 1 |
| | | row.state = (row.state == 1 ? 0 : 1) |
| | | this.$axios.post(this.$api.standardTree.upStandardProductList, { |
| | | id: row.id, |
| | | state: row.state |
| | |
| | | }, |
| | | handleAll(e) { |
| | | if (e.length > 0) { |
| | | this.productList.map(m => { |
| | | this.productList = this.productList.map(m => { |
| | | m.state = 0 |
| | | this.upProductSelect(null, m) |
| | | return m |
| | | }) |
| | | } else { |
| | | this.productList.map(m => { |
| | | this.productList = this.productList.map(m => { |
| | | m.state = 1 |
| | | this.upProductSelect(null, m) |
| | | return m |
| | | }) |
| | |
| | | this.templateList = res.data |
| | | }) |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.currentPage = val; |
| | | this.tableLoad2 = true |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductListByMethodId, { |
| | | id: this.standardId, |
| | | tree: this.selectTree, |
| | | page: val |
| | | }).then(res => { |
| | | this.productList = res.data.productList |
| | | setTimeout(() => { |
| | | this.productList.forEach(a => { |
| | | if (a.state == 1) this.toggleSelection(a) |
| | | }) |
| | | }, 200) |
| | | this.tableLoad2 = false |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button> |
| | | </div> |
| | | <div class="search_thing btns" style="padding-left: 30px;"> |
| | | <el-button size="small" type="primary" v-if="downPower">导 出</el-button> |
| | | <el-button size="small" type="primary" v-if="downPower" @click="handleDown" :loading="downLoading">导 出</el-button> |
| | | <el-button size="small" type="primary" @click="schedulingVisible = true" v-if="addPower">排 班</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="center" v-loading="pageLoading"> |
| | | <scroll-pagination @load="init" :finishLoding="finishLoding" v-show="query.month&&list.length>0" style="height: 100%;" :key="'123'"> |
| | | <scroll-pagination @load="init" :finishLoding="finishLoding" v-show="query.month&&list.length>0" style="height: 100%;" :key="'123'" :list="list"> |
| | | <div class="clearfix"> |
| | | <div class="fixed-left"> |
| | | <div class="content-title" style="padding-left: 16px;box-sizing: border-box;"> |
| | |
| | | <div class="user-pic">{{ item.name.charAt(0) }}</div> |
| | | <div class="user-info"> |
| | | <p style="font-size: 14px;color: #3A7BFA;line-height: 24px;">{{ item.name }}</p> |
| | | <p style="color: #999999;font-size: 12px;transform: scale(0.8) translateX(-20px);white-space: nowrap;width: 150px;overflow-x: show;">早: {{ item.day0 }}, 中: {{ item.day1 }}, 夜: {{ item.day2 }}, 休: {{ item.day3 }}, 假: {{ item.day4 }}</p> |
| | | <p style="color: #999999;font-size: 12px;transform: scale(0.8) translateX(-20px);white-space: nowrap;width: 150px;overflow-x: show;">早:{{ item.day0 }},中:{{ item.day1 }},夜:{{ item.day2 }},休:{{ item.day3 }},假:{{ item.day4 }},差:{{ item.day6 }}</p> |
| | | <p style="margin-top: 4px;"><span style="color: #999999;font-size: 12px;display: inline-block;transform: scale(0.8) translateX(-10px);">合计出勤: </span><span style="font-size: 16px; |
| | | color: #FF4902;">{{ query.month?item.monthlyAttendance |
| | | .totalAttendance:item.sidebarAnnualAttendance |
| | |
| | | <span class="month" style="position: absolute;top: 4px;" v-if="item.week=='周日'">{{ item.weekNum }}周</span> |
| | | <p style="height: 26px;position: absolute;bottom: 12px;"> |
| | | <span class="day">{{ item.day }}</span> |
| | | <span class="week">{{ item.week }}</span> |
| | | <span class="week">{{ item.week.charAt(1) }}</span> |
| | | </p> |
| | | </div> |
| | | </div> |
| | |
| | | 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}"> |
| | | <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',}"> |
| | | <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'}"> |
| | | <!-- <div class="work-box-left"> |
| | | <span>{{ getShiftByDic(m.shift) }}</span> |
| | | </div> --> |
| | | <el-dropdown trigger="click" placement="bottom" @command="e=>handleCommand(e,m)" :disabled="!downPower"> |
| | | <!-- <i class="el-icon-arrow-down el-icon--right" style="font-size: 20px;color: #fff;cursor: pointer;"></i> --> |
| | | <span style="cursor: pointer;">{{ getShiftByDic(m.shift) }}</span> |
| | | <span style="cursor: pointer;" :style="`opacity: ${getShiftByDic(m.shift)=='无'?0:1};`">{{ getShiftByDic(m.shift) }}</span> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item v-for="(n,j) in classType" :key="'h'+j" :command="n.value">{{ n.label }}</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | |
| | | </div> |
| | | </div> |
| | | </scroll-pagination> |
| | | <scroll-pagination @load="initYear" :finishLoding="finishLoding" v-show="!query.month&&yearList.length>0" style="width: 100%;" :key="'111'"> |
| | | <scroll-pagination @load="initYear" :finishLoding="finishLoding" v-show="!query.month&&yearList.length>0" style="width: 100%;" :key="'111'" :list="yearList"> |
| | | <div class="clearfix year-table"> |
| | | <div class="fixed-left"> |
| | | <div class="content-title" style="padding-left: 16px;box-sizing: border-box;"> |
| | |
| | | <div class="user-pic">{{ item.name.charAt(0) }}</div> |
| | | <div class="user-info"> |
| | | <p style="font-size: 14px;color: #3A7BFA;line-height: 24px;">{{ item.name }}</p> |
| | | <p style="color: #999999;font-size: 12px;transform: scale(0.8) translateX(-20px);white-space: nowrap;width: 150px;overflow-x: show;">早: {{ item.day0 }}, 中: {{ item.day1 }}, 夜: {{ item.day2 }}, 休: {{ item.day3 }}, 假: {{ item.day4 }}</p> |
| | | <p style="color: #999999;font-size: 12px;transform: scale(0.8) translateX(-20px);white-space: nowrap;width: 150px;overflow-x: show;">早:{{ item.day0 }},中:{{ item.day1 }},夜:{{ item.day2 }},休:{{ item.day3 }},假:{{ item.day4 }},差:{{ item.day6 }}</p> |
| | | <p style="margin-top: 4px;"><span style="color: #999999;font-size: 12px;display: inline-block;transform: scale(0.8) translateX(-10px);">合计出勤: </span><span style="font-size: 16px; |
| | | color: #FF4902;">{{ item.work_time }}天</span></p> |
| | | </div> |
| | |
| | | <div class="content-body-item" v-for="(m,i) in item.monthList" :key="'d'+i" :class="{hoverType:currentUserIndex==index}"> |
| | | <p style="color:rgb(153, 153, 153);font-size: 12px;">合计出勤:<span style="font-size: 14px;color:#000">{{ m.totalMonthAttendance }}</span></p> |
| | | <p style="color:rgb(153, 153, 153);font-size: 12px;"> |
| | | 早: {{ m.day0 }}, 中: {{ m.day1 }}, 夜: {{ m.day2 }}, 休: {{ m.day3 }}, 假: {{ m.day4 }} |
| | | 早:{{ m.day0 }},中:{{ m.day1 }},夜:{{ m.day2 }},休:{{ m.day3 }},假:{{ m.day4 }},差:{{ m.day6 }} |
| | | </p> |
| | | </div> |
| | | </div> |
| | |
| | | pageLoading: false, // 组件loading的展示,默认为true |
| | | finishLoding: false, // 加载完成,显示已经没有更多了 |
| | | monthList:[], |
| | | yearList:[] |
| | | yearList:[], |
| | | downLoading:false, |
| | | keyMap:{}, |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | refresh(){ |
| | | this.list = []; |
| | | this.yearList = [] |
| | | this.keyMap = {}; |
| | | this.currentPage = 1 |
| | | this.query = { |
| | | userName:'', |
| | |
| | | } |
| | | }, |
| | | refreshTable(){ |
| | | this.keyMap = {}; |
| | | this.currentPage = 1 |
| | | if(this.query.month){ |
| | | this.list = []; |
| | |
| | | } |
| | | }, |
| | | init(){ |
| | | const key = `_${this.currentPage}` |
| | | const value = this.keyMap[key] |
| | | // 如果value存在,表示缓存有值,那么阻止请求 |
| | | if(value) { |
| | | return |
| | | } |
| | | // value不存在,表示第一次请求,设置占位 |
| | | this.keyMap[key] = 'temp' |
| | | if(this.currentPage==1){ |
| | | this.pageLoading = true |
| | | } |
| | |
| | | }) |
| | | }, |
| | | initYear(){ |
| | | const key = `_${this.currentPage}` |
| | | const value = this.keyMap[key] |
| | | // 如果value存在,表示缓存有值,那么阻止请求 |
| | | if(value) { |
| | | return |
| | | } |
| | | // value不存在,表示第一次请求,设置占位 |
| | | this.keyMap[key] = 'temp' |
| | | // pageYear |
| | | if(this.currentPage==1){ |
| | | this.pageLoading = true |
| | |
| | | this.refresh() |
| | | }) |
| | | }, |
| | | handleDown(){ |
| | | let year = this.query.year.getFullYear() |
| | | let time = ''; |
| | | if(this.query.month){ |
| | | let month = this.query.month>9?this.query.month:'0'+this.query.month |
| | | time = year+'-'+month+'-01 00:00:00' |
| | | }else{ |
| | | time = year+'-01-01 00:00:00' |
| | | } |
| | | this.downLoading = true |
| | | this.$axios.get(this.$api.performanceShift.export+`?time=${time}&userName=${this.query.userName}&laboratory=${this.query.laboratory}&isMonth=${this.query.month?true:false}`,{responseType: 'blob'}).then(res => { |
| | | this.$message.success('下载成功') |
| | | this.downLoading = false |
| | | const blob = new Blob([res], { |
| | | type: 'application/force-download' |
| | | }) |
| | | let fileName=""; |
| | | if(this.query.month){ |
| | | fileName = year +'-'+this.query.month+' 班次信息' |
| | | }else{ |
| | | fileName = year+' 班次汇总' |
| | | } |
| | | 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) |
| | | }) |
| | | }, |
| | | selectEnumByCategory() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "班次类型" |
| | |
| | | if(obj){ |
| | | return obj.label |
| | | } |
| | | return '未排班' |
| | | return '无' |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | .content-title-item{ |
| | | height: 100%; |
| | | width: 60px; |
| | | width: 50px; |
| | | flex-shrink: 0; |
| | | border-bottom: 1px solid #EEEEEE; |
| | | box-sizing: border-box; |
| | |
| | | } |
| | | .content-body-item{ |
| | | height: 70px; |
| | | width: 60px; |
| | | width: 50px; |
| | | flex-shrink: 0; |
| | | font-size: 12px; |
| | | box-sizing: border-box; |
| | | padding: 4px; |
| | | border-right: 1px solid #EEEEEE; |
| | |
| | | .work-box.type4 span{ |
| | | color: #F56C6C !important; |
| | | } |
| | | .work-box.type5{ |
| | | background: #ff46c145; |
| | | color: #ff46c0 !important; |
| | | } |
| | | .work-box.type5 span{ |
| | | color: #ff46c0 !important; |
| | | } |
| | | .work-box.type6{ |
| | | background: #00036418; |
| | | color: #000464 !important; |
| | | } |
| | | .work-box.type6 span{ |
| | | color: #000464 !important; |
| | | } |
| | | /* .el-icon-arrow-down::before{ |
| | | color: #c6c4c4; |
| | | } */ |
| | |
| | | }, |
| | | data() { |
| | | return{ |
| | | currentComponent:'workTimeConfig' |
| | | currentComponent:'workTimeStatistics' |
| | | } |
| | | } |
| | | } |
| | |
| | | text-align: left; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | >>>.el-calendar-day span{ |
| | | display: inline-block; |
| | | width: 30px; |
| | | height: 30px; |
| | | line-height: 30px; |
| | | text-align: center; |
| | | border-radius: 4px; |
| | | } |
| | | >>>.is-selected{ |
| | | background: transparent !important; |
| | | } |
| | | >>>.is-selected .el-calendar-day{ |
| | | background: transparent !important; |
| | | } |
| | | >>>.is-selected .el-calendar-day span{ |
| | | background: #3A7BFA !important; |
| | | color: #fff !important; |
| | | } |
| | | >>>.el-calendar-day:hover{ |
| | | background: transparent; |
| | | } |
| | | >>>.el-calendar-day span:hover{ |
| | | background: #3A7BFA !important; |
| | | color: #fff !important; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | |
| | | <img src="../../../static/img/index-0.svg" alt=""> |
| | | </div> |
| | | <div class="mun"> |
| | | <p style="font-size: 20px;">254</p> |
| | | <p style="font-size: 20px;">0</p> |
| | | <p style="font-size: 14px;margin-bottom: 10px;">我的待办</p> |
| | | </div> |
| | | </div> |
| | |
| | | <img src="../../../static/img/index-1.svg" alt=""> |
| | | </div> |
| | | <div class="mun"> |
| | | <p style="font-size: 20px;">254</p> |
| | | <p style="font-size: 20px;">0</p> |
| | | <p style="font-size: 14px;margin-bottom: 10px;">已办事宜</p> |
| | | </div> |
| | | </div> |
| | |
| | | <img src="../../../static/img/index-2.svg" alt=""> |
| | | </div> |
| | | <div class="mun"> |
| | | <p style="font-size: 20px;">254</p> |
| | | <p style="font-size: 20px;">0</p> |
| | | <p style="font-size: 14px;margin-bottom: 10px;">剩余待办</p> |
| | | </div> |
| | | </div> |
| | |
| | | <img src="../../../static/img/index-3.svg" alt=""> |
| | | </div> |
| | | <div class="mun"> |
| | | <p style="font-size: 20px;">254</p> |
| | | <p style="font-size: 20px;">0</p> |
| | | <p style="font-size: 14px;margin-bottom: 10px;">近期事宜</p> |
| | | </div> |
| | | </div> |
| | |
| | | <span> |
| | | {{ data.day.split('-').slice(2)+'' }} |
| | | </span> |
| | | <el-badge v-if="data.isSelected" is-dot class="item"> |
| | | </el-badge> |
| | | <!-- <el-badge v-if="data.isSelected" is-dot class="item"> |
| | | </el-badge> --> |
| | | </template> |
| | | </el-calendar> |
| | | </div> |
| | |
| | | <div class="tab-item" style="cursor: pointer;" :class="{active:currentIndex==5}" @click="currentIndex=5">通知通告</div> |
| | | </div> |
| | | <div class="right-3-list" v-loading="listLoading"> |
| | | <scroll-pagination @load="getList" :finishLoding="finishLoding"> |
| | | <scroll-pagination @load="getList" :finishLoding="finishLoding" :list="list"> |
| | | <div class="list3-item" v-for="(m,i) in list" :key="i"> |
| | | <div class="list3-item-title"> |
| | | <img src="../../../static/img/index-tip.svg" alt=""> |
| | |
| | | pageSize: 8, // 一页7条 |
| | | total: null, |
| | | listLoading: true, // 组件loading的展示,默认为true |
| | | finishLoding: false // 加载完成,显示已经没有更多了 |
| | | finishLoding: false, // 加载完成,显示已经没有更多了 |
| | | timer:null, |
| | | keyMap:{}, |
| | | } |
| | | }, |
| | | watch:{ |
| | |
| | | this.getScheduleByMe() |
| | | }, |
| | | currentIndex(){ |
| | | this.keyMap = {} |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.getList(); |
| | |
| | | setInterval(() => { |
| | | this.nowTime() |
| | | }, 1000) |
| | | this.init(); |
| | | this.weekdays = this.getWeekdaysForNextWeek() |
| | | this.getScheduleByMe() |
| | | this.init(); |
| | | this.currentPage = 1; |
| | | this.keyMap = {} |
| | | this.list = []; |
| | | this.getList(); |
| | | this.getScheduleByMe() |
| | | this.timer&&clearInterval(this.timer) |
| | | this.timer = setInterval(() => { |
| | | this.init(); |
| | | this.currentPage = 1; |
| | | this.keyMap = {} |
| | | this.list = []; |
| | | this.getList(); |
| | | this.getScheduleByMe() |
| | | },1000*60*10) |
| | | }, |
| | | methods: { |
| | | getList(){ |
| | | const key = `_${this.currentPage}` |
| | | const value = this.keyMap[key] |
| | | // 如果value存在,表示缓存有值,那么阻止请求 |
| | | if(value) { |
| | | return |
| | | } |
| | | // value不存在,表示第一次请求,设置占位 |
| | | this.keyMap[key] = 'temp' |
| | | if(this.currentPage==1){ |
| | | this.listLoading = true |
| | | } |
| | |
| | | let weekdays = []; |
| | | for (let i = 0; i < 7; i++) { |
| | | let date = new Date(); |
| | | date.setDate(date.getDate() + i); // 今天之后的日子 |
| | | date.setDate(date.getDate() - i); // 今天之后的日子 |
| | | let day = date.getDay(); // 0-6 代表星期日到星期六 |
| | | weekdays.push(day); |
| | | } |
| | | weekdays.reverse() |
| | | weekdays = weekdays.map(m=>{ |
| | | let day ='' |
| | | switch (m) { |
| | |
| | | }) |
| | | }, |
| | | }, |
| | | deactivated(){ |
| | | this.timer&&clearInterval(this.timer) |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <div class="notice-detail-page"> |
| | | <div class="notice-detail-head"> |
| | | <h4 style="margin-bottom: 16px;">{{ noticeInfo.theme }} <el-tag style="margin-left: 10px;" :type="options.find(m=>m.value==noticeInfo.messageType).type" v-if="options.find(m=>m.value==noticeInfo.messageType)">{{ options.find(m=>m.value==noticeInfo.messageType).label }}</el-tag></h4> |
| | | <h4 style="margin-bottom: 16px;" v-if="noticeInfo.theme">{{ noticeInfo.theme }} <el-tag style="margin-left: 10px;" :type="options.find(m=>m.value==noticeInfo.messageType).type" v-if="options.find(m=>m.value==noticeInfo.messageType)">{{ options.find(m=>m.value==noticeInfo.messageType).label }}</el-tag></h4> |
| | | <p style="font-size: 12px;color: #999;margin-bottom: 20px;"> |
| | | <!-- <span>消息类型:审批 </span> --> |
| | | <span>发送人:{{ noticeInfo.createUser }} </span> |
| | |
| | | options:[] |
| | | } |
| | | }, |
| | | created(){ |
| | | this.noticeInfo = JSON.parse(sessionStorage.getItem("noticeInfo")); |
| | | }, |
| | | mounted(){ |
| | | this.noticeInfo = JSON.parse(sessionStorage.getItem("noticeInfo")); |
| | | this.noticeInfo = JSON.parse(localStorage.getItem("noticeInfo")); |
| | | this.$bus.$on("change", (msg) => { |
| | | this.noticeInfo = JSON.parse(msg); |
| | | console.log(this.noticeInfo); |
| | | sessionStorage.setItem("noticeInfo", msg); |
| | | localStorage.setItem("noticeInfo", msg); |
| | | }); |
| | | this.getTypeDicts() |
| | | }, |
| | |
| | | <style scoped> |
| | | .notice-detail-page{ |
| | | height: calc(100% - 30px); |
| | | overflow-y: auto; |
| | | padding: 16px 0; |
| | | } |
| | | .notice-detail-page::-webkit-scrollbar { |
| | | width: 0; |
| | | } |
| | | .notice-detail-head{ |
| | | background: #fff; |
| | |
| | | box-sizing: border-box; |
| | | padding: 8px 20px 20px; |
| | | background: rgba(0,0,0, 0.03); |
| | | box-shadow: 0 0 10px 10px #fff; |
| | | /* box-shadow: 0 0 10px 10px #fff; */ |
| | | border-radius: 4px; |
| | | height: calc(100% - 192px - 22px); |
| | | min-height: calc(100% - 192px - 22px); |
| | | } |
| | | .notice-detail-head-content div{ |
| | | border-radius: 8px; |
| | |
| | | } |
| | | |
| | | .notice-content{ |
| | | height: 100%; |
| | | height: 600px; |
| | | } |
| | | </style> |
| | |
| | | |
| | | //本地 |
| | | 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://10.20.102.168:8001';//张 |
| | | // const javaApi = 'http://172.20.10.3:8001';//姜 |
| | | // const javaApi = 'http://192.168.11.2:8001';//柴 |
| | | // const javaApi = 'http://114.132.189.42:1234';//测试服 |
| | |
| | | |
| | | .component_view { |
| | | height: calc(100vh - 84px); |
| | | width: calc(100% - 52px); |
| | | padding: 0 26px; |
| | | width: calc(100% - 40px); |
| | | padding: 0 20px; |
| | | background: rgb(245, 247, 251); |
| | | } |
| | | |
| | |
| | | <el-button type="primary" @click="handleEdit">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <notice ref="notice" /> |
| | | <notice ref="notice" @goNoticeDetail="checkForUnreadData()" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | </el-dropdown> |
| | | </div> |
| | | <div class="notice-content" v-loading="loading"> |
| | | <scroll-pagination @load="refresh" :finishLoding="finishLoding"> |
| | | <scroll-pagination @load="refresh" :finishLoding="finishLoding" :list="list"> |
| | | <div class="notice-content-item" v-for="(m,i) in list" :key="i"> |
| | | <div class="btns" v-if="m"> |
| | | <el-dropdown style="margin-right: 20px;" trigger="click" @command="e=>handleDropdown(e,m)" v-if="m.messageType==2||m.messageType==3"> |
| | | <!-- v-if="m.messageType==2||m.messageType==3" --> |
| | | <el-dropdown style="margin-right: 20px;" trigger="click" @command="e=>handleDropdown(e,m)" v-if="false"> |
| | | <span class="el-dropdown-link"> |
| | | <span class="more" style="line-height: 26px;display: inline-block;">···</span> |
| | | </span> |
| | |
| | | pageSize: 8, // 一页7条 |
| | | total: null, |
| | | loading: true, // 组件loading的展示,默认为true |
| | | finishLoding: false // 加载完成,显示已经没有更多了 |
| | | finishLoding: false, // 加载完成,显示已经没有更多了 |
| | | keyMap:{} |
| | | } |
| | | }, |
| | | mounted(){ |
| | | this.getTypeDicts(); |
| | | this.currentPage = 1; |
| | | this.keyMap = {}; |
| | | this.list = []; |
| | | this.refresh(); |
| | | }, |
| | | methods:{ |
| | | refresh(){ |
| | | const key = `_${this.currentPage}` |
| | | const value = this.keyMap[key] |
| | | // 如果value存在,表示缓存有值,那么阻止请求 |
| | | if(value) { |
| | | return |
| | | } |
| | | // value不存在,表示第一次请求,设置占位 |
| | | this.keyMap[key] = 'temp' |
| | | if(this.currentPage==1){ |
| | | this.loading = true |
| | | } |
| | |
| | | p: "abcd" |
| | | },29); |
| | | this.list = []; |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.refresh(); |
| | | this.$emit('goNoticeDetail') |
| | | }) |
| | | }, |
| | | handleDropdown(e,row){ |
| | |
| | | } |
| | | this.$message.success('删除成功') |
| | | this.list = []; |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.refresh() |
| | | }).catch(e => { |
| | |
| | | }) |
| | | }).catch(() => {}) |
| | | }, |
| | | // 滚动触底加载 |
| | | scrollFn() { |
| | | let clientHeight = document.documentElement.clientHeight - 18; //可视区域 |
| | | let scrollHeight = document.body.scrollHeight; // 滚动文档高度 |
| | | let scrollTop = parseInt(document.documentElement.scrollTop); // 已滚动的高度 |
| | | let height = 300; |
| | | if ( |
| | | scrollTop + clientHeight >= scrollHeight - height && |
| | | scrollHeight != 0 |
| | | ) { |
| | | if (!this.finishLoding&&this.currentPage*this.pageSize<this.total) { |
| | | this.currentPage = this.currentPage + 1; |
| | | this.refresh(); |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | throttle(fn, wait) { |
| | | // 封装函数进行节流 |
| | | var timer = null; |
| | | return function () { |
| | | var context = this; |
| | | var args = arguments; |
| | | if (!timer) { |
| | | timer = setTimeout(function () { |
| | | fn.apply(context, args); |
| | | timer = null; |
| | | }, wait); |
| | | } |
| | | }; |
| | | }, |
| | | handleType(){ |
| | | this.list = []; |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.refresh(); |
| | | }, |
| | |
| | | } |
| | | this.$message.success('操作成功') |
| | | this.list = []; |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.refresh(); |
| | | }) |
| | | } |
| | | }, |
| | | destroyed() { |
| | | window.removeEventListener("scroll", this.throttle(), false); |
| | | }, |
| | | } |
| | | </script> |