Commit 4c1074be by lichengming

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

parent d21322d1
......@@ -71,7 +71,7 @@
<script>
// eslint-disable-next-line import/named
import { soilReport, soilStatistics } from '../../../../api'
import { soilEntrust, soilReport, soilStatistics } from '../../../../api'
import global from '../../../../api/config'
import OperationModal from '../../../../components/operation/Operation'
export default {
......@@ -108,9 +108,13 @@ export default {
selectIds: [],
selectData: [],
iconMsg: [
{ id: '', type: 'pt-a-view', name: '预览报告' },
{ id: '', type: 'pt-a-cloud', name: '附件' },
{ id: '', type: 'pt-a-clock', name: '操作日志' }
{ type: 'md-cloud', id: '', name: '附件' },
{
type: 'ios-clock',
id: '',
name: '操作日志'
},
{ id: '', type: 'md-trash', name: '删除' }
]
}
},
......@@ -263,6 +267,25 @@ export default {
case '操作日志':
this._record(data.id)
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) {
......@@ -321,6 +344,9 @@ export default {
this.selectIds.push(this.selectData[i].id)
}
break
case 'iconClick':
this._iconClick(data.name, data.rowData, data.componentName)
break
default:
this._page()
}
......
......@@ -87,7 +87,7 @@
<script>
// eslint-disable-next-line import/named
import { soilReport, soilStatistics } from '../../../../api'
import { soilEntrust, soilReport, soilStatistics } from '../../../../api'
import global from '../../../../api/config'
import OperationModal from '../../../../components/operation/Operation'
export default {
......@@ -124,10 +124,13 @@ export default {
selectIds: [],
selectData: [],
iconMsg: [
{ id: '', type: 'pt-a-view', name: '预览报告' },
// { id: '', type: 'pt-a-view', name: '预览PDF' },
{ id: '', type: 'pt-a-cloud', name: '附件' },
{ id: '', type: 'pt-a-clock', name: '操作日志' }
{ type: 'md-cloud', id: '', name: '附件' },
{
type: 'ios-clock',
id: '',
name: '操作日志'
},
{ id: '', type: 'md-trash', name: '删除' }
]
}
},
......@@ -283,6 +286,25 @@ export default {
case '操作日志':
this._record(data.id)
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先生成在预览
......@@ -359,6 +381,9 @@ export default {
this.selectIds.push(this.selectData[i].id)
}
break
case 'iconClick':
this._iconClick(data.name, data.rowData, data.componentName)
break
default:
this._page()
}
......
......@@ -72,7 +72,7 @@
</template>
<script>
import UserInfo from '../../../components/user-info-single/assignPerson'
import { soilReport } from '../../../api'
import { soilEntrust, soilReport } from '../../../api'
import Operation from '../../../components/operation/Operation'
export default {
// eslint-disable-next-line vue/no-unused-components
......@@ -95,6 +95,11 @@ export default {
type: 'ios-clock',
id: '',
name: '操作日志'
},
{
type: 'md-trash',
id: '',
name: '删除'
}
],
getPage: {},
......@@ -361,9 +366,28 @@ export default {
case '操作日志':
this._operationRecord(data.id)
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) {
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