Merge remote-tracking branch 'origin/master'
| | |
| | | performanceShift, |
| | | auxiliaryWorkingHours, |
| | | unPass, |
| | | companies |
| | | } |
| | | } |
| | | |
| | |
| | | selectStandardProductListByMethodId: "/standardTree/selectStandardProductListByMethodId", //通过检验标准查询检验项目 |
| | | selectStandardMethodEnum: "/standardTree/selectStandardMethodEnum", //获取标准树下标准方法枚举 |
| | | getStandardTree2: "/standardTree/getStandardTree2", //获取产品架构 |
| | | upStandardProducts: "/standardTree/upStandardProducts", //获取产品架构 |
| | | } |
| | | |
| | | const standardMethod = { |
| | |
| | | page:"/performanceShift/page",//绩效管理-班次-分页查询 |
| | | update:"/performanceShift/update",//绩效管理-班次-班次状态修改 |
| | | pageYear:"/performanceShift/pageYear",//绩效管理-班次-年份分页查询 |
| | | export:"/performanceShift/export",//绩效管理-班次-导出 |
| | | } |
| | | |
| | | const auxiliaryWorkingHours = { |
| | |
| | | const unPass = { |
| | | pageInsUnPass:"/unPass/pageInsUnPass", // 查询不合格样品数据 |
| | | } |
| | | |
| | | const companies = { |
| | | selectCompaniesList: "/companies/selectCompaniesList", //获取人事系统组织 |
| | | selectSimpleList: "/companies/selectSimpleList", //获取人事系统组织下的人员 |
| | | } |
| | |
| | | <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"> |
| | |
| | | tell: '', |
| | | noLoading: false, |
| | | orderType: [], |
| | | filters: [] |
| | | filters: [], |
| | | formType: [] |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.selectStandardMethods() |
| | | this.selectEnumByCategoryForOrderType() |
| | | this.selectEnumByCategoryForSonLaboratory() |
| | | this.selectEnumByCategoryForSampleForm() |
| | | if (this.active != 1) { |
| | | // 查看/审核流程 |
| | | // 请求接口,回显数据 |
| | |
| | | } |
| | | }) |
| | | }, |
| | | 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 |
| | |
| | | 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 |
| | |
| | | <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 |
| | | }, |
| | | ], |
| | |
| | | return m |
| | | }) |
| | | this.options[0].children = arr; |
| | | this.fileComponentData.tagField.type.select = arr; |
| | | this.fileComponentData.selectField.type.select = arr; |
| | | }) |
| | | }, |
| | |
| | | </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; |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | datathirdParty:[{ |
| | | id: 1, |
| | | label: '一级 1', |
| | | children: [{ |
| | | id: 4, |
| | | label: '二级 1-1', |
| | | children: [{ |
| | | id: 9, |
| | | label: '三级 1-1-1' |
| | | }, { |
| | | id: 10, |
| | | label: '三级 1-1-2' |
| | | }] |
| | | }] |
| | | }, { |
| | | id: 2, |
| | | label: '一级 2', |
| | | children: [{ |
| | | id: 5, |
| | | label: '二级 2-1' |
| | | }, { |
| | | id: 6, |
| | | label: '二级 2-2' |
| | | }] |
| | | }, { |
| | | id: 3, |
| | | label: '一级 3', |
| | | children: [{ |
| | | id: 7, |
| | | label: '二级 3-1' |
| | | }, { |
| | | id: 8, |
| | | label: '二级 3-2' |
| | | }] |
| | | }], |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'label' |
| | | }, |
| | | addthirdParty:false, |
| | | search: null, |
| | | list: [], |
| | | selectTree: '', |
| | |
| | | this.selectTreeList() |
| | | }, |
| | | methods: { |
| | | |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | |
| | | </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, |
| | |
| | | .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"> |
| | |
| | | <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; |
| | | } |
| | | .search{ |
| | | height: 20%; |
| | | border-bottom: 1px solid #ebeef5; |
| | | margin-bottom: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | box-sizing: border-box; |
| | | padding-bottom: 10px; |
| | | } |
| | | .search-item{ |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | } |
| | | .search-item .el-row{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .search-item .el-col{ |
| | | margin-left: 0; |
| | | } |
| | | .more-edit .dialog-footer{ |
| | | position: absolute; |
| | | top: 15px; |
| | | right: 70px; |
| | | } |
| | | >>>.more-edit .el-dialog__body{ |
| | | height: calc(100vh - 90px); |
| | | } |
| | | >>>.is-disabled .el-textarea__inner{ |
| | | background: rgba(0, 0, 0, 0.05) !important; |
| | | } |
| | | </style> |
| | | <style> |
| | |
| | | </el-tree> |
| | | </div> |
| | | <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 class="title" style="width: 100%;"> |
| | | <el-col :span="20" style="font-size: 14px;color: #999;">{{selectTree}}</el-col> |
| | | <el-button size="small" type="primary" @click="handleMore" style="position: absolute;right: 0px;top: 1px;" v-if="upStandardProduct">批量编辑</el-button> |
| | | </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" filterable |
| | | <el-select v-model="scope.row.templateId" size="small" filterable :disabled="!upStandardProduct" |
| | | @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> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | | style="position: absolute;right: 16px;bottom: 1px;" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="currentPage" |
| | | layout="total, prev, pager, next, jumper" |
| | | :page-size="50" |
| | | :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="moreEdit" width="90%" style="height: 100vh;" class="more-edit"> |
| | | <div class="body" style="height: 100%;display: flex;flex-direction: column;"> |
| | | <div class="search"> |
| | | <div class="search-item"> |
| | | <el-row style="width: 25%;margin-bottom: 16px;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <!-- <span class="required-span">* </span> --> |
| | | 要求值:</el-col> |
| | | <el-col :span="16"> |
| | | <el-input size="small" v-model="moreInfo.ask" clearable :disabled="moreSelects.length==0"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="width: 25%;margin-bottom: 16px;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <!-- <span class="required-span">* </span> --> |
| | | 要求描述:</el-col> |
| | | <el-col :span="16" style="display: flex;align-items: flex-start;height: 100%;"> |
| | | <el-input size="small" clearable type="textarea" :autosize="{ minRows: 1, maxRows: 3}" v-model="moreInfo.tell" :disabled="moreSelects.length==0"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="width: 25%;margin-bottom: 16px;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <!-- <span class="required-span">* </span> --> |
| | | 试验方法:</el-col> |
| | | <el-col :span="16"> |
| | | <el-select v-model="moreInfo.methodS" size="small" filterable style="width: 100%;" :disabled="moreSelects.length==0"> |
| | | <el-option v-for="(a, ai) in methodList" :key="ai" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="width: 25%;margin-bottom: 16px;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <!-- <span class="required-span">* </span> --> |
| | | 单价(元):</el-col> |
| | | <el-col :span="16" > |
| | | <el-input size="small" v-model="moreInfo.price" clearable :disabled="moreSelects.length==0"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="width: 25%;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <!-- <span class="required-span">* </span> --> |
| | | 工时系数:</el-col> |
| | | <el-col :span="16"> |
| | | <el-input size="small" v-model="moreInfo.manHour" clearable :disabled="moreSelects.length==0"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="width: 25%;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <!-- <span class="required-span">* </span> --> |
| | | 模板:</el-col> |
| | | <el-col :span="16"> |
| | | <el-select v-model="moreInfo.templateId" size="small" filterable placeholder="模板" style="width: 100%;" :disabled="moreSelects.length==0"> |
| | | <el-option v-for="(a, ai) in templateList" :key="ai" :label="a.name" :value="a.id"></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="width: 50%;"> |
| | | <el-col :span="23" style="display: flex;align-items: center;justify-content: end;"> |
| | | <el-button type="primary" size="small" @click="sectionUp(moreSelects)">设置区间</el-button> |
| | | <el-button @click="moreEdit = false" size="small">取 消</el-button> |
| | | <el-button type="primary" @click="subMoreEdit" :loading="moreEditLoad" size="small">保 存</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | <div style="flex: 1;overflow-y: auto;" v-loading="productTableLoading0"> |
| | | <el-table :data="productList0" ref="productTable0" style="width: 100%;" height="94%" tooltip-effect="dark" |
| | | stripe |
| | | :fit="true" border |
| | | @select-all="handleSelectAll0" |
| | | @select="handleSelectionChange0" |
| | | header-row-class-name="header-class" |
| | | :row-key="row=>row.id" |
| | | > |
| | | <el-table-column type="selection" width="50" > |
| | | </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="inspectionItemSubclass" label="检验项子项" min-width="140" |
| | | show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="sonLaboratory" label="子实验室" width="130" show-overflow-tooltip :filters="filters" |
| | | :filter-method="filterHandler"></el-table-column> |
| | | <el-table-column prop="ask" label="要求值" min-width="200px"></el-table-column> |
| | | <el-table-column prop="tell" label="要求描述" min-width="220px"></el-table-column> |
| | | <el-table-column prop="method" label="试验方法" width="200"></el-table-column> |
| | | <el-table-column prop="unit" label="计量单位" width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="price" label="单价(元)" width="120"></el-table-column> |
| | | <el-table-column prop="manHour" label="工时系数" width="120"></el-table-column> |
| | | <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"> |
| | | {{ templateList.find(item => item.id == scope.row.templateId)?templateList.find(item => item.id == scope.row.templateId).name:'' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="section" label="区间" width="120" show-overflow-tooltip></el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | | style="position: absolute;right: 16px;bottom: 4px;" |
| | | @current-change="handleCurrentChange0" |
| | | :current-page="currentPage0" |
| | | layout="total, prev, pager, next, jumper" |
| | | :page-size="50" |
| | | :total="total0"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- <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, |
| | | currentPage:1, |
| | | standardId: 0, |
| | | moreEdit:false, |
| | | moreEditLoad:false, |
| | | moreSelects:[], |
| | | total0:0, |
| | | currentPage0:1, |
| | | productList0: [], |
| | | moreInfo:{ |
| | | ask:'', |
| | | tell:'', |
| | | methodS:'', |
| | | price:'', |
| | | manHour:'', |
| | | templateId:'' |
| | | }, |
| | | methodList:[], |
| | | productTableLoading0:false |
| | | } |
| | | }, |
| | | watch: { |
| | | moreEdit(val) { |
| | | if(!val){ |
| | | this.$refs.productTable0.clearSelection() |
| | | this.moreSelects = [] |
| | | this.currentPage0 = 1; |
| | | this.productList0 = [] |
| | | this.moreInfo = { |
| | | ask:'', |
| | | tell:'', |
| | | methodS:'', |
| | | price:'', |
| | | manHour:'', |
| | | templateId:'' |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | this.upIndex++ |
| | | }, |
| | | handleNodeClick(val, node, el) { //树的值 |
| | | this.total = 0 |
| | | this.currentPage = 1 |
| | | this.selectTree = '' |
| | | this.getNodeParent(node) |
| | | this.selectTree = this.selectTree.replace(' - ', '') |
| | |
| | | }, |
| | | 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 |
| | | }) |
| | | }, |
| | |
| | | }, |
| | | 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 |
| | |
| | | } |
| | | }, |
| | | sectionUp(row) { |
| | | this.sectionRow = row |
| | | this.sectionUpDia = true |
| | | this.sectionList = [] |
| | | if (this.sectionRow.section != null && this.sectionRow.section != '') { |
| | | JSON.parse(this.sectionRow.section).forEach((a, ai) => { |
| | | this.sectionList.push({ |
| | | thing: a, |
| | | ask: JSON.parse(this.sectionRow.ask)[ai], |
| | | tell: JSON.parse(this.sectionRow.tell)[ai], |
| | | price: JSON.parse(this.sectionRow.price)[ai], |
| | | manHour: JSON.parse(this.sectionRow.manHour)[ai] |
| | | if (Array.isArray(row)) { |
| | | // 值是一个数组 |
| | | if(row.length === 0){ |
| | | return this.$message.error('请选择检验项') |
| | | } |
| | | this.sectionRow = {} |
| | | this.sectionUpDia = true |
| | | } else { |
| | | // 值是一个对象 |
| | | this.sectionRow = row |
| | | this.sectionUpDia = true |
| | | this.sectionList = [] |
| | | if (this.sectionRow.section != null && this.sectionRow.section != '') { |
| | | JSON.parse(this.sectionRow.section).forEach((a, ai) => { |
| | | this.sectionList.push({ |
| | | thing: a, |
| | | ask: JSON.parse(this.sectionRow.ask)[ai], |
| | | tell: JSON.parse(this.sectionRow.tell)[ai], |
| | | price: JSON.parse(this.sectionRow.price)[ai], |
| | | manHour: JSON.parse(this.sectionRow.manHour)[ai] |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | sectionLoadAdd() { |
| | |
| | | this.sectionRow.manHour = JSON.stringify(manHourList) |
| | | } |
| | | this.sectionLoad = true |
| | | this.$axios.post(this.$api.standardTree.upStandardProductList, { |
| | | id: this.sectionRow.id, |
| | | section: this.sectionRow.section, |
| | | ask: this.sectionRow.ask, |
| | | tell: this.sectionRow.tell, |
| | | price: this.sectionRow.price, |
| | | manHour: this.sectionRow.manHour |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | if(this.moreSelects.length === 0){ |
| | | this.$axios.post(this.$api.standardTree.upStandardProductList, { |
| | | id: this.sectionRow.id, |
| | | section: this.sectionRow.section, |
| | | ask: this.sectionRow.ask, |
| | | tell: this.sectionRow.tell, |
| | | price: this.sectionRow.price, |
| | | manHour: this.sectionRow.manHour |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.sectionLoad = false |
| | | if (res.code == 201) { |
| | | this.$message.error('未保存') |
| | | return |
| | | } |
| | | this.$message.success('已保存') |
| | | this.sectionUpDia = false |
| | | }) |
| | | }else{ |
| | | this.$axios.post(this.$api.standardTree.upStandardProducts, { |
| | | ids:this.moreSelects.map(a=>a.id), |
| | | standardProductList:{ |
| | | section: this.sectionRow.section, |
| | | ask: this.sectionRow.ask, |
| | | tell: this.sectionRow.tell, |
| | | price: this.sectionRow.price, |
| | | manHour: this.sectionRow.manHour |
| | | } |
| | | }).then(res => { |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.sectionLoad = false |
| | | if (res.code == 201) { |
| | | this.$message.error('未保存') |
| | |
| | | } |
| | | this.$message.success('已保存') |
| | | this.sectionUpDia = false |
| | | this.currentPage0 = 1; |
| | | this.getList() |
| | | }) |
| | | } |
| | | }, |
| | | getStandardTemplate() { |
| | | this.$axios.get(this.$api.StandardTemplate.getStandardTemplate).then(res => { |
| | | 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 |
| | | }) |
| | | }, |
| | | async handleMore(){ |
| | | if(!this.standardId&&this.standardId!=0){ |
| | | return this.$message.error('请选择实验室、样品') |
| | | } |
| | | await this.getList() |
| | | this.selectStandardMethods() |
| | | this.moreEdit = true |
| | | }, |
| | | selectStandardMethods() { |
| | | this.$axios.get(this.$api.standardMethod.selectStandardMethods).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.code, |
| | | value: a.code |
| | | }) |
| | | }) |
| | | this.methodList = data |
| | | }) |
| | | }, |
| | | subMoreEdit(){ |
| | | if(this.moreSelects.length===0){ |
| | | return this.$message.error('请选择检验项') |
| | | } |
| | | this.moreEditLoad = true |
| | | this.$axios.post(this.$api.standardTree.upStandardProducts, { |
| | | ids:this.moreSelects.map(a=>a.id), |
| | | standardProductList:this.moreInfo |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.moreEditLoad = false |
| | | if (res.code == 201) { |
| | | this.$message.error('未保存') |
| | | return |
| | | } |
| | | this.$message.success('已保存') |
| | | this.currentPage0 = 1; |
| | | this.getList() |
| | | // this.moreInfo = { |
| | | // ask:'', |
| | | // tell:'', |
| | | // methodS:'', |
| | | // price:'', |
| | | // manHour:'', |
| | | // templateId:'' |
| | | // } |
| | | }) |
| | | }, |
| | | handleSelectAll0(rows){ |
| | | if(rows.length){ |
| | | rows.forEach(a=>{ |
| | | if(!this.moreSelects.find(b=>a.id===b.id)){ |
| | | this.moreSelects.push(a) |
| | | } |
| | | }) |
| | | }else{ |
| | | this.productList0.forEach(a=>{ |
| | | this.moreSelects = this.moreSelects.filter(b=>b.id!=a.id ) |
| | | }) |
| | | } |
| | | }, |
| | | handleSelectionChange0(val,row){ |
| | | if(this.moreSelects.find(a=>a.id===row.id)){ |
| | | this.moreSelects = this.moreSelects.filter(a=>a.id!=row.id) |
| | | }else{ |
| | | this.moreSelects.push(row) |
| | | } |
| | | }, |
| | | getList(){ |
| | | this.productTableLoading0 = true |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductListByMethodId, { |
| | | id: this.standardId, |
| | | tree: this.selectTree, |
| | | page: this.currentPage0 |
| | | }).then(res => { |
| | | this.productList0 = res.data.productList |
| | | this.total0 = res.data.total |
| | | this.productTableLoading0 = false |
| | | this.$nextTick(()=>{ |
| | | this.productList0.forEach((a,i) => { |
| | | if(this.moreSelects.find(b=>a.id==b.id)){ |
| | | // console.log(111111111,a) |
| | | this.$refs.productTable0.toggleRowSelection(this.productList0[i],true) |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | handleCurrentChange0(e){ |
| | | this.currentPage0 = e; |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | | </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="work-box-left"> |
| | | <span>{{ getShiftByDic(m.shift) }}</span> |
| | | </div> --> |
| | | <el-dropdown trigger="click" placement="bottom" @command="e=>handleCommand(e,m)" :disabled="!downPower"> |
| | | <el-dropdown trigger="click" placement="bottom" @command="e=>handleCommand(e,m)" :disabled="!upPower"> |
| | | <!-- <i class="el-icon-arrow-down el-icon--right" style="font-size: 20px;color: #fff;cursor: pointer;"></i> --> |
| | | <span style="cursor: pointer;" :style="`opacity: ${getShiftByDic(m.shift)=='无'?0:1};`">{{ getShiftByDic(m.shift) }}</span> |
| | | <el-dropdown-menu slot="dropdown"> |
| | |
| | | </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;"> |
| | |
| | | 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: "班次类型" |
| | |
| | | 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> |
| | |
| | | <p class="ellipsis-multiline" >{{ m.text }}</p> |
| | | </el-tooltip> |
| | | </div> |
| | | <span style="color:rgb(153, 153, 153);font-size: 12px;text-align: center;margin: 120px 0;display: inline-block;width: 100%;" v-if="listScheduleByMe.length==0">暂无</span> |
| | | <span style="color:rgb(144, 147, 153);font-size: 14px;text-align: center;margin: 120px 0;display: inline-block;width: 100%;" v-if="listScheduleByMe.length==0">暂无数据</span> |
| | | </div> |
| | | </div> |
| | | </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" v-if="list.length>0"> |
| | | <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=""> |
| | |
| | | <div class="body" style="max-height: 60vh;"> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label">时间:</div> |
| | | <div class="search_label"><span style="color: red;margin-right: 4px;">*</span>时间:</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | v-model="query.time" |
| | |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label">内容:</div> |
| | | <div class="search_label"><span style="color: red;margin-right: 4px;">*</span>内容:</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="query.text" size="small" placeholder="请输入内容"></el-input> |
| | | <el-input v-model="query.text" type="textarea" |
| | | :rows="2" size="small" placeholder="请输入内容"></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | 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> |
| | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | .person_manage { |
| | | padding: 20px 0; |
| | | display: flex; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .left { |
| | | width: 270px; |
| | | height: calc(100% - 40px); |
| | | background-color: white; |
| | | padding: 15px; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .el-tree { |
| | | height: calc(100% - 37px); |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | .custom-tree-node { |
| | | width: 100%; |
| | | line-height: 32px; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | .custom-tree-node .el-icon-delete { |
| | | color: #3A7BFA; |
| | | opacity: 0; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | } |
| | | .custom-tree-node:hover .el-icon-delete { |
| | | opacity: 1; |
| | | } |
| | | |
| | | .node_i { |
| | | color: orange; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .right { |
| | | margin-left: 5px; |
| | | width: calc(100% - 305px); |
| | | height: calc(100% - 40px); |
| | | } |
| | | |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 60px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 250px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 90px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 90px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 4px; |
| | | background-color: #fff; |
| | | height: calc(100% - 44px); |
| | | } |
| | | </style> |
| | | <style> |
| | | .el-upload--text{ |
| | | .el-upload--text { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | |
| | | justify-content: center; |
| | | } |
| | | </style> |
| | | <style> |
| | | .person_manage .el-tree-node__content { |
| | | height: 32px; |
| | | font-size: 14px; |
| | | border-radius: 2px; |
| | | } |
| | | |
| | | .person_manage .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content { |
| | | color: #3A7BFA; |
| | | } |
| | | |
| | | .person_manage .has-gutter .el-table__cell .cell { |
| | | line-height: 34px; |
| | | background-color: #f8f8f8; |
| | | } |
| | | |
| | | .person_manage .has-gutter .el-table__cell { |
| | | background-color: #fafafa !important; |
| | | } |
| | | |
| | | .person_manage .el-table__row .cell { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .person_manage .el-table .warning-row .cell { |
| | | color: #bababa; |
| | | } |
| | | </style> |
| | | <template> |
| | | <div class="person_manage"> |
| | | <div> |
| | | <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="medium" type="primary" @click="opeaAdd" v-if="addPower">新增用户</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <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> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">账号状态:</div> |
| | | <div class="search_input"> |
| | | <el-select size="small" v-model="componentData.entity.state" style="width: 100%;"> |
| | | <el-option label="全部" :value="null"></el-option> |
| | | <el-option label="启用" :value="1"></el-option> |
| | | <el-option label="停用" :value="0"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">公司名称:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请输入" clearable 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> |
| | | <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.user.selectUserList" :upUrl="$api.user.updateUser" :componentData="componentData" :key="upIndex" @upUser="upUser"/> |
| | | </div> |
| | | </div> |
| | | <div class="person_manage"> |
| | | <div class="left"> |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-input placeholder="输入关键字进行搜索" suffix-icon="el-icon-search" v-model="search" size="small" |
| | | style="margin-bottom: 5px;" clearable @blur="searchFilter" @clear="searchFilter" |
| | | @keyup.enter.native="searchFilter()"></el-input> |
| | | </el-col> |
| | | <el-col :span="4" style="text-align: center;line-height: 30px;" v-if="addPower"> |
| | | <el-button type="primary" icon="el-icon-plus" size="mini" circle @click="handleAdd"></el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-tree :data="list" ref="tree" :props="{ children: 'children', label: 'name' }" node-key="id" |
| | | :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" |
| | | @node-collapse="nodeClose" v-loading="treeLoad" :expand-on-click-node="false" |
| | | :default-expanded-keys="expandedKeys" :default-checked-keys="[1]"> |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <el-row style="width: 100%;"> |
| | | <el-col :span="21" :class="{sort:node.level>3}"> |
| | | <span><i |
| | | :class="`node_i ${data.children != undefined&&data.children.length>0 ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i> |
| | | {{ data.name }}</span> |
| | | </el-col> |
| | | <el-col :span="2" style="text-align: right;" v-if="delStandardTree&&node.level>1"> |
| | | <el-button type="text" size="mini" @click.stop="remove(node, data)"> |
| | | <i class="el-icon-delete"></i> |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | | <div class="right"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <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> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">账号状态:</div> |
| | | <div class="search_input"> |
| | | <el-select size="small" v-model="componentData.entity.state" style="width: 100%;"> |
| | | <el-option label="全部" :value="null"></el-option> |
| | | <el-option label="启用" :value="1"></el-option> |
| | | <el-option label="停用" :value="0"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">公司名称:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请输入" clearable 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> |
| | | <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <el-button size="small" type="primary" @click="openthirdParty">获取三方人员</el-button> |
| | | <el-button size="small" type="primary" @click="opeaAdd" v-if="addPower">新增用户</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.user.selectUserList" :upUrl="$api.user.updateUser" |
| | | :componentData="componentData" :key="upIndex" /> |
| | | </div> |
| | | </div> |
| | | <el-dialog title="架构新增" :visible.sync="addDia" width="400px"> |
| | | <div class="body"> |
| | | <el-row style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;"> |
| | | <span class="required-span">* </span>架构名称: |
| | | </el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="addOb.name" placeholder="请输入架构名称" clearable size="small"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDia = false">取 消</el-button> |
| | | <el-button type="primary" @click="addStandardTree" :loading="addLoad">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="获取人事系统人员信息" :visible.sync="addthirdParty" width="70%"> |
| | | <div class="body"> |
| | | <el-row> |
| | | <el-col :span="9" style="height: 70vh;overflow: hidden;"> |
| | | <el-input placeholder="输入关键字进行过滤" v-model="search2" size="small" style="width: 90%;padding: 0 5% 10px 5%;" |
| | | clearable @blur="searchFilter2" @clear="searchFilter2" @keyup.enter.native="searchFilter2()"> |
| | | </el-input> |
| | | <el-tree :data="datathirdParty" node-key="id" :props="defaultProps" @node-click="nodeClick2" |
| | | style="height: calc(100% - 42px);" :filter-node-method="filterNode2" ref="tree2" highlight-current> |
| | | </el-tree> |
| | | </el-col> |
| | | <el-col :span="15" style="height: 70vh;padding-left: 8px;"> |
| | | <el-table height="70vh" border stripe :data="personList" v-loading="personLoad" ref="personTable" |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="50"> |
| | | </el-table-column> |
| | | <el-table-column prop="employeeID" label="员工号"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="员工姓名"> |
| | | </el-table-column> |
| | | <el-table-column prop="isLive" label="已存在" width="80" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-tag type="success" effect="dark" v-if="scope.row.isLive === 1">√</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="addthirdParty = false" size="mini">取 消</el-button> |
| | | <el-button type="primary" @click="addUser2" :loading="addLoad" size="mini">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../tool/value-table.vue' |
| | | export default { |
| | | components: { |
| | | ValueTable |
| | | }, |
| | | data() { |
| | | return { |
| | | componentData: { |
| | | entity: { |
| | | name: null, |
| | | state: null, |
| | | company: null, |
| | | orderBy:{ |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | import { |
| | | compileToFunctions |
| | | } from 'vue-template-compiler' |
| | | import ValueTable from '../tool/value-table.vue' |
| | | export default { |
| | | components: { |
| | | ValueTable |
| | | }, |
| | | data() { |
| | | return { |
| | | datathirdParty: [], |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'label' |
| | | }, |
| | | addthirdParty: false, |
| | | componentData: { |
| | | entity: { |
| | | name: null, |
| | | state: null, |
| | | company: null, |
| | | departId: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | row: 2, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | init:false, |
| | | do: [{ |
| | | id: 'update', |
| | | font: '编辑', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | field:['createUserName','updateUserName','roleName','角色=roleId','密码=password'] |
| | | }], |
| | | tagField: { |
| | | state: { |
| | | select: [{ |
| | | value: 1, |
| | | type: 'success', |
| | | label: '启用' |
| | | },{ |
| | | value: 0, |
| | | type: 'danger', |
| | | label: '停用' |
| | | }] |
| | | } |
| | | }, |
| | | selectField: { |
| | | state: { |
| | | select: [{ |
| | | value: 1, |
| | | type: 'success', |
| | | label: '启用' |
| | | },{ |
| | | value: 0, |
| | | type: 'danger', |
| | | label: '停用' |
| | | }] |
| | | }, |
| | | roleId: { |
| | | select: [] |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | init: false, |
| | | do: [{ |
| | | id: 'update', |
| | | font: '编辑', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | field: ['createUserName', 'updateUserName', 'roleName', '角色=roleId', '密码=password'] |
| | | }], |
| | | tagField: { |
| | | state: { |
| | | select: [{ |
| | | value: 1, |
| | | type: 'success', |
| | | label: '启用' |
| | | }, { |
| | | value: 0, |
| | | type: 'danger', |
| | | label: '停用' |
| | | }] |
| | | } |
| | | }, |
| | | selectField: { |
| | | state: { |
| | | select: [{ |
| | | value: 1, |
| | | type: 'success', |
| | | label: '启用' |
| | | }, { |
| | | value: 0, |
| | | type: 'danger', |
| | | label: '停用' |
| | | }] |
| | | }, |
| | | roleId: { |
| | | select: [] |
| | | } |
| | | }, |
| | | /* cascaderField:{ |
| | | departId:{ |
| | | tree:[] |
| | |
| | | checkStrictly: true |
| | | } |
| | | }, */ |
| | | requiredAdd:['account','name','state','roleId','password','nameEn','phone'], |
| | | requiredUp:['account','name','state','roleId','nameEn','phone'], |
| | | addUpload:['pictureUrl','signatureUrl'], |
| | | addUploadConfig:{ |
| | | accept:'.png, .jpg, .jpeg, .gif', |
| | | url:this.$api.deviceScope.uploadFile |
| | | requiredAdd: ['account', 'name', 'state', 'roleId', 'password', 'nameEn', 'phone'], |
| | | requiredUp: ['account', 'name', 'state', 'roleId', 'nameEn', 'phone'], |
| | | // disabledUp:['departId'], |
| | | addUpload: ['pictureUrl', 'signatureUrl'], |
| | | addUploadConfig: { |
| | | accept: '.png, .jpg, .jpeg, .gif', |
| | | url: this.$api.deviceScope.uploadFile |
| | | }, |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | addDia: false, |
| | | addPower: true |
| | | } |
| | | }, |
| | | mounted() { |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | addDia: false, |
| | | addPower: true, |
| | | delStandardTree: true, |
| | | addDia0: false, |
| | | addOb: { |
| | | fatherId: '', |
| | | name: '', |
| | | }, |
| | | search: null, |
| | | list: [], |
| | | selectTree: '', |
| | | treeLoad: false, |
| | | expandedKeys: [], |
| | | addLoad: false, |
| | | personList: [], |
| | | treeLoad: false, |
| | | personLoad: false, |
| | | search2: '', |
| | | multipleSelection: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.selectTreeList() |
| | | this.selectRole() |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.getPower() |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.upIndex++ |
| | | }, |
| | | upUser(row){ |
| | | console.log(row); |
| | | }, |
| | | selectRole(){ |
| | | this.$axios.get(this.$api.user.selectRoleList).then(res=>{ |
| | | var str = [] |
| | | res.data.forEach(a=>{ |
| | | str.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.componentData.selectField.roleId.select = str |
| | | }) |
| | | }, |
| | | opeaAdd(){ |
| | | this.$refs.ValueTable.openAddDia(this.$api.user.addUser); |
| | | }, |
| | | selectTreeList(){ |
| | | /* this.$axios.get(this.$api.department.selectDepartment).then(res => { |
| | | this.selectRole() |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.getPower() |
| | | }, |
| | | methods: { |
| | | openthirdParty() { |
| | | this.addthirdParty = true; |
| | | this.$axios.get(this.$api.companies.selectCompaniesList).then(res => { |
| | | this.datathirdParty = [] |
| | | for (let ai = 0; ai < res.data.length; ai++) { |
| | | let a = res.data[ai] |
| | | if (a.parentCompanyId === 'ROOT') { |
| | | this.datathirdParty.push({ |
| | | id: a.companyId, |
| | | label: a.companyName, |
| | | children: [] |
| | | }) |
| | | res.data.splice(ai, 1) |
| | | ai-- |
| | | } else { |
| | | this.getOrganizational(a, ai, this.datathirdParty, res.data) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | getOrganizational(a, ai, children, list) { |
| | | for (let bi = 0; bi < children.length; bi++) { |
| | | let b = children[bi] |
| | | if (a.parentCompanyId === b.id) { |
| | | b.children.push({ |
| | | id: a.companyId, |
| | | label: a.companyName, |
| | | children: [] |
| | | }) |
| | | list.splice(ai, 1) |
| | | ai-- |
| | | break |
| | | } else { |
| | | this.getOrganizational(a, ai, b.children, list) |
| | | } |
| | | } |
| | | }, |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | // this.upIndex++ |
| | | this.refreshTable() |
| | | }, |
| | | selectRole() { |
| | | this.$axios.get(this.$api.user.selectRoleList).then(res => { |
| | | var str = [] |
| | | res.data.forEach(a => { |
| | | str.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.componentData.selectField.roleId.select = str |
| | | }) |
| | | }, |
| | | opeaAdd() { |
| | | if (!this.addOb.fatherId || this.selectTree == '' || this.selectTree == '全部') { |
| | | this.$message.error('请选择一个组织') |
| | | return |
| | | } |
| | | this.$refs.ValueTable.openAddDia(this.$api.user.addUser); |
| | | this.$refs['ValueTable'].upData.departId = this.selectTree |
| | | }, |
| | | selectTreeList() { |
| | | /* this.$axios.get(this.$api.department.selectDepartment).then(res => { |
| | | this.componentData.cascaderField.departId.tree = this.handleTree(res.data[0].children) |
| | | }) */ |
| | | this.$refs.ValueTable.selectList() |
| | | }, |
| | | handleTree(arr){ |
| | | handleTree(arr) { |
| | | arr.forEach(a => { |
| | | if(a.children.length==0){ |
| | | if (a.children.length == 0) { |
| | | a.children = null; |
| | | }else{ |
| | | } else { |
| | | this.handleTree(a.children) |
| | | } |
| | | }) |
| | | return arr |
| | | }, |
| | | // 权限分配 |
| | | getPower(){ |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let up = false |
| | | let add = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if(power[i].menuMethod=='updateUser'){ |
| | | up = true |
| | | } |
| | | if(power[i].menuMethod=='addUser'){ |
| | | add = true |
| | | } |
| | | } |
| | | if(!up){ |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | } |
| | | } |
| | | } |
| | | // 权限分配 |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let up = false |
| | | let add = false |
| | | let delStandardTree = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'updateUser') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'addUser') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delDepartment') { |
| | | delStandardTree = true |
| | | } |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.delStandardTree = delStandardTree |
| | | this.addPower = add |
| | | }, |
| | | handleAdd() { |
| | | if (this.addOb.fatherId) { |
| | | this.addDia0 = true; |
| | | } else { |
| | | this.$message.error('请选择一个架构层级') |
| | | } |
| | | }, |
| | | searchFilter() { |
| | | this.$refs.tree.filter(this.search) |
| | | }, |
| | | searchFilter2() { |
| | | this.$refs.tree2.filter(this.search2) |
| | | }, |
| | | filterNode(value, data) { |
| | | console.log(data); |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | filterNode2(value, data) { |
| | | if (!value) return true; |
| | | return data.label.indexOf(value) !== -1; |
| | | }, |
| | | handleNodeClick(val, node, el) { //树的值 |
| | | this.selectTree = '' |
| | | this.getNodeParent(node) |
| | | this.selectTree = this.selectTree.replace(' - ', '') |
| | | let data = this.selectTree.split(' - ') |
| | | let data2 = '' |
| | | for (let index = data.length - 1; index >= 0; index--) { |
| | | data2 += " - " + data[index] |
| | | } |
| | | this.selectTree = data2.replace(' - ', '') |
| | | this.addOb.fatherId = val.id; |
| | | this.componentData.entity.departId = val.id; |
| | | this.refreshTable() |
| | | }, |
| | | nodeOpen(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened') |
| | | }, |
| | | nodeClose(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder') |
| | | }, |
| | | getNodeParent(val) { |
| | | if (val.parent != null) { |
| | | this.selectTree += ' - ' + val.label |
| | | this.getNodeParent(val.parent) |
| | | } |
| | | }, |
| | | remove(node, data) { |
| | | this.$confirm("是否删除该层级", "提示", { |
| | | type: "error" |
| | | }).then(() => { |
| | | this.treeLoad = true |
| | | this.$axios.post(this.$api.department.delDepartment, { |
| | | id: data.id |
| | | }).then(res => { |
| | | if (res.code == 201) return |
| | | this.$message.success('已删除') |
| | | this.selectTreeList() |
| | | }) |
| | | }).catch(e => {}) |
| | | }, |
| | | selectTreeList() { |
| | | this.treeLoad = true |
| | | this.$axios.get(this.$api.department.selectDepartment).then(res => { |
| | | this.list = res.data |
| | | this.list.forEach(a => { |
| | | a.children.forEach(b => { |
| | | b.children.forEach(c => { |
| | | this.expandedKeys.push(c.id) |
| | | }) |
| | | }) |
| | | }) |
| | | this.treeLoad = false |
| | | this.componentData.entity.departId = this.list[0].id; |
| | | this.selectTree = '全部' |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | addStandardTree() { |
| | | if (this.addOb.name == null || this.addOb.factory == '') { |
| | | this.$message.error('构架名称是必填项') |
| | | return |
| | | } |
| | | this.addLoad = true |
| | | this.$axios.post(this.$api.department.addDepartment, this.addOb, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.addLoad = false |
| | | return |
| | | } |
| | | this.$message.success('添加成功') |
| | | this.addDia0 = false |
| | | this.selectTreeList() |
| | | this.addLoad = false |
| | | this.addOb.name = '' |
| | | this.addOb.fatherId = '' |
| | | }).catch(e => { |
| | | this.addDia0 = false |
| | | this.addLoad = false |
| | | }) |
| | | }, |
| | | nodeClick2(ob, node, el) { |
| | | if (ob.id !== 'SC21') { |
| | | this.personLoad = true |
| | | this.$axios.post(this.$api.companies.selectSimpleList, { |
| | | companyId: ob.id |
| | | }).then(res => { |
| | | this.personList = res.data |
| | | this.personLoad = false |
| | | this.$refs.personTable.doLayout() |
| | | }) |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | console.log(this.multipleSelection); |
| | | }, |
| | | addUser2(){ |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <el-button type="primary" @click="saveAddData" :loading="addLoad" v-if="type!='查看'">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | |
| | | .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 |
| | | } |
| | |
| | | }, |
| | | goNoticeDetail(row){ |
| | | this.$axios.put(this.$api.informationNotification.triggerModificationStatusToRead+'/'+row.id).then(res => { |
| | | this.drawer = false; |
| | | row.num = Math.random(100); |
| | | localStorage.setItem("noticeInfo", JSON.stringify(row)) |
| | | this.$bus.$emit("change", JSON.stringify(row)); |
| | | this.$parent.addTab({ |
| | | v: "消息详情", |
| | |
| | | p: "abcd" |
| | | },29); |
| | | this.list = []; |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.refresh(); |
| | | this.$emit('goNoticeDetail') |
| | | }) |
| | | this.drawer = false; |
| | | }, |
| | | handleDropdown(e,row){ |
| | | switch(e){ |
| | |
| | | } |
| | | 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> |
| | |
| | | { |
| | | v: "业务管理", |
| | | i: "font icon-kexueyanjiuheshiyankaifa", |
| | | p: "selectInsOrderParameter selectInsOrderPlanList pageInsReport pageInsUnPass", |
| | | p: "selectInsOrderParameter selectInsOrderPlanList pageInsReport costStatistics selectWarehouse", |
| | | c: [{ |
| | | v: "检验下单", |
| | | i: "font icon-erjidaohang", |
| | |
| | | { |
| | | v: "标准集", |
| | | i: "font icon-biaozhunji", |
| | | p: "", |
| | | p: "selectStandardTreeList selectStandardTemplatePageList", |
| | | c: [{ |
| | | v: "标准库", |
| | | i: "font icon-erjidaohang", |
| | |
| | | v: "工时管理", |
| | | i: "font icon-erjidaohang", |
| | | u: "b3-work-time-management", |
| | | p: "" |
| | | p: "selectAuxiliaryWorkingHours" |
| | | }, { |
| | | v: "人员考勤", |
| | | i: "font icon-erjidaohang", |
| | |
| | | v: "班次", |
| | | i: "font icon-erjidaohang", |
| | | u: "b3-classes", |
| | | p: "" |
| | | p: "performanceShiftPage performanceShiftPageYear" |
| | | }] |
| | | }, |
| | | { |
| | |
| | | v: "样品缺陷指数", |
| | | i: "font icon-erjidaohang", |
| | | u: "b4-sample-defects", |
| | | p: "" |
| | | p: "selectSampleDefects" |
| | | }, { |
| | | v: "耗材统计", |
| | | i: "font icon-erjidaohang", |
| | |
| | | v: "角色管理", |
| | | i: "el-icon-s-tools", |
| | | u: "role-manage", |
| | | p: "" |
| | | p: "selectRoleLists" |
| | | }, { |
| | | v: "用户管理", |
| | | i: "el-icon-s-tools", |
| | | u: "person-manage", |
| | | p: "" |
| | | p: "selectUserList" |
| | | }, { |
| | | v: "客户管理", |
| | | i: "el-icon-s-tools", |
| | |
| | | v: "系统日志", |
| | | i: "el-icon-s-tools", |
| | | u: "system-log", |
| | | p: "selectSystemLogList" |
| | | p: "" |
| | | }, { |
| | | v: "消息详情", |
| | | i: "el-icon-s-tools", |