| | |
| | | <!-- 作业指导书 --> |
| | | <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-column type="index" label="序号" width="120"> |
| | |
| | | </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> |
| | |
| | | <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"> |
| | | @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> |
| | |
| | | <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> |
| | |
| | | |
| | | <script> |
| | | import fileDownload from "@/utils/file"; |
| | | |
| | | import { |
| | | approvalOfHomeworkInstructionManual, |
| | | homeworkGuidebook, |
| | | homeworkGuidebookEditor, |
| | | newHomeworkGuidebookAdded, |
| | | deleteHomeworkGuidebook, |
| | | pageByPageQueryOfHomeworkInstructions, |
| | | selectDeviceParameter, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | |
| | | }); |
| | | }, |
| | | 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 |
| | |
| | | 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() |
| | | }) |
| | |
| | | }, |
| | | 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) { |
| | |
| | | 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 |
| | |
| | | .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) { |
| | |
| | | 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 |
| | |
| | | }) |
| | | }, |
| | | 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(); |
| | |
| | | }, |
| | | }, |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi + this.$api.personnel.saveCNASFile |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | } |