Commit 4c1074be by lichengming

修改了报告管理历史记录删除按钮

parent d21322d1
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<script> <script>
// eslint-disable-next-line import/named // eslint-disable-next-line import/named
import { soilReport, soilStatistics } from '../../../../api' import { soilEntrust, soilReport, soilStatistics } from '../../../../api'
import global from '../../../../api/config' import global from '../../../../api/config'
import OperationModal from '../../../../components/operation/Operation' import OperationModal from '../../../../components/operation/Operation'
export default { export default {
...@@ -108,9 +108,13 @@ export default { ...@@ -108,9 +108,13 @@ export default {
selectIds: [], selectIds: [],
selectData: [], selectData: [],
iconMsg: [ iconMsg: [
{ id: '', type: 'pt-a-view', name: '预览报告' }, { type: 'md-cloud', id: '', name: '附件' },
{ id: '', type: 'pt-a-cloud', name: '附件' }, {
{ id: '', type: 'pt-a-clock', name: '操作日志' } type: 'ios-clock',
id: '',
name: '操作日志'
},
{ id: '', type: 'md-trash', name: '删除' }
] ]
} }
}, },
...@@ -263,6 +267,25 @@ export default { ...@@ -263,6 +267,25 @@ export default {
case '操作日志': case '操作日志':
this._record(data.id) this._record(data.id)
break break
case '删除':
this._deleteByIds([data.id])
break
}
},
_deleteByIds(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || '确定删除该记录?',
onOk: () => {
this._delete(ids)
}
})
},
_delete: async function(ids) {
const result = await soilEntrust.deleteById(ids)
if (result) {
this._formSearch()
this.$Message.success('删除成功!')
} }
}, },
_record(id) { _record(id) {
...@@ -321,6 +344,9 @@ export default { ...@@ -321,6 +344,9 @@ export default {
this.selectIds.push(this.selectData[i].id) this.selectIds.push(this.selectData[i].id)
} }
break break
case 'iconClick':
this._iconClick(data.name, data.rowData, data.componentName)
break
default: default:
this._page() this._page()
} }
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<script> <script>
// eslint-disable-next-line import/named // eslint-disable-next-line import/named
import { soilReport, soilStatistics } from '../../../../api' import { soilEntrust, soilReport, soilStatistics } from '../../../../api'
import global from '../../../../api/config' import global from '../../../../api/config'
import OperationModal from '../../../../components/operation/Operation' import OperationModal from '../../../../components/operation/Operation'
export default { export default {
...@@ -124,10 +124,13 @@ export default { ...@@ -124,10 +124,13 @@ export default {
selectIds: [], selectIds: [],
selectData: [], selectData: [],
iconMsg: [ iconMsg: [
{ id: '', type: 'pt-a-view', name: '预览报告' }, { type: 'md-cloud', id: '', name: '附件' },
// { id: '', type: 'pt-a-view', name: '预览PDF' }, {
{ id: '', type: 'pt-a-cloud', name: '附件' }, type: 'ios-clock',
{ id: '', type: 'pt-a-clock', name: '操作日志' } id: '',
name: '操作日志'
},
{ id: '', type: 'md-trash', name: '删除' }
] ]
} }
}, },
...@@ -283,6 +286,25 @@ export default { ...@@ -283,6 +286,25 @@ export default {
case '操作日志': case '操作日志':
this._record(data.id) this._record(data.id)
break break
case '删除':
this._deleteByIds([data.id])
break
}
},
_deleteByIds(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || '确定删除该记录?',
onOk: () => {
this._delete(ids)
}
})
},
_delete: async function(ids) {
const result = await soilEntrust.deleteById(ids)
if (result) {
this._formSearch()
this.$Message.success('删除成功!')
} }
}, },
// 没有生成pdf先生成在预览 // 没有生成pdf先生成在预览
...@@ -359,6 +381,9 @@ export default { ...@@ -359,6 +381,9 @@ export default {
this.selectIds.push(this.selectData[i].id) this.selectIds.push(this.selectData[i].id)
} }
break break
case 'iconClick':
this._iconClick(data.name, data.rowData, data.componentName)
break
default: default:
this._page() this._page()
} }
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</template> </template>
<script> <script>
import UserInfo from '../../../components/user-info-single/assignPerson' import UserInfo from '../../../components/user-info-single/assignPerson'
import { soilReport } from '../../../api' import { soilEntrust, soilReport } from '../../../api'
import Operation from '../../../components/operation/Operation' import Operation from '../../../components/operation/Operation'
export default { export default {
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
...@@ -95,6 +95,11 @@ export default { ...@@ -95,6 +95,11 @@ export default {
type: 'ios-clock', type: 'ios-clock',
id: '', id: '',
name: '操作日志' name: '操作日志'
},
{
type: 'md-trash',
id: '',
name: '删除'
} }
], ],
getPage: {}, getPage: {},
...@@ -361,9 +366,28 @@ export default { ...@@ -361,9 +366,28 @@ export default {
case '操作日志': case '操作日志':
this._operationRecord(data.id) this._operationRecord(data.id)
break break
case '删除':
this._deleteByIds([data.id])
break
} }
}) })
}, },
_deleteByIds(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || '确定删除该记录?',
onOk: () => {
this._delete(ids)
}
})
},
_delete: async function(ids) {
const result = await soilEntrust.deleteById(ids)
if (result) {
this._formSearch()
this.$Message.success('删除成功!')
}
},
_editModal(id, type, name) { _editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, name) this.$refs.sampleManageModal._open(id, type, name)
}, },
......
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