Merge remote-tracking branch 'origin/dev' into dev-licp
# Conflicts:
# src/components/Table/lims-table.vue
| | |
| | | export function getCertificationDetail(query) { |
| | | return request({ |
| | | url: '/certification/getCertificationDetail', |
| | | method: 'post', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | |
| | | return request({ |
| | | url: '/certification/addCertificationDetail', |
| | | method: 'post', |
| | | params: query |
| | | data: query |
| | | }) |
| | | } |
| | | // å é¤èµè´¨æç»å表 |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // è·ååºææä¸¾å¼ |
| | | // è·åå®éªå®¤åç§° |
| | | export function obtainItemParameterList() { |
| | | return request({ |
| | | url: '/laboratoryScope/obtainItemParameterList', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // æ¥è¯¢å®éªå®¤ç®¡çå表 |
| | | export function selectItemParameter(query) { |
| | | return request({ |
| | | url: '/laboratoryScope/selectItemParameter', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | |
| | | Vue.prototype.HaveJson = (val) => { |
| | | return JSON.parse(JSON.stringify(val)) |
| | | } |
| | | Vue.prototype.javaApi = process.env.VUE_APP_BASE_API |
| | | |
| | | // å
¨å±ç»ä»¶æè½½ |
| | | Vue.component('DictTag', DictTag) |
| | |
| | | <!-- æ£éªé¡¹ç®åæ°è¡¨æ ¼--> |
| | | <div class="table" v-if="radio===0"> |
| | | <lims-table :tableData="tableData" :column="column" |
| | | @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <!-- æ£éªå¯¹è±¡è¡¨æ ¼--> |
| | | <div class="table" v-if="radio===1"> |
| | | <lims-table :tableData="testObjectTableData" :column="testObjectColumn" |
| | | @pagination="pagination" |
| | | :page="testObjectPage" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import BindPartDialog from "@/components/capability/bindPartDialog.vue" |
| | | import BindSupplierDensityDialog from "@/components/capability/bindSupplierDensityDialog.vue" |
| | | import BindPartDialog from "@/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue" |
| | | import BindSupplierDensityDialog from "@/views/structural/capabilityAndLaboratory/capabilityComponents/bindSupplierDensityDialog.vue" |
| | | import { |
| | | addProduct, |
| | | delItemParameter, delProduct, delTestObject, selectItemParameterList, selectProductListByObjectId, |
| | | selectTestObjectList, upProduct, |
| | | } from "@/api/structural/capability"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import EditForm from "@/components/capability/EditForm.vue"; |
| | | import testObjectEditForm from "@/components/capability/testObjectEditForm.vue"; |
| | | import EditForm from "@/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue"; |
| | | import testObjectEditForm from "@/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue"; |
| | | import {getToken} from "@/utils/auth"; |
| | | |
| | | export default { |
| | |
| | | uploadAction: process.env.VUE_APP_BASE_API + '/capacityScope/importExcel', |
| | | uploadAction1: process.env.VUE_APP_BASE_API + '/capacityScope/importEquipData', |
| | | tableData: [], |
| | | tableLoading: false, |
| | | column: [ |
| | | {label: 'æ£éªé¡¹', prop: 'inspectionItem'}, |
| | | {label: 'æ£éªé¡¹EN', prop: 'inspectionItemEn'}, |
| | |
| | | size:10, |
| | | current:0 |
| | | }, |
| | | tableLoading: false, |
| | | addOrUpdate: '', |
| | | tree: null, |
| | | loading: true, |
| | |
| | | productPage: { |
| | | total:0, |
| | | size:10, |
| | | current:0 |
| | | current:0, |
| | | layout: 'total, prev, pager, next' |
| | | }, |
| | | productableLoading: false, |
| | | productEditDia: false, |
| | |
| | | this.resetForm('itemParameterForm') |
| | | this.refreshTable() |
| | | }, |
| | | pagination (page) { |
| | | this.page.size = page.pageNum.limit |
| | | this.refreshTable() |
| | | }, |
| | | // æ£éªé¡¹ç®åæ°æ°å¢ |
| | | openAdd() { |
| | | if (this.radio === 0) { |
ÎļþÃû´Ó src/components/capability/bindPartDialog.vue ÐÞ¸Ä |
| | |
| | | page: { |
| | | total:0, |
| | | size:10, |
| | | current:1 |
| | | current:1, |
| | | layout: 'total, prev, pager, next' |
| | | }, |
| | | bindPartComponent: { |
| | | entity: { |
ÎļþÃû´Ó src/components/capability/bindSupplierDensityDialog.vue ÐÞ¸Ä |
| | |
| | | page: { |
| | | total:0, |
| | | size:10, |
| | | current:1 |
| | | current:1, |
| | | layout: 'total, prev, pager, next' |
| | | }, |
| | | tableLoading: false, |
| | | searchUrl: '', // æ¥è¯¢ |
| | |
| | | <div v-if="radio===0"> |
| | | <lims-table :tableData="tableData" :column="column" |
| | | :isSelection="true" :handleSelectionChange="handleSelectionChange" |
| | | @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <div class="table" v-if="radio===1" v-loading="pageLoading" @scroll="scrollFn"> |
| | | <el-row :gutter="16"> |
| | | <el-col :span="6" v-for="(m,i) in list" :key="i" :xs="24" :sm="12" :md="8" :lg="6" :xl="6" style="margin-bottom: 16px;"> |
| | | <el-col :span="8" v-for="(m,i) in list" :key="i" :xs="24" :sm="12" :md="8" :lg="8" :xl="6" style="margin-bottom: 16px;"> |
| | | <div class="table-item"> |
| | | <el-image style="width: 102px;height: 102px;margin-right: 20px;border-radius: 16px;" :src="process.env.VUE_APP_BASE_API+'/img/'+m.imageUrl"> |
| | | <el-image style="width: 102px;height: 102px;margin-right: 20px;border-radius: 16px;" :src="javaApi +'/img/'+m.imageUrl"> |
| | | <div slot="error" class="image-error" style="width: 100px; |
| | | height: 100px; |
| | | border-radius: 16px; |
| | |
| | | page: { |
| | | total:0, |
| | | size:10, |
| | | current:0 |
| | | current:1 |
| | | }, |
| | | tableLoading: false, |
| | | qualificationsList:[], |
| | |
| | | }, |
| | | methods: { |
| | | selectorSwitch(radio) { |
| | | if(radio === '1'){ |
| | | if(radio === 1){ |
| | | this.list = []; |
| | | this.refreshTable(); |
| | | } |
| | | }, |
| | | refreshTable() { |
| | | if (this.radio === '0') { |
| | | getCertificationDetail({...this.page,...this.queryParams,}).then(res => { |
| | | if (this.radio === 0) { |
| | | this.tableLoading = true; |
| | | getCertificationDetail({...this.page,...this.queryParams}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | | this.tableData = res.data |
| | | this.page.total = res.total |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | |
| | | window.addEventListener("scroll", this.throttle(this.scrollFn, 20000)); |
| | | } |
| | | getCertificationDetail({ |
| | | page: { |
| | | current: this.currentPage, |
| | | size: this.pageSize |
| | | }, |
| | | entity: this.queryParams |
| | | current: this.currentPage, |
| | | size: this.pageSize, |
| | | ...this.queryParams |
| | | }).then(res => { |
| | | if(res.code===200){ |
| | | this.total = res.data.body.total |
| | | let list = res.data.body.records; |
| | | this.total = res.data.total |
| | | let list = res.data.records; |
| | | if(list.length===0){ |
| | | this.finishLoding = true; |
| | | }else{ |
| | |
| | | }, |
| | | // éç½® |
| | | refresh() { |
| | | this.queryParams.name = '' |
| | | this.page.size = 10 |
| | | this.page.current = 1 |
| | | this.refreshTable() |
| | | if(this.radio === 0){ |
| | | this.queryParams.name = '' |
| | | this.page.size = 10 |
| | | this.page.current = 1 |
| | | this.refreshTable() |
| | | } else { |
| | | this.finishLoding = false; |
| | | this.currentPage= 1; |
| | | this.list=[]; |
| | | this.refreshTable() |
| | | } |
| | | }, |
| | | // è¡¨æ ¼å¤é |
| | | handleSelectionChange (selection) { |
| | | this.selection = selection; |
| | | }, |
| | | pagination (page) { |
| | | this.page.size = page.pageNum.limit |
| | | this.refreshTable() |
| | | }, |
| | | // èµè´¨æç»æ¹éå é¤ |
| | | handleDel(){ |
| | |
| | | line-height: 40px; |
| | | margin-bottom: 10px; |
| | | } |
| | | .table-item{ |
| | | border-radius: 8px 8px 8px 8px; |
| | | box-shadow: 4px 4px 8px 0px rgba(51,51,51,0.04); |
| | | border: 1px solid #EEEEEE; |
| | | box-sizing: border-box; |
| | | padding: 14px 12px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
| | |
| | | <script> |
| | | export default { |
| | | name: "index" |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"> |
| | | <el-form-item label="å®éªå®¤åç§°" prop="laboratoryName"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.laboratoryName" |
| | | @keyup.enter.native="refreshTable"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å®éªå®¤ç¼ç " prop="laboratoryNumber"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.laboratoryNumber" |
| | | @keyup.enter.native="refreshTable"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">æ¥ è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="refresh">é ç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="openAdd" icon="el-icon-plus">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <!-- <ValueTable ref="ValueTable" :url="$api.laboratoryScope.selectItemParameter"--> |
| | | <!-- :upUrl="$api.laboratoryScope.upParameter" :delUrl="$api.laboratoryScope.delParameter"--> |
| | | <!-- :componentData="componentData" :key="upIndex" />--> |
| | | <lims-table :tableData="tableData" :column="column" |
| | | @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <el-dialog title="å°ç« 管ç" :visible.sync="fileVisible" width="60vw"> |
| | | <div class="btns"> |
| | | <el-button size="medium" type="primary" @click="openUpload">æ´æ°å°ç« </el-button> |
| | | </div> |
| | | <!-- <ValueTable ref="ValueTable0" :url="$api.sealScope.selectSeal"--> |
| | | <!-- :componentData="fileComponentData" :key="upIndex" style="height: 400px;" />--> |
| | | </el-dialog> |
| | | <el-dialog title="æ´æ°å°ç« " :visible.sync="upFileVisible" width="400px"> |
| | | <div class="search_thing" style="margin-bottom: 16px;"> |
| | | <div class="search_label" style="width:90px">å°ç« ç±»åï¼</div> |
| | | <div class="search_input"> |
| | | <el-cascader |
| | | v-model="dataForm.type" |
| | | :options="options" |
| | | :show-all-levels="false" |
| | | :props="props" |
| | | placeholder="è¯·éæ©" size="small" |
| | | style="width:100%" |
| | | collapse-tags |
| | | clearable></el-cascader> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label" style="width:90px">å°ç« å¾çï¼</div> |
| | | <div class="search_input"> |
| | | <el-upload |
| | | :action="action" |
| | | :headers="headers" |
| | | accept='image/jpg,image/jpeg,image/png' |
| | | :show-file-list="false" |
| | | :on-success="handleSuccess" |
| | | :on-change="beforeUpload" |
| | | ref="upload" |
| | | :on-error="onError" |
| | | > |
| | | <img v-if="dataForm.address" :src="javaApi+'/img/'+dataForm.address" style="width: 110px;height: 110px;" > |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="upFileVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="confirmConnect" :loading="loading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped lang="scss"> |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {selectItemParameter} from "@/api/structural/laboratoryScope"; |
| | | |
| | | export default { |
| | | components: { |
| | | limsTable |
| | | |
| | | }, |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | queryParams: { |
| | | laboratoryName: '', |
| | | laboratoryNumber: '', |
| | | }, |
| | | tableData: [], |
| | | tableLoading: false, |
| | | column: [ |
| | | {label: 'å®éªå®¤åç§°', prop: 'laboratoryName'}, |
| | | {label: 'åºæç¼ç ', prop: 'laboratoryNumber'}, |
| | | {label: 'å®éªå®¤ä»£å·', prop: 'laboratoryCode'}, |
| | | {label: 'è´è´£äºº', prop: 'head'}, |
| | | {label: 'è´è´£äººçµè¯', prop: 'phoneNumber'}, |
| | | {label: 'å°å', prop: 'address'}, |
| | | {label: 'å建人', prop: 'createUserName'}, |
| | | {label: 'å建æ¶é´', prop: 'createTime'}, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | label: 'æä½', |
| | | width: '140px', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.editForm(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.delete(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å°ç« 管ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.fileManagement(row); |
| | | }, |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | page: { |
| | | total:0, |
| | | size:10, |
| | | current:1 |
| | | }, |
| | | componentData: { |
| | | entity: { |
| | | laboratoryName: null, |
| | | laboratoryNumber: null, |
| | | head: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [{ |
| | | id: 'update', |
| | | font: 'ç¼è¾', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | field: ['createUserName'] |
| | | }, { |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy' |
| | | }, { |
| | | id: '', |
| | | font: 'å°ç« 管ç', |
| | | type: 'text', |
| | | method: 'fileManagement' |
| | | }], |
| | | tagField: { |
| | | type:{ |
| | | select:[] |
| | | } |
| | | }, |
| | | selectField: {}, |
| | | requiredAdd: ['laboratoryName', 'laboratoryNumber', 'head', 'phoneNumber'], |
| | | requiredUp: ['laboratoryName', 'laboratoryNumber', 'head', 'phoneNumber'], |
| | | needSort: ['laboratoryName', 'createTime'], |
| | | }, |
| | | fileComponentData: { |
| | | entity: { |
| | | labId:null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | isPage:false, |
| | | init:false, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [], |
| | | tagField: {}, |
| | | selectField: { |
| | | type:{ |
| | | select:[] |
| | | } |
| | | }, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | addUpload:['address'], |
| | | }, |
| | | entityCopy: {}, |
| | | fileVisible:false, |
| | | upFileVisible:false, |
| | | loading:false, |
| | | dataForm:{ |
| | | type:'', |
| | | address:'', |
| | | }, |
| | | props: { multiple: false,emitPath:false,}, |
| | | options:[ |
| | | { |
| | | value:'å®éªå®¤èµè´¨', |
| | | label:'å®éªå®¤èµè´¨', |
| | | children:[] |
| | | }, |
| | | { |
| | | value:'å§ææ¥å', |
| | | label:'å§ææ¥å', |
| | | children:null |
| | | }, |
| | | { |
| | | value:'è¿åæ¥å', |
| | | label:'è¿åæ¥å', |
| | | children:null |
| | | }, |
| | | ], |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.getCertificationDetail() |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | | this.tableLoading = true |
| | | selectItemParameter({...this.page, ...this.itemParameterForm}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | getCertificationDetail(){ |
| | | this.$axios.post(this.$api.certification.getCertificationDetail, { |
| | | 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.map(m=>{ |
| | | m.value = m.name; |
| | | m.label = m.name; |
| | | return m |
| | | }) |
| | | this.options[0].children = arr; |
| | | this.fileComponentData.selectField.type.select = arr; |
| | | }) |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.refreshTable() |
| | | }, |
| | | pagination (page) { |
| | | this.page.size = page.pageNum.limit |
| | | this.refreshTable() |
| | | }, |
| | | openAdd() { |
| | | this.$refs.ValueTable.openAddDia(this.$api.laboratoryScope.addParameter); |
| | | }, |
| | | openUpload(){ |
| | | this.dataForm.type = ''; |
| | | this.dataForm.address = ''; |
| | | this.upFileVisible = true; |
| | | }, |
| | | fileManagement(row){ |
| | | this.fileVisible = true; |
| | | this.fileComponentData.entity.labId = row.id; |
| | | this.$nextTick(function () { |
| | | this.$refs['ValueTable0'].selectList('page') |
| | | }) |
| | | }, |
| | | confirmConnect(){ |
| | | if(!this.dataForm.type){ |
| | | this.$message.error('æªä¸éæ©å°ç« ç±»å'); |
| | | return |
| | | } |
| | | if(!this.dataForm.address){ |
| | | this.$message.error('æªä¸ä¼ å°ç« '); |
| | | return |
| | | } |
| | | this.loading = true; |
| | | this.$axios.post(this.$api.sealScope.addSeal, { |
| | | labId:this.fileComponentData.entity.labId, |
| | | ...this.dataForm |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.loading = false; |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$refs['ValueTable0'].selectList('page') |
| | | this.upFileVisible = false; |
| | | }) |
| | | }, |
| | | handleSuccess(response,){ |
| | | if (response.code == 200) { |
| | | this.dataForm.address = response.data.url |
| | | } |
| | | }, |
| | | beforeUpload(file,type) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList,type) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .search { |
| | | height: 46px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |