refactor(535): 调整耳标照片上传逻辑
- 将 earPhoto 属性改为 picture - 添加 upload 配置项,限制上传数量为 1- 优化 columns 数据结构,移除冗余定义
This commit is contained in:
		| @@ -1,17 +1,6 @@ | ||||
| <script> | ||||
| import {mapState} from "vuex" | ||||
|  | ||||
| const columns = [ | ||||
|   {label: "序号", type: "index"}, | ||||
|   {label: "生物芯片耳标号", prop: "biochipEarNumber", edit: 1}, | ||||
|   {label: "电子耳标号", prop: "electronicEarNumber", edit: 1}, | ||||
|   {label: "原厂耳标号", prop: "originalEarNumber", edit: 1}, | ||||
|   {label: "戴耳标照片", prop: "picture", upload: {valueIsUrl: !0}}, | ||||
|   {label: "品种", prop: "variety", select: {dict: "variety"}}, | ||||
|   {label: "类别", prop: "category", select: {dict: "category"}}, | ||||
|   {label: "日龄/天", prop: "age", num: 1}, | ||||
|   {label: "体重/公斤", prop: "weight", num: 1}, | ||||
| ] | ||||
| export default { | ||||
|   name: "etAdd", | ||||
|   props: { | ||||
| @@ -22,7 +11,6 @@ export default { | ||||
|   data() { | ||||
|     return { | ||||
|       detail: {detailList: []}, | ||||
|       columns, | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
| @@ -34,6 +22,17 @@ export default { | ||||
|       const appName = v.$parent.menuName || v.$parent.$options.label | ||||
|       return v.$route.query.id ? v.isEdit ? `编辑${appName}` : `${appName}详情` : `新增${appName}` | ||||
|     }, | ||||
|     columns: v => [ | ||||
|       {label: "序号", type: "index"}, | ||||
|       {label: "生物芯片耳标号", prop: "biochipEarNumber", edit: 1}, | ||||
|       {label: "电子耳标号", prop: "electronicEarNumber", edit: 1}, | ||||
|       {label: "原厂耳标号", prop: "originalEarNumber", edit: 1}, | ||||
|       {label: "戴耳标照片", prop: "picture", upload: {valueIsUrl: !0, instance: v.instance, limit: 1}}, | ||||
|       {label: "品种", prop: "variety", select: {dict: "variety"}}, | ||||
|       {label: "类别", prop: "category", select: {dict: "category"}}, | ||||
|       {label: "日龄/天", prop: "age", num: 1}, | ||||
|       {label: "体重/公斤", prop: "weight", num: 1}, | ||||
|     ] | ||||
|   }, | ||||
|   methods: { | ||||
|     back(params = {}) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user