diff --git a/project/xumu/AppEarTag/etAdd.vue b/project/xumu/AppEarTag/etAdd.vue
index 75307ce2..f2aea45d 100644
--- a/project/xumu/AppEarTag/etAdd.vue
+++ b/project/xumu/AppEarTag/etAdd.vue
@@ -4,14 +4,14 @@ import AiSelect from "dui/packages/basic/AiSelect.vue";
const columns = [
{label: "序号", type: "index"},
- {label: "生物芯片耳标号", prop: "biochipEarNumber"},
- {label: "电子耳标号", prop: "electronicEarNumber"},
- {label: "原厂耳标号", prop: "originalEarNumber"},
- {label: "戴耳标照片", prop: "picture", upload: 1},
- {label: "品种", prop: "variety", select: 1, dict: "variety"},
- {label: "类别", prop: "category", select: 1, dict: "category"},
- {label: "日龄/天", prop: "age", edit: 1},
- {label: "体重/公斤", prop: "weight", edit: 1},
+ {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",
@@ -23,7 +23,7 @@ export default {
},
data() {
return {
- detail: {},
+ detail: {detailList: []},
columns,
}
},
@@ -43,24 +43,16 @@ export default {
},
getDetail() {
const {id} = this.$route.query
- return this.instance.post("/api/breed/earTag/page", {id}).then(res => {
+ return id && this.instance.post("/api/breed/earTag/page", {id}).then(res => {
if (res?.data?.records) {
const detail = res.data.records[0] || {}
- return this.detail = {...detail}
- }
- })
- },
- getList() {
- const {penId} = this.detail
- this.instance.post("/api/breed/earTag/getEarTagByPenId", null, {params: {penId}}).then(res => {
- if (res?.data) {
- this.$set(this.detail, 'detailList', res.data)
+ return this.detail = {detailList: [], ...detail}
}
})
},
handleDelete(index) {
this.$confirm("确定删除该条数据?").then(() => {
- this.detail.splice(index, 1)
+ this.detail.detailList.splice(index, 1)
})
},
submit() {
@@ -93,7 +85,7 @@ export default {
-
+
@@ -110,18 +102,22 @@ export default {
-
-
-
-
- 删除
-
-
-
-
+
+ 新增
+
+
+
+
+ 删除
+
+
+
+
+
-
+
+
diff --git a/project/xumu/AppEarTag/etList.vue b/project/xumu/AppEarTag/etList.vue
index 2c9eb069..13411a46 100644
--- a/project/xumu/AppEarTag/etList.vue
+++ b/project/xumu/AppEarTag/etList.vue
@@ -71,7 +71,7 @@ export default {
-
+
diff --git a/ui/packages/basic/AiTable.vue b/ui/packages/basic/AiTable.vue
index 2d8e2e04..65cefe8c 100644
--- a/ui/packages/basic/AiTable.vue
+++ b/ui/packages/basic/AiTable.vue
@@ -26,10 +26,10 @@
-
-
-
-
+
+
+
+
{{ getValue(colConfig, row) }}
@@ -269,6 +269,31 @@ export default {
tr td:first-child .cell {
padding-left: 40px !important;
}
+
+ .uploader {
+ .el-upload-list__item {
+ width: 100px;
+ height: 32px;
+ margin: unset;
+
+ & > img {
+ width: unset;
+ margin-left: 50%;
+ transform: translateX(-50%);
+ }
+ }
+
+ .uploaderBox {
+ width: 100px !important;
+ height: 32px !important;
+ flex-direction: row !important;
+ gap: 4px;
+
+ .iconfont {
+ font-size: 24px !important;
+ }
+ }
+ }
}
:deep( .el-table__fixed-right ) {