Commit f44b54c1 by wangweidong

土工试验Lims

parent 28607137
......@@ -209,5 +209,18 @@ export default {
'&templateId=' +
data.id
)
.then(res => res),
saveExcelExpReport: data =>
http
.post(
'soil/v1/experiment/save_excel_exp_report?ids=' +
data.ids +
'&templateId=' +
data.templateId +
'&expName=' +
data.expName +
'&entrustId=' +
data.entrustId
)
.then(res => res)
}
......@@ -6,7 +6,7 @@
<Form ref="formObj" :id="formId" :model="formObj" :rules="ruleValidate" :label-width="100" inline>
<div>
<Form-item label="属性名称" prop="attributeName" class="width-48">
<Input v-model="formObj.attributeName" name="name" placeholder="请输入属性名称"/>
<Input v-model="formObj.attributeName" name="attributeName" placeholder="请输入属性名称"/>
</Form-item>
<Form-item label="属性" prop="dataAttribute" class="width-48">
<Input v-model="formObj.dataAttribute" name="dataAttribute"
......@@ -70,15 +70,15 @@ export default {
modalTitle: '',
templateId: '',
formObj: {
attributeName: '',
columnPlace: '',
unit: '',
status: '',
mainType: '',
smallType: '',
testValue: '',
mergeBegin: '',
mergeEnd: ''
attributeName: undefined,
columnPlace: undefined,
unit: undefined,
status: undefined,
mainType: undefined,
smallType: undefined,
testValue: undefined,
mergeBegin: undefined,
mergeEnd: undefined
},
ruleValidate: {
name: [{ required: true, message: '指标名称不能为空', trigger: 'blur' }]
......@@ -188,7 +188,7 @@ export default {
this.$refs.footerModal._hideLoading()
},
_open(id, formObj) {
this.formId = 'edit-form'
this.formId = 'edit-form-template-config'
this._hideLoading()
this.$refs.formObj.resetFields()
if (this.$string(formObj).isEmpty()) {
......@@ -244,32 +244,6 @@ export default {
_clearMarks() {
this.marksList = []
},
_getMarks() {
if (this.formObj.computeMark) {
this.$store
.dispatch('AptitudeFood/getMarks', {
computeMark: this.formObj.computeMark
})
.then(() => {
if (this.$store.state.AptitudeFood.model) {
this.marksList = this.$store.state.AptitudeFood.model
}
})
}
},
_getType() {
this.$store
.dispatch('LmsEnum/getByType', 'ItemCalculateType')
.then(() => {
this.computeTypeList = this.$store.state.LmsEnum.model
})
},
// 资质
_getAptitudeList() {
this.$store.dispatch('LmsBaseDict/getItem', '所需资质').then(() => {
this.aptitudeData = this.$store.state.LmsBaseDict.item
})
},
// 主检人&检测科室
_groupChange(data) {
if (data) {
......@@ -286,20 +260,6 @@ export default {
this.formObj.tester = data.label
}
},
_getUserList(groupId) {
const data = { rows: 500 }
if (groupId) {
Object.assign(data, { groupId: groupId })
}
this.$store.dispatch('LmsUserGroup/getUserByGroupId', data).then(() => {
this.userData = this.$store.state.LmsUserGroup.userPage.records
})
},
_getUserGroup() {
this.$store.dispatch('LmsUserGroup/list').then(() => {
this.groupData = this.$store.state.LmsUserGroup.list
})
},
// 单位
_unitChange(msg, data) {
switch (msg) {
......@@ -311,31 +271,6 @@ export default {
break
}
},
_getUnitList(data) {
this.unitData = []
if (data) {
this.$store
.dispatch('AptitudeFood/historyUnit', { unit: data })
.then(() => {
this.unitData = this.$store.state.AptitudeFood.list
})
} else {
this.$store.dispatch('AptitudeFood/historyUnit').then(() => {
this.unitData = this.$store.state.AptitudeFood.list
})
}
},
// 检测依据
_getTestBasisList(data) {
const obj = { classify: 1 }
if (data) {
obj.stdNum = data.stdNum
}
this.$store.dispatch('StandardInfo/page', obj).then(() => {
this.testBasisData = this.$store.state.StandardInfo.page.records
})
},
// 获取表数据
_resultChange(msg) {
this.showModal = false
......@@ -347,7 +282,7 @@ export default {
_ok() {
this.$refs.formObj.validate(valid => {
if (valid) {
const data = this.$serialize('edit-form')
const data = this.$serialize('edit-form-template-config')
if (this.$string(this.id).isEmpty()) {
data.templateId = this.templateId
// 添加
......
......@@ -6,21 +6,21 @@
<Form id="task-assign-item-left" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="检测项目:">
<Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入检测项目" clearable></Input>
<Input v-model="formObj.name" placeholder="请输入检测项目" clearable @on-enter="_formSearch"></Input>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
<Button type="primary" @click="_formSearch">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24">
<btn-list @on-result-change="_btnClick" class="contHide" style="margin-bottom: 6px;"></btn-list>
<btn-list class="contHide" style="margin-bottom: 6px;" @on-result-change="_btnClick"></btn-list>
</Col>
<!-- 表格 -->
<Col span="24">
<PTVXETable ref="pageTable" :isRadio="true" :pageColumns="pageColumns" :table-name="tableName"
:tableHeight="tableHeight"
@on-result-change="_tableResultChange" :getPage="getPage" :icon-msg="iconMsg" :hide-checkbox="true" select-data>
<PTVXETable ref="pageTable" :is-radio="true" :page-columns="pageColumns" :table-name="tableName"
:table-height="tableHeight"
:get-page="getPage" :icon-msg="iconMsg" :hide-checkbox="true" select-data @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in userColumns.length > 0 ?userColumns:pageColumns"
:key="item.key"
......@@ -35,8 +35,8 @@
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
<VXESettingCol slot="setting" :pageColumns="pageColumns" :userColumns="userColumns"
@on-result-change="_resetColumn" :table-name="tableName"></VXESettingCol>
<VXESettingCol slot="setting" :page-columns="pageColumns" :user-columns="userColumns"
:table-name="tableName" @on-result-change="_resetColumn"></VXESettingCol>
</PTVXETable>
</Col>
</Row>
......@@ -198,10 +198,16 @@ export default {
console.log('左侧项目名称', this.itemName)
console.log('右侧样品Id', this.sampleIds)
console.log('报告信息', data)
console.log('this.entrustId', this.id)
this.$refs.pageTable._hideLoading()
const result = await soilSample.generateExcelReport(data)
const result = await soilSample.saveExcelExpReport({
entrustId: this.id,
expName: this.itemName,
ids: this.sampleIds,
templateId: data.id
})
if (result) {
await this._page()
// await this._page()
if (result === null || result === undefined) {
this.$Message.warning('证书编制失败,请联系管理员!')
this.$refs.pageTable._hideLoading()
......
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