{
+ this.form[prop] = this.form[prop] ?? [];
+ });
+ }
}
},
deep: true,
@@ -348,7 +378,7 @@ export default {
// 处理输入框数据
this.form[opt.prop] = response.data;
// 更新下外部的 dataForm,防止code字段有数据也报空的bug
- this.$emit('update', this.form)
+ this.$emit('update', this.form);
}
});
}
@@ -377,11 +407,12 @@ export default {
// 上传成功的特殊处理
beforeUpload() {},
// 上传前的验证规则可通过 bind 属性传入
- handleUploadSuccess(response, file, fileList) {
- this.form.files.push({
+ handleUploadSuccess(response, file, prop) {
+ console.log('[handleUploadSuccess]', response, file, prop);
+ this.form[prop].push({
fileName: file.name,
fileUrl: response.data,
- fileType: 2,
+ fileType: prop == 'files' ? 2 : 1,
});
this.$modal.msgSuccess('上传成功');
this.$emit('update', this.form);
@@ -395,8 +426,8 @@ export default {
this.uploadOpen = !this.uploadOpen;
},
- handleDeleteFile(file) {
- this.form.files = this.form.files.filter(
+ handleDeleteFile(file, prop) {
+ this.form[prop] = this.form[prop].filter(
(item) => item.fileUrl != file.fileUrl
);
this.$emit('update', this.form);
diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue
index 7cb684f3..1b0d68c1 100644
--- a/src/components/Editor/index.vue
+++ b/src/components/Editor/index.vue
@@ -124,9 +124,9 @@ export default {
this.Quill = new Quill(editor, this.options);
// 取消自动聚焦 start
this.$nextTick(() => {
- this.Quill.blur();
+ this.Quill?.blur();
if (!this.readOnly) {
- this.Quill.enable();
+ this.Quill?.enable();
}
});
// 如果设置了上传地址则自定义图片上传事件
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/layout/components/DialogWithMenu.vue b/src/layout/components/DialogWithMenu.vue
deleted file mode 100644
index efd6428e..00000000
--- a/src/layout/components/DialogWithMenu.vue
+++ /dev/null
@@ -1,978 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/mixins/lb/basicPageMixin.js b/src/mixins/lb/basicPageMixin.js
index 61d46432..51b89d80 100644
--- a/src/mixins/lb/basicPageMixin.js
+++ b/src/mixins/lb/basicPageMixin.js
@@ -33,6 +33,7 @@ export default {
addUrl: '',
pageUrl: '',
infoUrl: '',
+ deleteUrl: '',
basePath: '',
form: {}
};
@@ -60,7 +61,7 @@ export default {
return this.$axios({
url,
method,
- params: method === 'get' ? payload : null,
+ params: (method === 'get' || method === 'delete') ? payload : null,
data: method !== 'get' ? payload : null,
})
},
@@ -77,6 +78,7 @@ export default {
return this.http(this.infoUrl == '' ? this.infoPath : this.infoUrl, 'get', payload);
},
del(payload) {
+ debugger;
return this.http(this.deleteUrl == '' ? this.deletePath : this.deleteUrl, 'delete', payload);
},
diff --git a/src/styles/index.scss b/src/styles/index.scss
index 93916ac0..6b3ebaee 100644
--- a/src/styles/index.scss
+++ b/src/styles/index.scss
@@ -163,7 +163,7 @@ input, textarea{
}
::-webkit-scrollbar-thumb {
- background-color: rgba(144,147,153,.5);
+ background-color: #EDEDED;
background-clip: padding-box;
min-height: 28px;
-webkit-border-radius: 2em;
@@ -174,7 +174,7 @@ input, textarea{
}
::-webkit-scrollbar-thumb:hover {
- background-color: rgba(144,147,153,.3);
+ background-color: #D9D9D9;
}
// 抽屉head区域---start
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/coreEquipment/components/AssetsUpload.vue b/src/views/base/coreEquipment/components/AssetsUpload.vue
index bd19723d..a5a3319d 100644
--- a/src/views/base/coreEquipment/components/AssetsUpload.vue
+++ b/src/views/base/coreEquipment/components/AssetsUpload.vue
@@ -46,35 +46,36 @@
}}文件大小不超过2MB
-
+
+
+
+
+ 添加属性
+
+
+
编辑
- 确定
+ 保存
-
+
-
-
-
-
-
-
+ ]"
+ @refreshDataList="getList"
+ @cancel="cancelEdit"
+ @destroy="cancelEdit" />
@@ -96,21 +132,21 @@ export default {
tableBtn: [
this.$auth.hasPermi(`base:core-equipment:update`)
? {
- type: 'detail',
- btnName: '详情',
- }
+ type: 'detail',
+ btnName: '详情',
+ }
: undefined,
this.$auth.hasPermi('base:core-equipment:update')
? {
- type: 'edit',
- btnName: '修改',
- }
+ type: 'edit',
+ btnName: '修改',
+ }
: undefined,
this.$auth.hasPermi('base:core-equipment:delete')
? {
- type: 'delete',
- btnName: '删除',
- }
+ type: 'delete',
+ btnName: '删除',
+ }
: undefined,
].filter((v) => v),
tableProps: [
@@ -176,14 +212,18 @@ export default {
type: 'separate',
},
{
- type: this.$auth.hasPermi('base:core-equipment:export') ? 'button' : '',
+ type: this.$auth.hasPermi('base:core-equipment:export')
+ ? 'button'
+ : '',
btnName: '导出',
name: 'export',
plain: true,
color: 'primary',
},
{
- type: this.$auth.hasPermi('base:core-equipment:create') ? 'button' : '',
+ type: this.$auth.hasPermi('base:core-equipment:create')
+ ? 'button'
+ : '',
btnName: '新增',
name: 'add',
plain: true,
@@ -196,7 +236,9 @@ export default {
input: true,
label: '设备名称',
prop: 'name',
- rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
+ rules: [
+ { required: true, message: '设备名称不能为空', trigger: 'blur' },
+ ],
// bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode...
// }
@@ -225,7 +267,9 @@ export default {
label: '设备类型',
prop: 'equipmentTypeId',
url: '/base/core-equipment-type/page?pageNo=1&pageSize=100',
- rules: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }],
+ rules: [
+ { required: true, message: '设备类型不能为空', trigger: 'blur' },
+ ],
bind: {
filterable: true,
},
@@ -235,7 +279,11 @@ export default {
label: '预计生产时间(min/天)',
prop: 'workTime',
rules: [
- { required: true, message: '预计生产时间不能为空', trigger: 'blur' },
+ {
+ required: true,
+ message: '预计生产时间不能为空',
+ trigger: 'blur',
+ },
{
type: 'number',
message: '请输入正确的数字值',
@@ -288,10 +336,14 @@ export default {
[
{
input: true,
- label: '产品加工时间(s)',
+ label: '单件产品加工时间(s)',
prop: 'processingTime',
rules: [
- { required: true, message: '产品加工时间不能为空', trigger: 'blur' },
+ {
+ required: true,
+ message: '单件产品加工时间不能为空',
+ trigger: 'blur',
+ },
{
type: 'number',
message: '请输入正确的数字值',
@@ -320,8 +372,21 @@ export default {
},
],
[
- { input: true, label: '备注', prop: 'remark' }
- ]
+ {
+ upload: true,
+ label: '设备资料',
+ prop: 'files',
+ },
+ ],
+ [
+ {
+ upload: true,
+ label: '设备图片',
+ prop: 'files2',
+ fileType: 1,
+ },
+ ],
+ [{ input: true, label: '备注', prop: 'remark' }],
// [
// {
// assetUpload: true,
@@ -422,7 +487,7 @@ export default {
// 表单参数
form: {
id: null,
- files: []
+ files: [],
},
showUploadComponents: false, // 是否显示上传组件
};
@@ -434,36 +499,36 @@ export default {
computedRows() {
return this.showUploadComponents
? [
- ...this.rows,
- [
- {
- assetUpload: true,
- key: 'eq-assets', // 用于区分不同的上传组件
- label: '上传资料',
- fieldName: 'assets',
- subcomponent: AssetsUpload,
- prop: 'uploadedAssets',
- default: [],
- bind: {
- 'is-pic-mode': false,
+ ...this.rows,
+ [
+ {
+ assetUpload: true,
+ key: 'eq-assets', // 用于区分不同的上传组件
+ label: '上传资料',
+ fieldName: 'assets',
+ subcomponent: AssetsUpload,
+ prop: 'uploadedAssets',
+ default: [],
+ bind: {
+ 'is-pic-mode': false,
+ },
},
- },
- ],
- [
- {
- assetUpload: true,
- key: 'eq-pics', // 用于区分不同的上传组件
- label: '上传图片',
- fieldName: 'images',
- subcomponent: AssetsUpload,
- // prop: '',
- // default: [],
- bind: {
- 'is-pic-mode': true,
+ ],
+ [
+ {
+ assetUpload: true,
+ key: 'eq-pics', // 用于区分不同的上传组件
+ label: '上传图片',
+ fieldName: 'images',
+ subcomponent: AssetsUpload,
+ // prop: '',
+ // default: [],
+ bind: {
+ 'is-pic-mode': true,
+ },
},
- },
- ],
- ]
+ ],
+ ]
: this.rows;
},
},
@@ -505,7 +570,8 @@ export default {
spec: undefined,
description: undefined,
remark: undefined,
- files: []
+ files: [],
+ files2: [],
};
this.resetForm('form');
},
@@ -533,9 +599,12 @@ export default {
if (!valid) {
return;
}
+ const payload = Object.assign({}, this.form);
+ payload.files = [...payload.files, ...payload.files2];
+ delete payload.files2;
// 修改的提交
if (this.form.id != null) {
- updateEquipment(this.form).then((response) => {
+ updateEquipment(payload).then((response) => {
this.$modal.msgSuccess('修改成功');
this.open = false;
this.getList();
@@ -543,7 +612,7 @@ export default {
return;
}
// 添加的提交
- createEquipment(this.form).then((response) => {
+ createEquipment(payload).then((response) => {
this.$modal.msgSuccess('新增成功');
this.open = false;
this.getList();
@@ -562,7 +631,7 @@ export default {
this.getList();
this.$modal.msgSuccess('删除成功');
})
- .catch(() => { });
+ .catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
@@ -580,7 +649,7 @@ export default {
this.$download.excel(response, '设备.xls');
this.exportLoading = false;
})
- .catch(() => { });
+ .catch(() => {});
},
// 查看详情
viewDetail(id) {
diff --git a/src/views/base/coreEquipmentLineBind/index.vue b/src/views/base/coreEquipmentLineBind/index.vue
index 1e08ce2d..c0874798 100644
--- a/src/views/base/coreEquipmentLineBind/index.vue
+++ b/src/views/base/coreEquipmentLineBind/index.vue
@@ -189,6 +189,10 @@ export default {
],
label: '产线统计类型',
prop: 'lineDataType',
+ bind: {
+ clearable: true, filterable: true
+ },
+ rules: [{ required: true, message: '产线统计类型不能为空', trigger: 'change' }],
},
{
select: true,
@@ -199,6 +203,10 @@ export default {
],
label: '工段统计类型',
prop: 'sectionDataType',
+ bind: {
+ clearable: true, filterable: true
+ },
+ rules: [{ required: true, message: '工段统计类型不能为空', trigger: 'change' }],
},
],
],
diff --git a/src/views/base/coreHotMaterial/add-or-updata.vue b/src/views/base/coreHotMaterial/add-or-updata.vue
index 975cd5a8..4ffcd316 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-27 20:12:00
* @Description:
-->
@@ -11,7 +11,7 @@
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
- label-width="100px">
+ label-width="90px">
@@ -46,6 +46,9 @@
+
+
+
@@ -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/coreHotMaterial/index.vue b/src/views/base/coreHotMaterial/index.vue
index 0e8a9ce6..0667b5c9 100644
--- a/src/views/base/coreHotMaterial/index.vue
+++ b/src/views/base/coreHotMaterial/index.vue
@@ -29,7 +29,7 @@
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
- width="50%">
+ width="45%">
diff --git a/src/views/base/coreProduct/add-or-updata.vue b/src/views/base/coreProduct/add-or-updata.vue
index 2344438c..a3cee7eb 100644
--- a/src/views/base/coreProduct/add-or-updata.vue
+++ b/src/views/base/coreProduct/add-or-updata.vue
@@ -2,14 +2,14 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
- * @LastEditTime: 2023-11-15 15:41:44
+ * @LastEditTime: 2023-11-27 20:07:09
* @Description:
-->
@@ -114,14 +114,6 @@
-