Commit fdc9bd87 by lichengming

修改了填写原始记录

parent d6edace4
...@@ -43,13 +43,21 @@ export default { ...@@ -43,13 +43,21 @@ export default {
// 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式 // 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式
const bindUri = const bindUri =
Global.baseURL + '/env/v1/env_item/original_record_data_bind?source=' Global.baseURL + '/env/v1/env_item/original_record_data_bind?source='
const url = let url = ''
Global.recordURL + if (process.env.NODE_ENV === 'production') {
'/print/v1/eln/form_YT_' + url =
formId + 'http://record.patzn.com/print/v1/eln/form_YT_' +
'?bindUri=' + formId +
encodeURIComponent(bindUri) '?bindUri=' +
encodeURIComponent(bindUri)
} else {
url =
Global.recordURL +
'/print/v1/eln/form_YT_' +
formId +
'?bindUri=' +
encodeURIComponent(bindUri)
}
// this.htmlContent = '<iframe style="padding: 0px;width:100%;height:100%" frameborder="0" src=' + encodeURI(url) + '></iframe>'; // this.htmlContent = '<iframe style="padding: 0px;width:100%;height:100%" frameborder="0" src=' + encodeURI(url) + '></iframe>';
this.$layx(this.formIdTemp, '编辑原始记录', url) this.$layx(this.formIdTemp, '编辑原始记录', url)
}, },
...@@ -62,15 +70,25 @@ export default { ...@@ -62,15 +70,25 @@ export default {
// 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式 // 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式
const bindUri = const bindUri =
Global.baseURL + '/env/v1/env_item/original_record_data_bind?source=' Global.baseURL + '/env/v1/env_item/original_record_data_bind?source='
const url = let url = ''
Global.recordURL + if (process.env.NODE_ENV === 'production') {
'/print/v1/eln/form_YT_' + url =
formId + 'http://record.patzn.com/print/v1/eln/form_YT_' +
'?bindUri=' + formId +
encodeURIComponent(bindUri) + '?bindUri=' +
'&type=' + encodeURIComponent(bindUri) +
fromType '&type=' +
fromType
} else {
url =
Global.recordURL +
'/print/v1/eln/form_YT_' +
formId +
'?bindUri=' +
encodeURIComponent(bindUri) +
'&type=' +
fromType
}
// this.htmlContent = '<iframe style="padding: 0px;width:100%;height:100%" frameborder="0" src=' + encodeURI(url) + '></iframe>'; // this.htmlContent = '<iframe style="padding: 0px;width:100%;height:100%" frameborder="0" src=' + encodeURI(url) + '></iframe>';
this.$layx(this.formIdTemp, '编辑原始记录', url) this.$layx(this.formIdTemp, '编辑原始记录', url)
}, },
......
...@@ -325,14 +325,17 @@ export default { ...@@ -325,14 +325,17 @@ export default {
// 查看原始记录 // 查看原始记录
_recordView(originalRecordId) { _recordView(originalRecordId) {
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, { // layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
layx.iframe( layx.iframe(
'labRecordWriteOriView', 'labRecordWriteOriView',
'原始记录预览', '原始记录预览',
Global.recordURL + recordUrl + '/print/v1/form/' + originalRecordId + '?type=ENVTESTMAKE',
'/print/v1/form/' +
originalRecordId +
'?type=ENVTESTMAKE',
{ {
event: { event: {
onload: { onload: {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
:edit-render="item.editCell?{autofocus: 'input'}:null" sortable> :edit-render="item.editCell?{autofocus: 'input'}:null" sortable>
<template v-slot:edit="scope"> <template v-slot:edit="scope">
<div v-if="item.key==='describeDetail'" @click.stop="_handleRow(scope)"> <div v-if="item.key==='describeDetail'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.describeDetail" @change="_inputChange(scope.row)"></el-input> <el-input v-model="scope.row.describeDetail" @blur="_page()" @change="_inputChange(scope.row)"></el-input>
</div> </div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
......
...@@ -48,6 +48,24 @@ ...@@ -48,6 +48,24 @@
</el-select> </el-select>
</div> </div>
</div> </div>
<div v-else-if="item.key==='quantity'">
<div v-if="editIndex!==scope.rowIndex">{{scope.row[item.key]}}</div>
<div v-else>
<el-input v-model="scope.row.quantity" placeholder="制备数量"></el-input>
</div>
</div>
<div v-else-if="item.key==='quantity'">
<div v-if="editIndex!==scope.rowIndex">{{scope.row[item.key]}}</div>
<div v-else>
<el-input v-model="scope.row.quantity" placeholder="制备数量"></el-input>
</div>
</div>
<div v-else-if="item.key==='keepLocation'">
<div v-if="editIndex!==scope.rowIndex">{{scope.row[item.key]}}</div>
<div v-else>
<el-input v-model="scope.row.keepLocation" placeholder="留存位置"></el-input>
</div>
</div>
<span v-else>{{scope.row[item.key]}}</span> <span v-else>{{scope.row[item.key]}}</span>
</template> </template>
</vxe-table-column> </vxe-table-column>
...@@ -116,6 +134,7 @@ export default { ...@@ -116,6 +134,7 @@ export default {
{ title: '状态', key: 'status', status: true, width: 100 }, { title: '状态', key: 'status', status: true, width: 100 },
{ title: '包装类型', key: 'samplePack', width: 100 }, { title: '包装类型', key: 'samplePack', width: 100 },
{ title: '保存容器', key: 'keepContainer', width: 150 }, { title: '保存容器', key: 'keepContainer', width: 150 },
{ title: '留存位置', key: 'keepLocation', width: 150 },
{ title: '制备数量', key: 'quantity', width: 100 }, { title: '制备数量', key: 'quantity', width: 100 },
{ title: '单位', key: 'unit', width: 70 }, { title: '单位', key: 'unit', width: 70 },
{ title: '制备人', key: 'preparer', width: 130 }, { title: '制备人', key: 'preparer', width: 130 },
...@@ -176,11 +195,6 @@ export default { ...@@ -176,11 +195,6 @@ export default {
}, },
mounted() { mounted() {
this.$refs.pageTable._showLoading() this.$refs.pageTable._showLoading()
// 样品存储期限预警
// this.sampleHandleValue = Number(localStorage.getItem('sampleHandleValue'))
// this._getLocList()
// this._getConditionList()
// this._getBackUpCount()
this._getContainerList() this._getContainerList()
}, },
methods: { methods: {
...@@ -222,7 +236,9 @@ export default { ...@@ -222,7 +236,9 @@ export default {
_save() { _save() {
this.$nextTick(function() { this.$nextTick(function() {
const tempData = { const tempData = {
keepContainer: this.getPage.records[this.currentIndex].keepContainer keepContainer: this.getPage.records[this.currentIndex].keepContainer,
quantity: this.getPage.records[this.currentIndex].quantity,
keepLocation: this.getPage.records[this.currentIndex].keepLocation
} }
this._saveOk({ this._saveOk({
id: this.getPage.records[this.currentIndex].id, id: this.getPage.records[this.currentIndex].id,
......
...@@ -214,14 +214,17 @@ export default { ...@@ -214,14 +214,17 @@ export default {
}, },
_viewRecord(originalRecordId) { _viewRecord(originalRecordId) {
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, { // layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
layx.iframe( layx.iframe(
'labRecordWriteOriView', 'labRecordWriteOriView',
'原始记录预览', '原始记录预览',
Global.recordURL + recordUrl + '/print/v1/form/' + originalRecordId + '?type=ENVTESTMAKE',
'/print/v1/form/' +
originalRecordId +
'?type=ENVTESTMAKE',
{ {
event: { event: {
onload: { onload: {
......
...@@ -459,14 +459,17 @@ export default { ...@@ -459,14 +459,17 @@ export default {
}, },
_viewRecord(originalRecordId) { _viewRecord(originalRecordId) {
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, { // layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
layx.iframe( layx.iframe(
'labRecordWriteOriView', 'labRecordWriteOriView',
'原始记录预览', '原始记录预览',
Global.recordURL + recordUrl + '/print/v1/form/' + originalRecordId + '?type=ENVTESTMAKE',
'/print/v1/form/' +
originalRecordId +
'?type=ENVTESTMAKE',
{ {
event: { event: {
onload: { onload: {
......
...@@ -207,14 +207,17 @@ export default { ...@@ -207,14 +207,17 @@ export default {
}, },
_viewRecord(originalRecordId) { _viewRecord(originalRecordId) {
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, { // layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
layx.iframe( layx.iframe(
'labRecordWriteOriView', 'labRecordWriteOriView',
'原始记录预览', '原始记录预览',
Global.recordURL + recordUrl + '/print/v1/form/' + originalRecordId + '?type=ENVTESTMAKE',
'/print/v1/form/' +
originalRecordId +
'?type=ENVTESTMAKE',
{ {
event: { event: {
onload: { onload: {
......
...@@ -459,14 +459,17 @@ export default { ...@@ -459,14 +459,17 @@ export default {
}, },
_viewRecord(originalRecordId) { _viewRecord(originalRecordId) {
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, { // layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
layx.iframe( layx.iframe(
'labRecordWriteOriView', 'labRecordWriteOriView',
'原始记录预览', '原始记录预览',
Global.recordURL + recordUrl + '/print/v1/form/' + originalRecordId + '?type=ENVTESTMAKE',
'/print/v1/form/' +
originalRecordId +
'?type=ENVTESTMAKE',
{ {
event: { event: {
onload: { onload: {
......
...@@ -39,17 +39,21 @@ export default { ...@@ -39,17 +39,21 @@ export default {
this.formIdTemp = formId + this.$randomCode() this.formIdTemp = formId + this.$randomCode()
this.again = true this.again = true
// this.showModal = true; // this.showModal = true;
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式 // 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式
const bindUri = const bindUri =
Global.baseURL + '/env/v1/env_item/original_record_data_bind?source=' Global.baseURL + '/env/v1/env_item/original_record_data_bind?source='
const url = const url =
Global.recordURL + recordUrl +
'/print/v1/eln/form_YT_' + '/print/v1/eln/form_YT_' +
formId + formId +
'?bindUri=' + '?bindUri=' +
encodeURIComponent(bindUri) encodeURIComponent(bindUri)
// this.htmlContent = '<iframe style="padding: 0px;width:100%;height:100%" frameborder="0" src=' + encodeURI(url) + '></iframe>'; // this.htmlContent = '<iframe style="padding: 0px;width:100%;height:100%" frameborder="0" src=' + encodeURI(url) + '></iframe>';
this.$layx(this.formIdTemp, '编辑原始记录', url) this.$layx(this.formIdTemp, '编辑原始记录', url)
}, },
...@@ -58,19 +62,23 @@ export default { ...@@ -58,19 +62,23 @@ export default {
this.formIdTemp = formId + this.$randomCode() this.formIdTemp = formId + this.$randomCode()
this.again = true this.again = true
// this.showModal = true; // this.showModal = true;
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式 // 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式
const bindUri = const bindUri =
Global.baseURL + '/env/v1/env_item/original_record_data_bind?source=' Global.baseURL + '/env/v1/env_item/original_record_data_bind?source='
const url = const url =
Global.recordURL + recordUrl +
'/print/v1/eln/form_YT_' + '/print/v1/eln/form_YT_' +
formId + formId +
'?bindUri=' + '?bindUri=' +
encodeURIComponent(bindUri) + encodeURIComponent(bindUri) +
'&type=' + '&type=' +
fromType fromType
// this.htmlContent = '<iframe style="padding: 0px;width:100%;height:100%" frameborder="0" src=' + encodeURI(url) + '></iframe>'; // this.htmlContent = '<iframe style="padding: 0px;width:100%;height:100%" frameborder="0" src=' + encodeURI(url) + '></iframe>';
this.$layx(this.formIdTemp, '编辑原始记录', url) this.$layx(this.formIdTemp, '编辑原始记录', url)
}, },
......
...@@ -287,14 +287,17 @@ export default { ...@@ -287,14 +287,17 @@ export default {
// 查看原始记录 // 查看原始记录
_recordView(originalRecordId) { _recordView(originalRecordId) {
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, { // layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
layx.iframe( layx.iframe(
'labRecordWriteOriView', 'labRecordWriteOriView',
'原始记录预览', '原始记录预览',
Global.recordURL + recordUrl + '/print/v1/form/' + originalRecordId + '?type=ENVTESTMAKE',
'/print/v1/form/' +
originalRecordId +
'?type=ENVTESTMAKE',
{ {
event: { event: {
onload: { onload: {
......
...@@ -153,15 +153,6 @@ export default { ...@@ -153,15 +153,6 @@ export default {
this._hideLoading() this._hideLoading()
count = 0 count = 0
}, },
// _page() {
// // 只查实验室的
// console.log('page')
// // this.$refs.pageTable._page(
// // '',
// // 'ElnTemplate/page',
// // this.$serializeFormSearch(this.formObj)
// // )
// },
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj.entrustId = this.id this.formObj.entrustId = this.id
...@@ -195,25 +186,9 @@ export default { ...@@ -195,25 +186,9 @@ export default {
this.$Message.warning('请选择一个原始记录模板!') this.$Message.warning('请选择一个原始记录模板!')
this._hideLoading() this._hideLoading()
} else { } else {
console.log(this.selectData)
// 校验多样品多项目原始记录模板 // 校验多样品多项目原始记录模板
const param = {
ids: '1289126946969550850',
tempId: this.selectData[0].id
}
console.log('模板', param)
this._createOriginalRecord() this._createOriginalRecord()
// this._check(param)
// this.$store.dispatch('EnvItem/checkLimit', param).then(() => {
// const result = this.$store.state.EnvItem.success
// if (result) {
// // 不是多样品项目模板或者数量小于限值,填写原始记录
// // (3)originalTemplateId不为0也不为undefined ---- 填写过或者绑定过
// this._bindOriginalRecord()
// } else {
// this.$msgTip('warning', '所选数据超过,原始记录模板设置最大值!')
// this._hideLoading()
// }
// })
} }
}, },
_check: async function(param) { _check: async function(param) {
...@@ -221,72 +196,23 @@ export default { ...@@ -221,72 +196,23 @@ export default {
console.log(result) console.log(result)
}, },
_createOriginalRecord() { _createOriginalRecord() {
// const result = await soilTest.searchItem({ ids: this.itemIds.join(',') })
// console.log(result)
this.showModal = false this.showModal = false
console.log('环境', process.env.NODE_ENV)
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
const url = const url =
Global.recordURL + '/print/v1/eln/template_YT_' + this.selectData[0].id recordUrl + '/print/v1/eln/template_YT_' + this.selectData[0].id
const params = { const params = {
ids: this.itemIds.join(',') ids: this.itemIds.join(',')
// allSampleCount: '',
// normalSampleCount: '',
// itemCount: '',
// parallelCount: '',
// labelSample: ''
} }
this.$refs.iframeModal._createIframe(url, params) this.$refs.iframeModal._createIframe(url, params)
console.log('原始记录', url, params) console.log('原始记录', url, params)
localStorage.setItem('recordStatus', 'addLabRecord') localStorage.setItem('recordStatus', 'addLabRecord')
}, },
// 生成原始记录
_bindOriginalRecord() {
this.$store
.dispatch('EnvItem/allCommonSampleCount', {
ids: this.itemIds.join(',')
})
.then(() => {
const result = this.$store.state.EnvItem.list
let allSampleCount = ''
let normalSampleCount = ''
let itemCount = ''
let parallel = ''
let labelSample = ''
result.forEach(item => {
if (item.sampleCountType === 'all') {
allSampleCount = item.sampleCountInteger
} else if (item.sampleCountType === 'normal') {
normalSampleCount = item.sampleCountInteger
} else if (item.sampleCountType === 'item') {
itemCount = item.sampleCountInteger
} else if (item.sampleCountType === 'parallel') {
parallel = item.sampleCountInteger
} else if (item.sampleCountType === 'mark') {
labelSample = item.sampleCountInteger
}
})
this.showModal = false
const url =
Global.recordURL +
'/print/v1/eln/template_YT_' +
this.selectData[0].id
const params = {
ids: this.itemIds.join(','),
allSampleCount: allSampleCount,
normalSampleCount: normalSampleCount,
itemCount: itemCount,
parallelCount: parallel,
labelSample: labelSample
}
this.$refs.iframeModal._createIframe(url, params)
localStorage.setItem('recordStatus', 'addLabRecord')
// this.$layx('recordAddTemplate', '原始记录添加', Global.recordURL + '/print/v1/eln/template_YT_'
// + this.selectData[0].id
// + '?bindUri=' + encodeURIComponent(bindUri))
})
},
_recordChange() { _recordChange() {
this.$emit('on-result-change') this.$emit('on-result-change')
}, },
...@@ -333,17 +259,6 @@ export default { ...@@ -333,17 +259,6 @@ export default {
tempData.entrustId = this.entrustId tempData.entrustId = this.entrustId
this._save(tempData) this._save(tempData)
} }
// this.$store
// .dispatch('EnvItem/saveFormForItem', tempData)
// .then(() => {
// if (this.$store.state.EnvItem.success) {
// this.$Message.success('添加成功')
// this._recordChange()
// this.$refs.iframeModal._closeIframe()
// // 关闭所有layx弹框
// // layx.destroyAll('recordAddTemplate');
// }
// })
} }
} }
count = count + 1 count = count + 1
......
...@@ -65,10 +65,6 @@ ...@@ -65,10 +65,6 @@
<!-- eslint-disable-next-line vue/require-component-is --> <!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component> <component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive> </keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
</div> </div>
</template> </template>
<script> <script>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</Col> </Col>
<!--操作--> <!--操作-->
<Col span="24"> <Col span="24">
<btn-list :msg="btn" @on-result-change="_btnClick" class="contHide"></btn-list> <btn-list :msg="envPro?btnPro:btn" @on-result-change="_btnClick" class="contHide"></btn-list>
</Col> </Col>
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
...@@ -90,6 +90,7 @@ export default { ...@@ -90,6 +90,7 @@ export default {
testBasis: '' testBasis: ''
}, },
entrustId: '', entrustId: '',
envPro: false,
// 用户自己选中的列 // 用户自己选中的列
userColumns: [], userColumns: [],
currentComponent: '', currentComponent: '',
...@@ -117,14 +118,12 @@ export default { ...@@ -117,14 +118,12 @@ export default {
btn: [ btn: [
{ type: 'success', id: '', name: '填写原始记录' }, { type: 'success', id: '', name: '填写原始记录' },
{ type: 'success', id: '', name: '完成提交' }, { type: 'success', id: '', name: '完成提交' },
{ type: 'success', id: '', name: '设备' }
],
btnPro: [
{ type: 'success', id: '', name: '填写原始记录' },
{ type: 'success', id: '', name: '设备' }, { type: 'success', id: '', name: '设备' },
{ type: '', id: 'food-task-assign-adjust-group', name: '调整分组' }, { type: 'success', id: '', name: '完成提交' }
{
type: '',
id: 'food-task-assign-plan-date',
name: '设置计划完成时间'
},
{ type: '', id: 'food-task-assign-maintain-info', name: '信息维护' }
], ],
iconMsg: [ iconMsg: [
{ type: 'ios-book', id: '', name: '查看原始记录' }, { type: 'ios-book', id: '', name: '查看原始记录' },
...@@ -137,9 +136,9 @@ export default { ...@@ -137,9 +136,9 @@ export default {
pageColumns: [ pageColumns: [
{ title: '试验项目', key: 'name', width: 120, fixed: 'left' }, { title: '试验项目', key: 'name', width: 120, fixed: 'left' },
{ title: '试样编号', key: 'sampleCode', width: 180 }, { title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '是否填写原始记录', key: 'recorded', width: 180 },
{ title: '试样深度', key: 'sampleDepth', width: 180 }, { title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '试样包装类型', key: 'samplePack', width: 180 }, { title: '试样包装类型', key: 'samplePack', width: 180 },
{ title: '是否填写原始记录', key: 'recorded', width: 180 },
{ title: '状态', key: 'progress', width: 180 }, { title: '状态', key: 'progress', width: 180 },
{ title: '大类', key: 'mainType', width: 140 }, { title: '大类', key: 'mainType', width: 140 },
{ title: '小类', key: 'smallType', width: 140 }, { title: '小类', key: 'smallType', width: 140 },
...@@ -173,6 +172,9 @@ export default { ...@@ -173,6 +172,9 @@ export default {
}, },
mounted() { mounted() {
// this._dicSearch() // this._dicSearch()
if (process.env.NODE_ENV === 'production') {
this.envPro = true
}
}, },
methods: { methods: {
_iconClick(res, data, currentComponent) { _iconClick(res, data, currentComponent) {
...@@ -181,7 +183,6 @@ export default { ...@@ -181,7 +183,6 @@ export default {
case '查看原始记录': case '查看原始记录':
console.log(data) console.log(data)
if (data.recordId) { if (data.recordId) {
// this._viewRecord('1309434759937146882')
this._viewRecord(data.recordId) this._viewRecord(data.recordId)
} else { } else {
this.$Message.warning('未填写原始记录') this.$Message.warning('未填写原始记录')
...@@ -217,11 +218,17 @@ export default { ...@@ -217,11 +218,17 @@ export default {
_viewRecord(recordId) { _viewRecord(recordId) {
console.log(recordId) console.log(recordId)
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, { // layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
layx.iframe( layx.iframe(
'labRecordWriteOriView', 'labRecordWriteOriView',
'原始记录预览', '原始记录预览',
Global.recordURL + '/print/v1/form/' + recordId + '?type=ENVTESTMAKE', recordUrl + '/print/v1/form/' + recordId + '?type=ENVTESTMAKE',
{ {
event: { event: {
onload: { onload: {
...@@ -266,22 +273,6 @@ export default { ...@@ -266,22 +273,6 @@ export default {
if (result) { if (result) {
this.$Message.success('添加成功') this.$Message.success('添加成功')
} }
// let equipIds = []
// for (let i = 0; i < res.length; i++) {
// equipIds.push(res[i].id)
// }
// this.$layxLoading()
// this.$store.dispatch('FoodItem/selectEquip', {
// ids: this.selectIds.join(','),
// equipIds: equipIds.join(',')
// }).then(() => {
// if (this.$store.state.FoodItem.success) {
// this.$Message.success('操作成功!');
// this._updateRows('selected');
// }
// this.$layxLoading(false);
// });
}, },
// 从字典查预警期 // 从字典查预警期
_dicSearch() { _dicSearch() {
...@@ -473,7 +464,7 @@ export default { ...@@ -473,7 +464,7 @@ export default {
} }
} }
if (errorInfo.length !== 0) { if (errorInfo.length !== 0) {
this.$Message.warning('第' + errorInfo + '条数据已填写原始记录') this.$Message.warning('所选数据中有已填写原始记录的')
} else { } else {
console.log('打开填写原始记录界面') console.log('打开填写原始记录界面')
this.$refs.recordModal._open(this.selectIds, this.entrustId) this.$refs.recordModal._open(this.selectIds, this.entrustId)
...@@ -535,14 +526,6 @@ export default { ...@@ -535,14 +526,6 @@ export default {
return obj return obj
}, },
_page: async function() { _page: async function() {
// const saveName = []
// const saveMethod = []
// for (let i = 0; i < this.leftSelectData.length; i++) {
// saveName.push(this.leftSelectData[i].name)
// saveMethod.push(this.leftSelectData[i].testMethod)
// }
// const data = this.$serialize('task-assign-item-right')
// console.log(data)
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj.entrustId = this.entrustId this.formObj.entrustId = this.entrustId
this.formObj.name = this.leftSelectData.name this.formObj.name = this.leftSelectData.name
......
...@@ -120,9 +120,9 @@ export default { ...@@ -120,9 +120,9 @@ export default {
pageColumns: [ pageColumns: [
{ title: '试验项目', key: 'name', width: 120, fixed: 'left' }, { title: '试验项目', key: 'name', width: 120, fixed: 'left' },
{ title: '试样编号', key: 'sampleCode', width: 180 }, { title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '是否填写原始记录', key: 'recorded', width: 180 },
{ title: '试样深度', key: 'sampleDepth', width: 180 }, { title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '试样包装类型', key: 'samplePack', width: 180 }, { title: '试样包装类型', key: 'samplePack', width: 180 },
{ title: '是否填写原始记录', key: 'recorded', width: 180 },
{ title: '状态', key: 'progress', width: 180 }, { title: '状态', key: 'progress', width: 180 },
{ title: '大类', key: 'mainType', width: 140 }, { title: '大类', key: 'mainType', width: 140 },
{ title: '小类', key: 'smallType', width: 140 }, { title: '小类', key: 'smallType', width: 140 },
...@@ -378,7 +378,7 @@ export default { ...@@ -378,7 +378,7 @@ export default {
} }
} }
if (errorInfo.length !== 0) { if (errorInfo.length !== 0) {
this.$Message.warning('第' + errorInfo + '条数据已填写原始记录') this.$Message.warning('所选数据中有已填写原始记录的')
} else { } else {
console.log('打开填写原始记录界面') console.log('打开填写原始记录界面')
this.$refs.recordModal._open(this.selectIds, this.entrustId) this.$refs.recordModal._open(this.selectIds, this.entrustId)
...@@ -451,13 +451,6 @@ export default { ...@@ -451,13 +451,6 @@ export default {
switch (msg) { switch (msg) {
case 'page': case 'page':
this._page() this._page()
// this.result = this.getPage.records;
// this.$nextTick(() => {
// this.$refs.pageTable._checkAll()
// })
// if (this.getPage.records.length === 0) {
// this.$emit('on-result-change')
// }
break break
case 'selectData': case 'selectData':
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
...@@ -475,7 +468,6 @@ export default { ...@@ -475,7 +468,6 @@ export default {
break break
case 'changeSize': case 'changeSize':
this._page() this._page()
// this.$refs.pageTable._checkAll()
break break
} }
}, },
...@@ -485,7 +477,6 @@ export default { ...@@ -485,7 +477,6 @@ export default {
case '查看原始记录': case '查看原始记录':
console.log(data) console.log(data)
if (data.recordId) { if (data.recordId) {
// this._viewRecord('1309434759937146882')
this._viewRecord(data.recordId) this._viewRecord(data.recordId)
} else { } else {
this.$Message.warning('未填写原始记录') this.$Message.warning('未填写原始记录')
...@@ -508,11 +499,17 @@ export default { ...@@ -508,11 +499,17 @@ export default {
}, },
_viewRecord(recordId) { _viewRecord(recordId) {
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, { // layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
let recordUrl = ''
if (process.env.NODE_ENV === 'production') {
recordUrl = 'http://record.patzn.com'
} else {
recordUrl = Global.recordURL
}
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
layx.iframe( layx.iframe(
'labRecordWriteOriView', 'labRecordWriteOriView',
'原始记录预览', '原始记录预览',
Global.recordURL + '/print/v1/form/' + recordId + '?type=ENVTESTMAKE', recordUrl + '/print/v1/form/' + recordId + '?type=ENVTESTMAKE',
{ {
event: { event: {
onload: { onload: {
......
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