Commit f44b54c1 by wangweidong

土工试验Lims

parent 28607137
...@@ -209,5 +209,18 @@ export default { ...@@ -209,5 +209,18 @@ export default {
'&templateId=' + '&templateId=' +
data.id 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) .then(res => res)
} }
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<Form ref="formObj" :id="formId" :model="formObj" :rules="ruleValidate" :label-width="100" inline> <Form ref="formObj" :id="formId" :model="formObj" :rules="ruleValidate" :label-width="100" inline>
<div> <div>
<Form-item label="属性名称" prop="attributeName" class="width-48"> <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>
<Form-item label="属性" prop="dataAttribute" class="width-48"> <Form-item label="属性" prop="dataAttribute" class="width-48">
<Input v-model="formObj.dataAttribute" name="dataAttribute" <Input v-model="formObj.dataAttribute" name="dataAttribute"
...@@ -70,15 +70,15 @@ export default { ...@@ -70,15 +70,15 @@ export default {
modalTitle: '', modalTitle: '',
templateId: '', templateId: '',
formObj: { formObj: {
attributeName: '', attributeName: undefined,
columnPlace: '', columnPlace: undefined,
unit: '', unit: undefined,
status: '', status: undefined,
mainType: '', mainType: undefined,
smallType: '', smallType: undefined,
testValue: '', testValue: undefined,
mergeBegin: '', mergeBegin: undefined,
mergeEnd: '' mergeEnd: undefined
}, },
ruleValidate: { ruleValidate: {
name: [{ required: true, message: '指标名称不能为空', trigger: 'blur' }] name: [{ required: true, message: '指标名称不能为空', trigger: 'blur' }]
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
this.$refs.footerModal._hideLoading() this.$refs.footerModal._hideLoading()
}, },
_open(id, formObj) { _open(id, formObj) {
this.formId = 'edit-form' this.formId = 'edit-form-template-config'
this._hideLoading() this._hideLoading()
this.$refs.formObj.resetFields() this.$refs.formObj.resetFields()
if (this.$string(formObj).isEmpty()) { if (this.$string(formObj).isEmpty()) {
...@@ -244,32 +244,6 @@ export default { ...@@ -244,32 +244,6 @@ export default {
_clearMarks() { _clearMarks() {
this.marksList = [] 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) { _groupChange(data) {
if (data) { if (data) {
...@@ -286,20 +260,6 @@ export default { ...@@ -286,20 +260,6 @@ export default {
this.formObj.tester = data.label 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) { _unitChange(msg, data) {
switch (msg) { switch (msg) {
...@@ -311,31 +271,6 @@ export default { ...@@ -311,31 +271,6 @@ export default {
break 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) { _resultChange(msg) {
this.showModal = false this.showModal = false
...@@ -347,7 +282,7 @@ export default { ...@@ -347,7 +282,7 @@ export default {
_ok() { _ok() {
this.$refs.formObj.validate(valid => { this.$refs.formObj.validate(valid => {
if (valid) { if (valid) {
const data = this.$serialize('edit-form') const data = this.$serialize('edit-form-template-config')
if (this.$string(this.id).isEmpty()) { if (this.$string(this.id).isEmpty()) {
data.templateId = this.templateId data.templateId = this.templateId
// 添加 // 添加
......
...@@ -6,21 +6,21 @@ ...@@ -6,21 +6,21 @@
<Form id="task-assign-item-left" :label-width="70" inline onsubmit="return false"> <Form id="task-assign-item-left" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" 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>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button type="primary" @click="_formSearch">搜索</Button>
</Form-item> </Form-item>
</Form> </Form>
</Col> </Col>
<Col span="24"> <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>
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<PTVXETable ref="pageTable" :isRadio="true" :pageColumns="pageColumns" :table-name="tableName" <PTVXETable ref="pageTable" :is-radio="true" :page-columns="pageColumns" :table-name="tableName"
:tableHeight="tableHeight" :table-height="tableHeight"
@on-result-change="_tableResultChange" :getPage="getPage" :icon-msg="iconMsg" :hide-checkbox="true" select-data> :get-page="getPage" :icon-msg="iconMsg" :hide-checkbox="true" select-data @on-result-change="_tableResultChange">
<vxe-table-column <vxe-table-column
v-for="item in userColumns.length > 0 ?userColumns:pageColumns" v-for="item in userColumns.length > 0 ?userColumns:pageColumns"
:key="item.key" :key="item.key"
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
<span v-else>{{scope.row[item.key]}}</span> <span v-else>{{scope.row[item.key]}}</span>
</template> </template>
</vxe-table-column> </vxe-table-column>
<VXESettingCol slot="setting" :pageColumns="pageColumns" :userColumns="userColumns" <VXESettingCol slot="setting" :page-columns="pageColumns" :user-columns="userColumns"
@on-result-change="_resetColumn" :table-name="tableName"></VXESettingCol> :table-name="tableName" @on-result-change="_resetColumn"></VXESettingCol>
</PTVXETable> </PTVXETable>
</Col> </Col>
</Row> </Row>
...@@ -198,10 +198,16 @@ export default { ...@@ -198,10 +198,16 @@ export default {
console.log('左侧项目名称', this.itemName) console.log('左侧项目名称', this.itemName)
console.log('右侧样品Id', this.sampleIds) console.log('右侧样品Id', this.sampleIds)
console.log('报告信息', data) console.log('报告信息', data)
console.log('this.entrustId', this.id)
this.$refs.pageTable._hideLoading() 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) { if (result) {
await this._page() // await this._page()
if (result === null || result === undefined) { if (result === null || result === undefined) {
this.$Message.warning('证书编制失败,请联系管理员!') this.$Message.warning('证书编制失败,请联系管理员!')
this.$refs.pageTable._hideLoading() 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