Commit 8c3d3bbc by lichengming

修改了试样检测查看指标

parent cc9c10ec
...@@ -153,14 +153,7 @@ export default { ...@@ -153,14 +153,7 @@ export default {
pageLocationSample: data => pageLocationSample: data =>
http.post('soil/v1/sample/page_location_sample', data).then(res => res), http.post('soil/v1/sample/page_location_sample', data).then(res => res),
importExperiments: data => importExperiments: data =>
http http.post('soil/v1/experiment/import_experiments', data).then(res => res),
.post(
'soil/v1/experiment/import_experiments?aptitudeIds=' +
data.aptitudeIds +
'&ids=' +
data.ids
)
.then(res => res),
pageSecondary: data => pageSecondary: data =>
http.post('soil/v1/prepare/page_secondary', data).then(res => res), http.post('soil/v1/prepare/page_secondary', data).then(res => res),
pageSecondaryHis: data => pageSecondaryHis: data =>
......
...@@ -93,6 +93,7 @@ export default { ...@@ -93,6 +93,7 @@ export default {
itemEdit: data => itemEdit: data =>
http.put('soil/v1/item/' + data.id, data.obj).then(res => res), http.put('soil/v1/item/' + data.id, data.obj).then(res => res),
itemGetById: data => http.get('soil/v1/item/' + data).then(res => res), itemGetById: data => http.get('soil/v1/item/' + data).then(res => res),
itemDelete: data => http.delete('soil/v1/item/?ids=' + data).then(res => res),
endExp: data => endExp: data =>
http.post('soil/v1/experiment/end_exp?ids=' + data).then(res => res), http.post('soil/v1/experiment/end_exp?ids=' + data).then(res => res),
endExpIds: data => endExpIds: data =>
......
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
}, },
_ok: async function() { _ok: async function() {
const result = await soilSample.importExperiments({ const result = await soilSample.importExperiments({
aptitudeIds: this.addIds, aptitudeIds: this.addIds.join(','),
ids: this.sampleId ids: this.sampleId
}) })
if (result) { if (result) {
......
...@@ -103,8 +103,9 @@ export default { ...@@ -103,8 +103,9 @@ export default {
} }
}, },
_ok: async function() { _ok: async function() {
console.log('导入检测项目')
const result = await soilSample.importExperiments({ const result = await soilSample.importExperiments({
aptitudeIds: this.addIds, aptitudeIds: this.addIds.join(','),
ids: this.sampleId ids: this.sampleId
}) })
if (result) { if (result) {
......
...@@ -361,8 +361,8 @@ export default { ...@@ -361,8 +361,8 @@ export default {
}, },
_importItemOk: async function(ids) { _importItemOk: async function(ids) {
const result = await soilSample.importExperiments({ const result = await soilSample.importExperiments({
aptitudeIds: ids, aptitudeIds: ids.join(','),
ids: this.selectIds ids: this.selectIds.join(',')
}) })
if (result) { if (result) {
this.$Message.success('导入成功') this.$Message.success('导入成功')
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</template> </template>
<script> <script>
import { soilAptitude, soilTest } from '../../../api' import { soilTest } from '../../../api'
import IndexManageEdit from './IndexManageEdit' import IndexManageEdit from './IndexManageEdit'
export default { export default {
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
_deleteByIds() { _deleteByIds() {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
// this.$msgTip('warning') // this.$msgTip('warning')
this.$message.warning('请至少选择一条记录') this.$Message.warning('请至少选择一条记录')
} else { } else {
this.$Modal.confirm({ this.$Modal.confirm({
title: '提示', title: '提示',
...@@ -151,9 +151,9 @@ export default { ...@@ -151,9 +151,9 @@ export default {
} }
}, },
_delOk: async function(ids) { _delOk: async function(ids) {
const result = await soilAptitude.expItemDeleteByIds(ids) const result = await soilTest.itemDelete(ids)
if (result) { if (result) {
this.$message.success('删除成功') this.$Message.success('删除成功')
this._page() this._page()
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment