diff --git a/src/api/equipment/base/inspection/settings.js b/src/api/equipment/base/inspection/settings.js index 306c092d..5f637a22 100644 --- a/src/api/equipment/base/inspection/settings.js +++ b/src/api/equipment/base/inspection/settings.js @@ -1,7 +1,7 @@ /* * @Author: Do not edit * @Date: 2023-11-08 15:56:52 - * @LastEditTime: 2023-11-20 16:38:18 + * @LastEditTime: 2023-11-25 16:22:49 * @LastEditors: DY * @Description: */ @@ -73,4 +73,30 @@ export function deleteCheck(id) { url: '/base/equipment-check/delete?id=' + id, method: 'delete' }) -} \ No newline at end of file +} + +// 获得设备巡检设置code +export function getCode() { + return request({ + url: '/base/equipment-check-config/getCode', + method: 'get' + }) +} + +// 创建巡检配置 +export function createCheckConfig(data) { + return request({ + url: '/base/equipment-check-config/create', + method: 'post', + data: data + }) +} + +// 更新巡检配置 +export function updateCheckConfig(data) { + return request({ + url: '/base/equipment-check-config/update', + method: 'put', + data: data + }) +} diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 347d77f8..80a5c56e 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -29,10 +29,10 @@
  • - {{ getFileName(file.name) }} + {{ fileName }}
    - 删除 + 删除
  • @@ -71,6 +71,11 @@ export default { disabled: { type: Boolean, default: false + }, + //文件名称 + fName: { + type: String, + default: '' } }, data() { @@ -81,6 +86,7 @@ export default { uploadFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/upload", // 请求地址 headers: { Authorization: "Bearer " + getAccessToken() }, // 设置上传的请求头部 fileList: [], + fileName: '' }; }, watch: { @@ -105,6 +111,14 @@ export default { }, deep: true, immediate: true + }, + fName: { + handler(val) { + if (val) { + console.log('11', val) + this.fileName = val + } + } } }, computed: { @@ -117,6 +131,7 @@ export default { // 上传前校检格式和大小 handleBeforeUpload(file) { // 校检文件类型 + this.fileName = file.name if (this.fileType) { let fileExtension = ""; if (file.name.lastIndexOf(".") > -1) { @@ -150,7 +165,7 @@ export default { }, // 上传失败 handleUploadError(err) { - this.$modal.msgError("上传图片失败,请重试"); + this.$modal.msgError("上传文件失败,请重试"); this.$modal.closeLoading() }, // 上传成功回调 @@ -180,8 +195,12 @@ export default { this.number = 0; this.$emit("input", this.listToString(this.fileList)); this.$modal.closeLoading(); + this.returnFileName() } }, + returnFileName() { + this.$emit('name', this.fileName) + }, // 获取文件名称 getFileName(name) { console.log('你好', name) diff --git a/src/views/base/coreDepartment/add-or-updata.vue b/src/views/base/coreDepartment/add-or-updata.vue index b566fae9..a4959014 100644 --- a/src/views/base/coreDepartment/add-or-updata.vue +++ b/src/views/base/coreDepartment/add-or-updata.vue @@ -2,43 +2,45 @@ * @Author: zwq * @Date: 2021-11-18 14:16:25 * @LastEditors: DY - * @LastEditTime: 2023-11-22 10:32:10 + * @LastEditTime: 2023-11-25 18:09:05 * @Description: --> + + diff --git a/src/views/base/coreHotMaterial/add-or-updata.vue b/src/views/base/coreHotMaterial/add-or-updata.vue index 975cd5a8..361e6d1e 100644 --- a/src/views/base/coreHotMaterial/add-or-updata.vue +++ b/src/views/base/coreHotMaterial/add-or-updata.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2021-11-18 14:16:25 * @LastEditors: DY - * @LastEditTime: 2023-11-15 16:23:49 + * @LastEditTime: 2023-11-25 11:25:23 * @Description: --> @@ -70,7 +73,8 @@ export default { code: undefined, name: undefined, unit: undefined, - dailyCost: undefined + dailyCost: undefined, + remark: undefined }, departmentlList: [], menuOptions: [], diff --git a/src/views/base/coreProduct/add-or-updata.vue b/src/views/base/coreProduct/add-or-updata.vue index 2344438c..57f2e71d 100644 --- a/src/views/base/coreProduct/add-or-updata.vue +++ b/src/views/base/coreProduct/add-or-updata.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2021-11-18 14:16:25 * @LastEditors: DY - * @LastEditTime: 2023-11-15 15:41:44 + * @LastEditTime: 2023-11-27 09:23:56 * @Description: -->