From e9c7fa1915cd2afbadaef1884324fa7cd5aaaf25 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期二, 29 七月 2025 10:12:06 +0800
Subject: [PATCH] Merge branch 'dev_y_ztns' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev_y_ztns
---
src/views/CNAS/resourceDemand/device/component/operationInstruction.vue | 86 ++++++++++++++++++------------------------
1 files changed, 37 insertions(+), 49 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue b/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
index 318eca1..31bcab9 100644
--- a/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
+++ b/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
@@ -1,18 +1,12 @@
<!-- 浣滀笟鎸囧涔� -->
<template>
<div>
- <div style="width:100%;height:30px;margin:5px 0px">
- <el-row>
- <el-col :span="12" style="text-align: left;">
- <p style="line-height: 30px;">浣滀笟鎸囧涔�</p>
- </el-col>
- <el-col :span="12" style="text-align: right;">
- <el-button size="small" type="primary" @click="getList">鍒锋柊</el-button>
- <el-button size="small" type="primary" @click="dialogVisible = true">鍙楁帶鐢宠</el-button>
- </el-col>
- </el-row>
+ <div style="margin: 10px 0;text-align: right">
+ <el-button size="small" type="primary" @click="getList">鍒锋柊</el-button>
+ <el-button size="small" type="primary" @click="dialogVisible = true">鍙楁帶鐢宠</el-button>
</div>
- <el-table :data="tableData" border height="calc(100vh - 18em)">
+ <el-table :data="tableData" border height="calc(100vh - 18em)"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }">
<el-table-column type="index" label="搴忓彿" width="120">
<template v-slot="scope">
<span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span>
@@ -46,7 +40,7 @@
</el-table>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="1"
:page-sizes="[10, 20, 30, 50, 100]" :page-size="search.size" layout="->,total, sizes, prev, pager, next, jumper"
- :total="search.total">
+ :total="search.total" background>
</el-pagination>
<el-dialog :visible.sync="dialogVisible" title="鍙楁帶鐢宠" width="60%">
<div style="height: 60vh; overflow-y: auto; overflow-x: hidden;">
@@ -58,8 +52,8 @@
</el-form-item>
<el-form-item label="闄勪欢锛�" style="float: left;">
<el-upload ref="uploadFile" :action="action" :before-remove="beforeRemove" :file-list="fileList1"
- :headers="headers" :limit="1" :on-error="onError" :on-exceed="handleExceed" :on-remove="handleRemove1"
- :on-success="onSuccess1" class="upload-demo" multiple>
+ :headers="uploadHeader" :limit="1" :on-error="onError" :on-exceed="handleExceed"
+ :on-remove="handleRemove1" :on-success="onSuccess1" class="upload-demo" multiple>
<el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
</el-upload>
</el-form-item>
@@ -86,7 +80,8 @@
<el-button size="small" @click="delFile">鍒犻櫎</el-button>
</div>
<el-table :data="documentTableData" border style="width: 100%;" tooltip-effect="dark" :row-key="getRowKey"
- @selection-change="handleSelectionChange" height="30em">
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
+ @selection-change="handleSelectionChange" height="29em">
<el-table-column type="selection" width="55%">
</el-table-column>
<el-table-column label="搴忓彿" prop="id" type="index" width="60"></el-table-column>
@@ -165,8 +160,8 @@
<el-col :span="24">
<el-form-item label="闄勪欢锛�" style="float: left;">
<el-upload ref="uploadFile" :action="action" :before-remove="beforeRemove" :file-list="fileList"
- :headers="headers" :limit="1" :on-error="onError" :on-exceed="handleExceed" :on-remove="handleRemove"
- :on-success="onSuccess" class="upload-demo" multiple>
+ :headers="uploadHeader" :limit="1" :on-error="onError" :on-exceed="handleExceed"
+ :on-remove="handleRemove" :on-success="onSuccess" class="upload-demo" multiple>
<el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
</el-upload>
</el-form-item>
@@ -184,7 +179,15 @@
<script>
import fileDownload from "@/utils/file";
-
+import {
+ approvalOfHomeworkInstructionManual,
+ homeworkGuidebook,
+ homeworkGuidebookEditor,
+ newHomeworkGuidebookAdded,
+ deleteHomeworkGuidebook,
+ pageByPageQueryOfHomeworkInstructions,
+ selectDeviceParameter,
+} from '@/api/cnas/resourceDemand/device.js'
export default {
props: {
clickNodeVal: {
@@ -275,13 +278,14 @@
});
},
approvalFun(id, status) {
- this.$axios.get(this.$api.deviceCheck.approvalOfHomeworkInstructionManual + "?id=" + id + "&status=" + status).then(res => {
+ approvalOfHomeworkInstructionManual({ id, status }).then(res => {
this.getList()
+ this.$message({
+ type: 'success',
+ message: '鎿嶄綔鎴愬姛!'
+ });
})
- this.$message({
- type: 'success',
- message: '鎿嶄綔鎴愬姛!'
- });
+
},
getRowKey(row) {
return row.index
@@ -292,7 +296,10 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- this.$axios.get(this.$api.deviceCheck.homeworkGuidebook + "?id=" + row.id + "&instructionId=" + row.instructionId).then(res => {
+ homeworkGuidebook({
+ id: row.id,
+ instructionId: row.instructionId
+ }).then(res => {
this.$message.success('鍒犻櫎鎴愬姛锛�')
this.getList()
})
@@ -319,7 +326,7 @@
},
instructionEditFun(row) {
this.dialogVisible = true
- this.$axios.get(this.$api.deviceCheck.homeworkGuidebookEditor + "?instructionId=" + row.instructionId).then(res => {
+ homeworkGuidebookEditor({ instructionId: row.instructionId }).then(res => {
if (res.code == 200) {
this.instructionForm = res.data.instruction;
if (this.instructionForm.fileSystemName) {
@@ -345,11 +352,7 @@
this.$refs.form1.validate((valid) => {
if (valid) {
this.instructionForm.feTempHumRecordList = this.documentTableData
- this.$axios.post(this.$api.deviceCheck.newHomeworkGuidebookAdded, this.instructionForm, {
- headers: {
- 'Content-Type': 'application/json'
- }
- }).then(res => {
+ newHomeworkGuidebookAdded(this.instructionForm).then(res => {
if (res.code == 200) {
this.$message.success('鎿嶄綔鎴愬姛锛�')
this.dialogVisible = false
@@ -445,7 +448,7 @@
.filter(item => item.id !== undefined)
.map(item => item.id).join(',');
//鏈夐敊璇�
- const res = await this.$axios.get(this.$api.deviceCheck.deleteHomeworkGuidebook + '?ids=' + ids);
+ const res = await deleteHomeworkGuidebook({ ids });
if (res.code === 200) {
// 鍒犻櫎瑙嗗浘鐨勬暟鎹�
for (const resKey in this.selectedRow) {
@@ -483,7 +486,7 @@
this.$message.warning(`褰撳墠闄愬埗閫夋嫨 1 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠躲�俙);
},
getList() {
- this.$axios.get(this.$api.deviceCheck.pageByPageQueryOfHomeworkInstructions + "?size=" + this.search.size + "¤t=" + this.search.current).then(res => {
+ pageByPageQueryOfHomeworkInstructions({ ...this.search }).then(res => {
if (res.code == 200) {
this.tableData = res.data.records;
this.search.total = res.data.total
@@ -491,17 +494,7 @@
})
},
getAllDevice() {
- this.$axios.post(this.$api.deviceScope.selectDeviceParameter + "?laboratoryNameIsNull=" + this.laboratoryNameIsNull, {
- page: {
- current: 1,
- size: -1
- },
- entity: this.entity
- }, {
- headers: {
- 'Content-Type': 'application/json'
- }
- }).then(res => {
+ selectDeviceParameter({ laboratoryNameIsNull: this.laboratoryNameIsNull }).then(res => {
if (res.code == 200) {
this.devices = res.data.records;
this.updateDeviceNameOptions();
@@ -527,13 +520,8 @@
},
},
computed: {
- headers() {
- return {
- 'token': sessionStorage.getItem('token')
- }
- },
action() {
- return this.javaApi + this.$api.personnel.saveCNASFile
+ return this.javaApi + '/personBasicInfo/saveCNASFile'
}
},
}
--
Gitblit v1.9.3