From 3ee153c34cd734bdb5845b60e6a207884d3b0838 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 22 四月 2026 17:58:36 +0800
Subject: [PATCH] 报告编制:印章生成调整
---
src/views/structural/premises/index.vue | 489 ++++++++++++++++++++++++++++++++++-------------------
1 files changed, 311 insertions(+), 178 deletions(-)
diff --git a/src/views/structural/premises/index.vue b/src/views/structural/premises/index.vue
index 2b9b750..be8d4c2 100644
--- a/src/views/structural/premises/index.vue
+++ b/src/views/structural/premises/index.vue
@@ -2,82 +2,190 @@
<div class="capacity-scope">
<div class="search">
<div>
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
+ <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-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-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" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable"
+ >鏌ヨ</el-button
+ >
<el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
<div>
- <el-button size="small" type="primary" @click="openAdd('add')" icon="el-icon-plus">鏂板</el-button>
+ <el-button
+ size="small"
+ type="primary"
+ @click="openAdd('add')"
+ icon="el-icon-plus"
+ >鏂板</el-button
+ >
</div>
</div>
<div class="table">
- <lims-table :tableData="tableData" :column="column" :height="'calc(100vh - 250px)'" @pagination="pagination"
- :page="page" :tableLoading="tableLoading"></lims-table>
+ <lims-table
+ :tableData="tableData"
+ :column="column"
+ :height="'calc(100vh - 250px)'"
+ @pagination="pagination"
+ :page="page"
+ :tableLoading="tableLoading"
+ ></lims-table>
</div>
<!-- 鏂板瀹為獙瀹�-->
<el-dialog :title="formTitle" :visible.sync="addDia" width="450px">
- <el-form ref="laboratoryForm" :model="laboratoryForm" :rules="userRules" label-position="right"
- label-width="100px">
+ <el-form
+ ref="laboratoryForm"
+ :model="laboratoryForm"
+ :rules="userRules"
+ label-position="right"
+ label-width="100px"
+ >
<el-form-item label="瀹為獙瀹ゅ悕绉�" prop="laboratoryName">
- <el-input v-model="laboratoryForm.laboratoryName" size="small" clearable></el-input>
+ <el-input
+ v-model="laboratoryForm.laboratoryName"
+ size="small"
+ clearable
+ ></el-input>
</el-form-item>
<el-form-item label="鍦烘墍缂栫爜" prop="laboratoryNumber">
- <el-input v-model="laboratoryForm.laboratoryNumber" size="small" clearable></el-input>
+ <el-input
+ v-model="laboratoryForm.laboratoryNumber"
+ size="small"
+ clearable
+ ></el-input>
</el-form-item>
<el-form-item label="瀹為獙瀹や唬鍙�" prop="laboratoryCode">
- <el-input v-model="laboratoryForm.laboratoryCode" size="small" clearable></el-input>
+ <el-input
+ v-model="laboratoryForm.laboratoryCode"
+ size="small"
+ clearable
+ ></el-input>
</el-form-item>
<el-form-item label="璐熻矗浜�" prop="head">
- <el-input v-model="laboratoryForm.head" size="small" clearable></el-input>
+ <el-input
+ v-model="laboratoryForm.head"
+ size="small"
+ clearable
+ ></el-input>
</el-form-item>
<el-form-item label="璐熻矗浜虹數璇�" prop="phoneNumber">
- <el-input v-model="laboratoryForm.phoneNumber" size="small" clearable></el-input>
+ <el-input
+ v-model="laboratoryForm.phoneNumber"
+ size="small"
+ clearable
+ ></el-input>
</el-form-item>
<el-form-item label="鍦板潃" prop="address">
- <el-input v-model="laboratoryForm.address" size="small" clearable></el-input>
+ <el-input
+ v-model="laboratoryForm.address"
+ size="small"
+ clearable
+ ></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="reset">鍙� 娑�</el-button>
- <el-button type="primary" @click="customAdd" :loading="loading">纭� 瀹�</el-button>
+ <el-button type="primary" @click="customAdd" :loading="loading"
+ >纭� 瀹�</el-button
+ >
</span>
</el-dialog>
<el-dialog title="鍗扮珷绠$悊" :visible.sync="fileVisible" width="60vw">
<div class="btns">
- <el-button size="medium" type="primary" @click="openUpload">鏇存柊鍗扮珷</el-button>
+ <el-button size="medium" type="primary" @click="openUpload"
+ >鏇存柊鍗扮珷</el-button
+ >
</div>
- <lims-table :tableData="fileComponentData" :column="fileComponentDataColumn" @pagination="fileComponentPagination"
- height="500px" :page="fileComponentPage" :tableLoading="fileComponentTableLoading"></lims-table>
+ <lims-table
+ :tableData="fileComponentData"
+ :column="fileComponentDataColumn"
+ @pagination="fileComponentPagination"
+ height="500px"
+ :page="fileComponentPage"
+ :tableLoading="fileComponentTableLoading"
+ ></lims-table>
</el-dialog>
<el-dialog title="鏇存柊鍗扮珷" :visible.sync="upFileVisible" width="400px">
- <el-form ref="dataForm" :model="dataForm" :rules="dataFormRules" label-position="right" label-width="80px">
+ <el-form
+ ref="dataForm"
+ :model="dataForm"
+ :rules="dataFormRules"
+ label-position="right"
+ label-width="80px"
+ >
+ <el-form-item label="鎵�灞炲煙" prop="contract">
+ <el-select
+ v-model="dataForm.contract"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ style="width: 100%"
+ >
+ <el-option label="ZTNS" value="ZTNS" />
+ <el-option label="KJNS" value="KJNS" />
+ </el-select>
+ </el-form-item>
<el-form-item label="鍗扮珷绫诲瀷" prop="type">
- <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>
+ <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>
</el-form-item>
<el-form-item label="鍗扮珷鍥剧墖" prop="address">
- <el-upload class="avatar-uploader" :action="action" :headers="uploadHeader"
- 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" class="avatar">
+ <el-upload
+ class="avatar-uploader"
+ :action="action"
+ :headers="uploadHeader"
+ 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"
+ class="avatar"
+ />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="upFileVisible = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="confirmConnect" :loading="loading">纭� 瀹�</el-button>
+ <el-button type="primary" @click="confirmConnect" :loading="loading"
+ >纭� 瀹�</el-button
+ >
</span>
</el-dialog>
</div>
@@ -91,282 +199,307 @@
delParameter,
selectItemParameter,
selectSeal,
- upParameter
+ upParameter,
} from "@/api/structural/laboratoryScope";
import { getCertificationDetail } from "@/api/structural/laboratory";
export default {
components: {
- limsTable
-
+ limsTable,
},
computed: {
action() {
- return this.javaApi + '/deviceScope/uploadFile'
- }
+ return this.javaApi + "/deviceScope/uploadFile";
+ },
},
data() {
return {
queryParams: {
- laboratoryName: '',
- laboratoryNumber: '',
+ 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' },
+ { 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',
- label: '鎿嶄綔',
+ dataType: "action",
+ label: "鎿嶄綔",
operation: [
{
- name: '缂栬緫',
- type: 'text',
+ name: "缂栬緫",
+ type: "text",
clickFun: (row) => {
- this.openAdd('edit', row);
+ this.openAdd("edit", row);
},
},
{
- name: '鍒犻櫎',
- type: 'text',
- clickFun: (row) => {
- this.delete(row);
- },
- },
- {
- name: '鍗扮珷绠$悊',
- type: 'text',
+ name: "鍗扮珷绠$悊",
+ type: "text",
clickFun: (row) => {
this.fileManagement(row);
},
},
- ]
- }
+ {
+ name: "鍒犻櫎",
+ type: "text",
+ clickFun: (row) => {
+ this.delete(row);
+ },
+ },
+ ],
+ },
],
page: {
total: 0,
size: 10,
- current: 1
+ current: 1,
},
addDia: false,
- formTitle: '',
- laboratoryForm: {
-
- },
- operationType: '',
+ formTitle: "",
+ laboratoryForm: {},
+ operationType: "",
userRules: {
- laboratoryName: [{ required: true, message: '璇疯緭鍏ュ疄楠屽鍚嶇О', trigger: 'blur' }],
- laboratoryNumber: [{ required: true, message: '璇疯緭鍏ュ満鎵�缂栫爜', trigger: 'blur' }],
- head: [{ required: true, message: '璇疯緭鍏ヨ礋璐d汉', trigger: 'blur' }],
- phoneNumber: [{ required: true, message: '璇疯緭鍏ヨ礋璐d汉鐢佃瘽', trigger: 'blur' }],
+ laboratoryName: [
+ { required: true, message: "璇疯緭鍏ュ疄楠屽鍚嶇О", trigger: "blur" },
+ ],
+ laboratoryNumber: [
+ { required: true, message: "璇疯緭鍏ュ満鎵�缂栫爜", trigger: "blur" },
+ ],
+ head: [{ required: true, message: "璇疯緭鍏ヨ礋璐d汉", trigger: "blur" }],
+ phoneNumber: [
+ { required: true, message: "璇疯緭鍏ヨ礋璐d汉鐢佃瘽", trigger: "blur" },
+ ],
},
currentRow: {},
fileComponentTableLoading: false,
fileComponentData: [],
fileComponentDataColumn: [
- { label: '瀹為獙瀹ゅ悕绉�', prop: 'laboratoryName' },
- { label: '鍗扮珷鍥剧墖', prop: 'address', dataType: 'image' },
- { label: '鍗扮珷绫诲瀷', prop: 'type' },
+ { label: "瀹為獙瀹ゅ悕绉�", prop: "laboratoryName" },
+ { label: "鎵�灞炲煙", prop: "contract" },
+ { label: "鍗扮珷鍥剧墖", prop: "address", dataType: "image" },
+ { label: "鍗扮珷绫诲瀷", prop: "type" },
],
fileComponentPage: {
total: 0,
size: 10,
current: 1,
- layout: 'total, prev, pager, next'
+ layout: "total, prev, pager, next",
},
fileVisible: false,
upFileVisible: false,
loading: false,
dataForm: {
- type: '',
- address: '',
+ contract: "",
+ type: "",
+ address: "",
},
dataFormRules: {
- type: [{ required: true, message: '璇烽�夋嫨鍗扮珷绫诲瀷', trigger: 'change' }],
- address: [{ required: false, message: '璇蜂笂浼犲浘鐗�', trigger: 'change' }],
+ contract: [
+ { required: true, message: "璇烽�夋嫨鎵�灞炲煙", trigger: "change" },
+ ],
+ type: [
+ { required: true, message: "璇烽�夋嫨鍗扮珷绫诲瀷", trigger: "change" },
+ ],
+ address: [
+ { required: false, message: "璇蜂笂浼犲浘鐗�", trigger: "change" },
+ ],
},
- props: { multiple: false, emitPath: false, },
+ props: { multiple: false, emitPath: false },
options: [
{
- value: '瀹為獙瀹よ祫璐�',
- label: '瀹為獙瀹よ祫璐�',
- children: []
+ value: "瀹為獙瀹よ祫璐�",
+ label: "瀹為獙瀹よ祫璐�",
+ children: [],
},
{
- value: '濮旀墭鎶ュ憡',
- label: '濮旀墭鎶ュ憡',
- children: null
+ value: "濮旀墭鎶ュ憡",
+ label: "濮旀墭鎶ュ憡",
+ children: null,
},
{
- value: '杩涘巶鎶ュ憡',
- label: '杩涘巶鎶ュ憡',
- children: null
+ value: "杩涘巶鎶ュ憡",
+ label: "杩涘巶鎶ュ憡",
+ children: null,
},
],
- }
+ };
},
mounted() {
- this.refreshTable()
+ this.refreshTable();
},
methods: {
refreshTable() {
- this.tableLoading = true
- selectItemParameter({ ...this.page, ...this.queryParams }).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
- })
+ this.tableLoading = true;
+ selectItemParameter({ ...this.page, ...this.queryParams })
+ .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;
+ });
},
// 閲嶇疆
refresh() {
- this.resetForm('queryForm')
- this.refreshTable()
+ this.resetForm("queryForm");
+ this.refreshTable();
},
// 鍒嗛〉鍒囨崲
pagination(page) {
- this.page.size = page.limit
- this.refreshTable()
+ this.page.size = page.limit;
+ this.refreshTable();
},
openAdd(type, row) {
- this.formTitle = type === 'add' ? '鏂板瀹為獙瀹�' : '缂栬緫瀹為獙瀹�'
- this.operationType = type
- if (type === 'edit') {
- this.laboratoryForm = this.HaveJson(row)
+ this.formTitle = type === "add" ? "鏂板瀹為獙瀹�" : "缂栬緫瀹為獙瀹�";
+ this.operationType = type;
+ if (type === "edit") {
+ this.laboratoryForm = this.HaveJson(row);
}
- this.addDia = true
+ this.addDia = true;
},
// 鎻愪氦鏂板銆佺紪杈戝疄楠屽琛ㄥ崟
customAdd() {
- this.$refs['laboratoryForm'].validate((valid) => {
+ this.$refs["laboratoryForm"].validate((valid) => {
if (valid) {
- this.loading = true
- if (this.operationType === 'add') {
- addParameter(this.laboratoryForm).then(res => {
- this.loading = false
- if (res.code !== 200) return
- this.$message.success('鏂板鎴愬姛')
- this.refreshTable()
- this.reset()
- }).catch(err => {
- this.loading = false
- })
+ this.loading = true;
+ if (this.operationType === "add") {
+ addParameter(this.laboratoryForm)
+ .then((res) => {
+ this.loading = false;
+ if (res.code !== 200) return;
+ this.$message.success("鏂板鎴愬姛");
+ this.refreshTable();
+ this.reset();
+ })
+ .catch((err) => {
+ this.loading = false;
+ });
} else {
- upParameter(this.laboratoryForm).then(res => {
- this.loading = false
- if (res.code !== 200) return
- this.$message.success('淇敼鎴愬姛')
- this.refreshTable()
- this.reset()
- }).catch(err => {
- this.loading = false
- })
+ upParameter(this.laboratoryForm)
+ .then((res) => {
+ this.loading = false;
+ if (res.code !== 200) return;
+ this.$message.success("淇敼鎴愬姛");
+ this.refreshTable();
+ this.reset();
+ })
+ .catch((err) => {
+ this.loading = false;
+ });
}
}
- })
+ });
},
reset() {
- this.resetForm('laboratoryForm')
- this.addDia = false
+ this.resetForm("laboratoryForm");
+ this.addDia = false;
},
// 鍒犻櫎瀹為獙瀹�
delete(row) {
- this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", {
+ this.$confirm("鏄惁鍒犻櫎褰撳墠鏁版嵁?", "璀﹀憡", {
confirmButtonText: "纭畾",
cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(() => {
- delParameter({ id: row.id }).then(res => {
- this.$message.success('鍒犻櫎鎴愬姛')
- this.refreshTable()
+ type: "warning",
+ })
+ .then(() => {
+ delParameter({ id: row.id }).then((res) => {
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.refreshTable();
+ });
})
- }).catch(() => { })
+ .catch(() => {});
},
// 鎵撳紑鍗扮珷绠$悊寮规
fileManagement(row) {
this.fileVisible = true;
- this.fileComponentTableLoading = true
- this.currentRow = row
- this.getFileComponentList()
+ this.fileComponentTableLoading = true;
+ this.currentRow = row;
+ this.getFileComponentList();
},
getFileComponentList() {
- selectSeal({ id: this.currentRow.id, ...this.fileComponentPage }).then(res => {
- this.fileComponentTableLoading = false
- if (res.code === 200) {
- this.fileComponentData = res.data.records
- this.fileComponentPage.total = res.data.total
- }
- }).catch(err => {
- this.fileComponentTableLoading = false
- })
+ selectSeal({ id: this.currentRow.id, ...this.fileComponentPage })
+ .then((res) => {
+ this.fileComponentTableLoading = false;
+ if (res.code === 200) {
+ this.fileComponentData = res.data.records;
+ this.fileComponentPage.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.fileComponentTableLoading = false;
+ });
},
fileComponentPagination(page) {
- this.fileComponentPage.size = page.limit
- this.getFileComponentList()
+ this.fileComponentPage.size = page.limit;
+ this.getFileComponentList();
},
// 鎵撳紑鏇存柊鍗扮珷寮规
openUpload() {
- this.dataForm.type = '';
- this.dataForm.address = '';
+ this.dataForm.contract = "";
+ this.dataForm.type = "";
+ this.dataForm.address = "";
this.upFileVisible = true;
- this.getCertificationOperation()
+ this.getCertificationOperation();
},
// 鏌ヨ鍗扮珷绫诲瀷
getCertificationOperation() {
const params = {
current: -1,
size: -1,
- }
- getCertificationDetail(params).then(res => {
- this.options[0].children = res.data.records.map(m => {
+ };
+ getCertificationDetail(params).then((res) => {
+ this.options[0].children = res.data.records.map((m) => {
m.value = m.name;
m.label = m.name;
- return m
+ return m;
});
- })
+ });
},
// 鎻愪氦鏇存柊鍗扮珷
confirmConnect() {
- this.$refs['dataForm'].validate((valid) => {
+ this.$refs["dataForm"].validate((valid) => {
if (valid) {
this.loading = true;
- addSeal({ labId: this.currentRow.id, ...this.dataForm }).then(res => {
- this.loading = false;
- this.getFileComponentList()
- this.upFileVisible = false;
- })
+ addSeal({ labId: this.currentRow.id, ...this.dataForm }).then(
+ (res) => {
+ this.loading = false;
+ this.getFileComponentList();
+ this.upFileVisible = false;
+ }
+ );
}
- })
+ });
},
- handleSuccess(response,) {
+ handleSuccess(response) {
if (response.code === 200) {
- this.dataForm.address = response.data.url
+ this.dataForm.address = response.data.url;
}
},
beforeUpload(file, type) {
if (file.size > 1024 * 1024 * 10) {
- this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
- this.$refs.upload.clearFiles()
+ 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()
+ this.$message.error("涓婁紶澶辫触");
+ this.$refs.upload.clearFiles();
},
- }
-}
+ },
+};
</script>
<style scoped>
.search {
@@ -393,7 +526,7 @@
}
.avatar-uploader ::v-deep .el-upload:hover {
- border-color: #409EFF;
+ border-color: #409eff;
}
.avatar-uploader-icon {
--
Gitblit v1.9.3