Commit f3896a7c by lichengming
parents 26d3da33 a801b521
...@@ -142,8 +142,6 @@ export default { ...@@ -142,8 +142,6 @@ export default {
pageColumns: [ pageColumns: [
{ title: '试验名称', key: 'name', width: 160 }, { title: '试验名称', key: 'name', width: 160 },
{ title: '试验项目英文简写', key: 'shortName', width: 140 }, { title: '试验项目英文简写', key: 'shortName', width: 140 },
{ title: '大类', key: 'mainType', width: 140 },
{ title: '小类', key: 'smallType' },
{ title: '检测依据', key: 'testBasis', width: 180 }, { title: '检测依据', key: 'testBasis', width: 180 },
{ title: '试验方法', key: 'testMethod', width: 180 }, { title: '试验方法', key: 'testMethod', width: 180 },
{ title: '状态', key: 'status', width: 180 } { title: '状态', key: 'status', width: 180 }
......
...@@ -39,18 +39,6 @@ ...@@ -39,18 +39,6 @@
<div v-else>{{scope.row[item.key]}}</div> <div v-else>{{scope.row[item.key]}}</div>
</template> </template>
</vxe-table-column> </vxe-table-column>
<!-- <template slot="col">-->
<!-- <vxe-table-column-->
<!-- :width="190"-->
<!-- title="操作"-->
<!-- align="center"-->
<!-- fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <VXEIconList :msg="(scope.row.hasInputItem===1) ? iconMsg : iconMsgDisable"-->
<!-- @on-result-change="_iconClick" :rowData="scope.row"></VXEIconList>-->
<!-- </template>-->
<!-- </vxe-table-column>-->
<!-- </template>-->
</PTVXETable> </PTVXETable>
</Col> </Col>
</Row> </Row>
...@@ -81,7 +69,7 @@ export default { ...@@ -81,7 +69,7 @@ export default {
currentComponent: '', currentComponent: '',
getPage: {}, getPage: {},
showModal: false, showModal: false,
btn: [{ type: 'primary', id: '', name: '生成报告' }], btn: [],
selectIds: [], selectIds: [],
iconMsg: [ iconMsg: [
{ {
...@@ -99,54 +87,6 @@ export default { ...@@ -99,54 +87,6 @@ export default {
id: '', id: '',
name: '查看试验项目' name: '查看试验项目'
} }
// {
// type: 'erlenmeyer-flask',
// id: '',
// name: '查看样品',
// componentName: 'SampleView'
// },
// {
// type: 'document-text',
// id: '',
// name: '查看检测项目',
// componentName: 'ItemView'
// },
// { type: 'cloud', id: '', name: '附件', componentName: 'FileManage' },
// { type: 'trash-a', id: '', name: '删除' },
// {
// type: 'ios-clock',
// id: '',
// name: '操作记录',
// componentName: 'ElnFormRecord'
// }
],
iconMsgDisable: [
{ type: 'md-create', id: '', name: '编辑', disabled: true },
{
type: '',
id: '',
name: '查看原始记录',
componentName: 'OriginalItemView'
},
{
type: 'ios-list',
id: '',
name: '查看试验项目'
}
// {
// type: 'document-text',
// id: '',
// name: '查看检测项目',
// componentName: 'ItemView'
// },
// { type: 'cloud', id: '', name: '附件', componentName: 'FileManage' },
// { type: 'trash-a', id: '', name: '删除', disabled: true },
// {
// type: 'ios-clock',
// id: '',
// name: '操作记录',
// componentName: 'ElnFormRecord'
// }
], ],
pageColumns: [ pageColumns: [
{ title: '模板名称', key: 'title' }, { title: '模板名称', key: 'title' },
...@@ -182,42 +122,17 @@ export default { ...@@ -182,42 +122,17 @@ export default {
methods: { methods: {
_componentResult(data) { _componentResult(data) {
switch (this.currentComponent) { switch (this.currentComponent) {
case 'EditDateModal':
this._updateDate(data)
break
default: default:
this._page() this._page()
} }
}, },
_updateDate(date) {
this.$store
.dispatch('PrintForm/updateTimeBatch', {
ids: this.selectIds.join(','),
fillInTime: date
})
.then(() => {
if (this.$store.state.PrintForm.success) {
this._page()
this.$Message.success('更新成功!')
}
})
},
_btnClick(msg, componentName) { _btnClick(msg, componentName) {
this.currentComponent = componentName this.currentComponent = componentName
this.$nextTick(function() { this.$nextTick(function() {
switch (msg) { switch (msg) {
case '纠正填写时间':
this._editWriteTime()
break
case '设置填写人乙':
this._setAnotherTester()
break
case '生成报告': case '生成报告':
this._reportMake() this._reportMake()
break break
case '删除':
this._batchDelete()
break
case 'search': case 'search':
this.searchOpen = !this.searchOpen this.searchOpen = !this.searchOpen
break break
...@@ -251,7 +166,7 @@ export default { ...@@ -251,7 +166,7 @@ export default {
}) })
if (result) { if (result) {
this.$Message.success('报告成功生成') this.$Message.success('报告成功生成')
this._page() await this._page()
this.$emit('on-result-change') this.$emit('on-result-change')
} }
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
...@@ -263,21 +178,6 @@ export default { ...@@ -263,21 +178,6 @@ export default {
duration: 3000 duration: 3000
}) })
}, },
// 设置填写人乙
_setAnotherTester() {
if (this.selectIds.length === 0) {
this.$msgTip('warning')
} else {
this.$refs.testerModal._open(this.selectIds)
}
},
_editWriteTime() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this.$refs.refModal._open('填写时间')
}
},
_dateChange(data) { _dateChange(data) {
this.formObj.fillInTimeBegin = data[0] this.formObj.fillInTimeBegin = data[0]
this.formObj.fillInTimeEnd = data[1] this.formObj.fillInTimeEnd = data[1]
...@@ -287,15 +187,10 @@ export default { ...@@ -287,15 +187,10 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
switch (res) { switch (res) {
case '编辑': case '编辑':
// this.$refs.recordEditModal._openWithType(
// data.originalRecordId,
// 'ENVTESTMAKEEDIT'
// )
this._recordEdit(data) this._recordEdit(data)
break break
case '查看原始记录': case '查看原始记录':
this._recordLook(data) this._recordLook(data)
// this._recordView(data.originalRecordId)
break break
case '查看试验项目': case '查看试验项目':
this._itemView(data.id) this._itemView(data.id)
...@@ -303,18 +198,6 @@ export default { ...@@ -303,18 +198,6 @@ export default {
case '查看检测项目': case '查看检测项目':
this.$refs.refModal._open(data) this.$refs.refModal._open(data)
break break
case '查看样品':
this.$refs.refModal._open(data.id)
break
case '附件':
this.$refs.refModal._open(data.id, 'originalId')
break
case '删除':
this._deleteByIds([data.id])
break
case '操作记录':
this.$refs.refModal._open(data.id)
break
} }
}) })
}, },
...@@ -338,10 +221,6 @@ export default { ...@@ -338,10 +221,6 @@ export default {
_reportMakeLook(data) { _reportMakeLook(data) {
console.log(data) console.log(data)
this._viewReport(data) this._viewReport(data)
// const result = await soilReport.getExcelOriginalRecord(data.id)
// if (result) {
// this._viewReport(result)
// }
}, },
_viewReport(data) { _viewReport(data) {
if (data) { if (data) {
...@@ -390,9 +269,6 @@ export default { ...@@ -390,9 +269,6 @@ export default {
}, },
_tableResultChange(msg, data) { _tableResultChange(msg, data) {
switch (msg) { switch (msg) {
case 'page':
this.getPage = this.$store.state.EnvItem.page
break
case 'selectIds': case 'selectIds':
this.selectIds = data this.selectIds = data
break break
...@@ -416,29 +292,6 @@ export default { ...@@ -416,29 +292,6 @@ export default {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
this.getPage = result this.getPage = result
} }
},
// 批量删除原始记录
_batchDelete() {
if (this.selectIds.length > 0) {
const content = '确定删除这' + this.selectIds.length + '条数据?'
this._deleteByIds(this.selectIds, content)
} else {
this.$msgTip('warning')
}
},
_deleteByIds(ids, content) {
this.$Modal.confirm({
title: '提示',
content: content || '确定删除该记录?',
onOk: () => {
this.$store.dispatch('EnvItem/deleteOriRecord', ids).then(() => {
if (this.$store.state.EnvItem.success) {
this._page()
this.$Message.success('删除成功!')
}
})
}
})
} }
} }
} }
......
...@@ -79,6 +79,8 @@ export default { ...@@ -79,6 +79,8 @@ export default {
getPage: {}, getPage: {},
pageColumns: [ pageColumns: [
{ title: '创建人', key: 'uname', width: 180, fixed: 'left' }, { title: '创建人', key: 'uname', width: 180, fixed: 'left' },
{ title: '报告类型', key: 'reportType', width: 180 },
{ title: '备注', key: 'remark', width: 180 },
{ title: '创建时间', key: 'ctime', width: 180, dateTime: true } { title: '创建时间', key: 'ctime', width: 180, dateTime: true }
], ],
selectIds: [], selectIds: [],
......
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