From 00edab233e6268cdd2bd0fdb5627d3fbd85b04e7 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 17 二月 2025 13:19:53 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev-licp
---
src/api/structural/laboratory.js | 4
src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue | 3
src/views/structural/premises/index.vue | 365 ++++++++++++++++++++++++++++++++++++++++++++-
src/api/structural/laboratoryScope.js | 10 +
src/main.js | 1
src/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue | 0
src/views/structural/capabilityAndLaboratory/laboratory/index.vue | 59 +++++--
src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue | 0
src/views/structural/capabilityAndLaboratory/capabilityComponents/bindSupplierDensityDialog.vue | 3
src/views/structural/capabilityAndLaboratory/capability/index.vue | 19 +
10 files changed, 426 insertions(+), 38 deletions(-)
diff --git a/src/api/structural/laboratory.js b/src/api/structural/laboratory.js
index bf318db..86ea252 100644
--- a/src/api/structural/laboratory.js
+++ b/src/api/structural/laboratory.js
@@ -4,7 +4,7 @@
export function getCertificationDetail(query) {
return request({
url: '/certification/getCertificationDetail',
- method: 'post',
+ method: 'get',
params: query
})
}
@@ -13,7 +13,7 @@
return request({
url: '/certification/addCertificationDetail',
method: 'post',
- params: query
+ data: query
})
}
// 鍒犻櫎璧勮川鏄庣粏鍒楄〃
diff --git a/src/api/structural/laboratoryScope.js b/src/api/structural/laboratoryScope.js
index 4fa59a1..bd8680b 100644
--- a/src/api/structural/laboratoryScope.js
+++ b/src/api/structural/laboratoryScope.js
@@ -1,9 +1,17 @@
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
+ })
+}
diff --git a/src/main.js b/src/main.js
index 2be086c..5d36f6c 100644
--- a/src/main.js
+++ b/src/main.js
@@ -51,6 +51,7 @@
Vue.prototype.HaveJson = (val) => {
return JSON.parse(JSON.stringify(val))
}
+Vue.prototype.javaApi = process.env.VUE_APP_BASE_API
// 鍏ㄥ眬缁勪欢鎸傝浇
Vue.component('DictTag', DictTag)
diff --git a/src/views/structural/capabilityAndLaboratory/capability/index.vue b/src/views/structural/capabilityAndLaboratory/capability/index.vue
index e23cb5b..033f101 100644
--- a/src/views/structural/capabilityAndLaboratory/capability/index.vue
+++ b/src/views/structural/capabilityAndLaboratory/capability/index.vue
@@ -46,11 +46,13 @@
<!-- 妫�楠岄」鐩弬鏁拌〃鏍�-->
<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>
@@ -110,16 +112,16 @@
</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 {
@@ -129,6 +131,7 @@
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'},
@@ -280,7 +283,6 @@
size:10,
current:0
},
- tableLoading: false,
addOrUpdate: '',
tree: null,
loading: true,
@@ -334,7 +336,8 @@
productPage: {
total:0,
size:10,
- current:0
+ current:0,
+ layout: 'total, prev, pager, next'
},
productableLoading: false,
productEditDia: false,
@@ -461,6 +464,10 @@
this.resetForm('itemParameterForm')
this.refreshTable()
},
+ pagination (page) {
+ this.page.size = page.pageNum.limit
+ this.refreshTable()
+ },
// 妫�楠岄」鐩弬鏁版柊澧�
openAdd() {
if (this.radio === 0) {
diff --git a/src/components/capability/EditForm.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue
similarity index 100%
rename from src/components/capability/EditForm.vue
rename to src/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue
diff --git a/src/components/capability/bindPartDialog.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue
similarity index 98%
rename from src/components/capability/bindPartDialog.vue
rename to src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue
index 5fca2f6..bf2716e 100644
--- a/src/components/capability/bindPartDialog.vue
+++ b/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue
@@ -99,7 +99,8 @@
page: {
total:0,
size:10,
- current:1
+ current:1,
+ layout: 'total, prev, pager, next'
},
bindPartComponent: {
entity: {
diff --git a/src/components/capability/bindSupplierDensityDialog.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindSupplierDensityDialog.vue
similarity index 98%
rename from src/components/capability/bindSupplierDensityDialog.vue
rename to src/views/structural/capabilityAndLaboratory/capabilityComponents/bindSupplierDensityDialog.vue
index 5e835b6..145b3a0 100644
--- a/src/components/capability/bindSupplierDensityDialog.vue
+++ b/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindSupplierDensityDialog.vue
@@ -89,7 +89,8 @@
page: {
total:0,
size:10,
- current:1
+ current:1,
+ layout: 'total, prev, pager, next'
},
tableLoading: false,
searchUrl: '', // 鏌ヨ
diff --git a/src/components/capability/testObjectEditForm.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue
similarity index 100%
rename from src/components/capability/testObjectEditForm.vue
rename to src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue
diff --git a/src/views/structural/capabilityAndLaboratory/laboratory/index.vue b/src/views/structural/capabilityAndLaboratory/laboratory/index.vue
index c91342e..8d66a13 100644
--- a/src/views/structural/capabilityAndLaboratory/laboratory/index.vue
+++ b/src/views/structural/capabilityAndLaboratory/laboratory/index.vue
@@ -32,13 +32,14 @@
<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;
@@ -184,7 +185,7 @@
page: {
total:0,
size:10,
- current:0
+ current:1
},
tableLoading: false,
qualificationsList:[],
@@ -214,18 +215,19 @@
},
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
@@ -240,15 +242,13 @@
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{
@@ -271,14 +271,25 @@
},
// 閲嶇疆
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(){
@@ -405,4 +416,14 @@
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>
diff --git a/src/views/structural/premises/index.vue b/src/views/structural/premises/index.vue
index 65bfbb8..c2b8d10 100644
--- a/src/views/structural/premises/index.vue
+++ b/src/views/structural/premises/index.vue
@@ -1,13 +1,362 @@
-<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>
--
Gitblit v1.9.3