|
@@ -54,6 +54,8 @@ import { |
|
|
exportEquipmentTypeExcel, |
|
|
exportEquipmentTypeExcel, |
|
|
} from '@/api/base/equipmentType'; |
|
|
} from '@/api/base/equipmentType'; |
|
|
|
|
|
|
|
|
|
|
|
import { getAccessToken } from '@/utils/auth'; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'EquipmentType', |
|
|
name: 'EquipmentType', |
|
|
components: {}, |
|
|
components: {}, |
|
@@ -86,40 +88,7 @@ export default { |
|
|
{ prop: 'name', label: '设备类型名称', align: 'center' }, |
|
|
{ prop: 'name', label: '设备类型名称', align: 'center' }, |
|
|
{ prop: 'code', label: '检测类型编码', align: 'center' }, |
|
|
{ prop: 'code', label: '检测类型编码', align: 'center' }, |
|
|
{ prop: 'remark', label: '备注', align: 'center' }, |
|
|
{ prop: 'remark', label: '备注', align: 'center' }, |
|
|
// { |
|
|
|
|
|
// label: '操作', |
|
|
|
|
|
// alignt: 'center', |
|
|
|
|
|
// subcomponent: { |
|
|
|
|
|
// render: function (h) { |
|
|
|
|
|
// return h('div', null, [ |
|
|
|
|
|
// h( |
|
|
|
|
|
// 'el-button', |
|
|
|
|
|
// { |
|
|
|
|
|
// props: { |
|
|
|
|
|
// icon: 'el-icon-edit', |
|
|
|
|
|
// size: 'mini', |
|
|
|
|
|
// type: 'text', |
|
|
|
|
|
// }, |
|
|
|
|
|
// }, |
|
|
|
|
|
// ' 修改' |
|
|
|
|
|
// ), |
|
|
|
|
|
// h( |
|
|
|
|
|
// 'el-button', |
|
|
|
|
|
// { |
|
|
|
|
|
// props: { |
|
|
|
|
|
// icon: 'el-icon-edit', |
|
|
|
|
|
// size: 'mini', |
|
|
|
|
|
// type: 'text', |
|
|
|
|
|
// }, |
|
|
|
|
|
// }, |
|
|
|
|
|
// ' 修改' |
|
|
|
|
|
// ), |
|
|
|
|
|
// ]); |
|
|
|
|
|
// }, |
|
|
|
|
|
// }, |
|
|
|
|
|
// }, |
|
|
|
|
|
], |
|
|
], |
|
|
// |
|
|
|
|
|
searchBarFormConfig: [ |
|
|
searchBarFormConfig: [ |
|
|
{ |
|
|
{ |
|
|
type: 'input', |
|
|
type: 'input', |
|
@@ -133,11 +102,6 @@ export default { |
|
|
name: 'search', |
|
|
name: 'search', |
|
|
color: 'primary', |
|
|
color: 'primary', |
|
|
}, |
|
|
}, |
|
|
// { |
|
|
|
|
|
// type: 'button', |
|
|
|
|
|
// btnName: '重置', |
|
|
|
|
|
// name: 'reset', |
|
|
|
|
|
// }, |
|
|
|
|
|
{ |
|
|
{ |
|
|
type: 'separate', |
|
|
type: 'separate', |
|
|
}, |
|
|
}, |
|
@@ -159,22 +123,6 @@ export default { |
|
|
// color: 'warning', |
|
|
// color: 'warning', |
|
|
// }, |
|
|
// }, |
|
|
], |
|
|
], |
|
|
// 表单配置 |
|
|
|
|
|
// formRows: [ |
|
|
|
|
|
// [ |
|
|
|
|
|
// { |
|
|
|
|
|
// input: true, |
|
|
|
|
|
// label: '检测类型名称', |
|
|
|
|
|
// prop: 'name', |
|
|
|
|
|
// rules: [{ required: true, message: '不能为空', trigger: 'blur' }], |
|
|
|
|
|
// // bind: { |
|
|
|
|
|
// // disabled: true, // some condition, like detail mode... |
|
|
|
|
|
// // } |
|
|
|
|
|
// }, |
|
|
|
|
|
// ], |
|
|
|
|
|
// [{ input: true, label: '检测类型编码', prop: 'code' }], |
|
|
|
|
|
// [{ input: true, label: '备注', prop: 'remark' }], |
|
|
|
|
|
// ], |
|
|
|
|
|
rows: [ |
|
|
rows: [ |
|
|
[ |
|
|
[ |
|
|
{ |
|
|
{ |
|
@@ -198,13 +146,17 @@ export default { |
|
|
select: true, |
|
|
select: true, |
|
|
label: '父类', |
|
|
label: '父类', |
|
|
prop: 'parentId', |
|
|
prop: 'parentId', |
|
|
// other... |
|
|
|
|
|
|
|
|
url: '/base/equipment-type/page?pageNo=1&pageSize=100', |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
upload: true, |
|
|
upload: true, |
|
|
label: '上传资料', |
|
|
label: '上传资料', |
|
|
prop: 'uploadFiles', |
|
|
prop: 'uploadFiles', |
|
|
// other... |
|
|
|
|
|
|
|
|
url: process.env.VUE_APP_BASE_API + '/admin-api/infra/file/upload', // 请求地址 |
|
|
|
|
|
bind: { |
|
|
|
|
|
headers: { Authorization: 'Bearer ' + getAccessToken() }, |
|
|
|
|
|
'show-file-list': false, |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
[{ input: true, label: '备注', prop: 'remark' }], |
|
|
[{ input: true, label: '备注', prop: 'remark' }], |
|
@@ -221,6 +173,14 @@ export default { |
|
|
form: {}, |
|
|
form: {}, |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
// form: { |
|
|
|
|
|
// handler: function (val, oldVal) { |
|
|
|
|
|
// console.log('[watch:form]', val, oldVal); |
|
|
|
|
|
// }, |
|
|
|
|
|
// deep: true, |
|
|
|
|
|
// }, |
|
|
|
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.getList(); |
|
|
this.getList(); |
|
|
}, |
|
|
}, |
|
@@ -248,6 +208,8 @@ export default { |
|
|
name: undefined, |
|
|
name: undefined, |
|
|
parentId: undefined, |
|
|
parentId: undefined, |
|
|
remark: undefined, |
|
|
remark: undefined, |
|
|
|
|
|
fileNames: [], |
|
|
|
|
|
fileUrls: [], |
|
|
}; |
|
|
}; |
|
|
this.resetForm('form'); |
|
|
this.resetForm('form'); |
|
|
}, |
|
|
}, |
|
|