| | |
| | | <h4><span class="line"></span><span>设备档案</span></h4> |
| | | <div class="btns"> |
| | | <el-button type="primary" size="small" @click="openEditForm" style="">修订档案</el-button> |
| | | <el-button type="primary" size="small" @click="dialogVisible1 = true" style="">添加附件</el-button> |
| | | <el-button type="primary" size="small" @click="openAddFileDia" style="">添加附件</el-button> |
| | | <el-button type="primary" size="small" @click="deviceDialog = true" style="">查看设备二维码</el-button> |
| | | <el-button type="primary" size="small" @click="handleDownOne" style="">导出</el-button> |
| | | </div> |
| | |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import { selectQualifiedSupplierManagementPage } from '@/api/cnas/externalService/supplierManage/supplierManage' |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | }) |
| | | this.fileList.push(obj) |
| | | } |
| | | this.draftRestore('fileAdd', 'addFile', row.id, 'dialogVisible1') |
| | | }, |
| | | // 打开添加附件弹窗 |
| | | openAddFileDia() { |
| | | this.dialogVisible1 = true |
| | | this.$nextTick(() => { |
| | | this.draftRestore('fileAdd', 'addFile', this.clickNodeVal.value, 'dialogVisible1') |
| | | }) |
| | | }, |
| | | handleDeleteClick(row) { |
| | | // 删除逻辑 |
| | |
| | | updateDocument(this.addFile).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('更新成功') |
| | | this.draftClear('fileAdd') |
| | | this.dialogVisible1 = false; |
| | | this.getPage() |
| | | } |
| | |
| | | addDocument(this.addFile).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('保存成功') |
| | | this.draftClear('fileAdd') |
| | | this.dialogVisible1 = false; |
| | | this.getPage() |
| | | } |
| | |
| | | this.editData = JSON.parse(JSON.stringify(this.Mdata)) |
| | | this.$nextTick(() => { |
| | | this.dialogVisible = true |
| | | this.draftRestore('fileRevision', 'editData', this.clickNodeVal.value, 'dialogVisible') |
| | | }) |
| | | }, |
| | | // 下次日期 = 最近日期 + 周期(月),自动计算 |
| | |
| | | upDeviceParameter(formData).then(res => { |
| | | this.$message.success('修改成功') |
| | | this.upLoad = false |
| | | this.draftClear('fileRevision') |
| | | this.getList(this.clickNodeVal.value) |
| | | this.dialogVisible = false |
| | | }).catch(e => { |
| | |
| | | }, |
| | | dialogVisible1(newVal) { |
| | | if (newVal == false) { |
| | | this.draftStop('fileAdd') |
| | | this.isAddFileUpdate = false |
| | | this.addFile = {} |
| | | this.fileList = [] |