Commit 6eedaae7 by zhangmengqi

Merge branch 'dev'

parents 95a940d1 887702a9
......@@ -29,6 +29,8 @@ export default {
getVOById: data => http.get('soil/v1/entrust/vo/' + data).then(res => res),
deleteById: data =>
http.delete('soil/v1/entrust/?ids=' + data).then(res => res),
experimentDeleteById: data =>
http.delete('soil/v1/experiment/?ids=' + data).then(res => res),
// 保存
save: data =>
https
......@@ -65,6 +67,8 @@ export default {
http.post('soil/v1/sample/page_send_his', data).then(res => res),
receiveSample: data =>
http.post('soil/v1/sample/receive_sample', data).then(res => res),
sampleRetain: data =>
http.post('soil/v1/sample/sample_retain', data).then(res => res),
sendSample: data =>
http.post('soil/v1/sample/send_sample', data).then(res => res),
pagePrepare: data =>
......
......@@ -9,6 +9,8 @@ export default {
// page
locationPage: data =>
http.post('soil/v1/receive_location/page', data).then(res => res),
pageRetain: data =>
http.post('soil/v1/sample/page_retain', data).then(res => res),
locationList: data =>
http.post('soil/v1/receive_location/list', data).then(res => res),
locationGetById: data =>
......@@ -137,5 +139,24 @@ export default {
// 余样编辑
editPrepare: data =>
http.put('soil/v1/prepare/' + data.id, data.obj).then(res => res),
getUserList: data => http.post('/base/v1/user/page').then(res => res)
getUserList: data => http.post('/base/v1/user/page').then(res => res),
scanTakeSample: data =>
http
.post('soil/v1/sample/scan_take_sample?sampleCode=' + data)
.then(res => res),
pageLocationSample: data =>
http.post('soil/v1/sample/page_location_sample', data).then(res => res),
importExperiments: data =>
http
.post(
'soil/v1/experiment/import_experiments?aptitudeIds=' +
data.aptitudeIds +
'&ids=' +
data.ids
)
.then(res => res),
pageSecondary: data =>
http.post('soil/v1/prepare/page_secondary', data).then(res => res),
pageSecondaryHis: data =>
http.post('soil/v1/prepare/page_secondary_his', data).then(res => res)
}
{
"name": "nuxt-demo",
"version": "1.0.0",
"description": "计量检定LIMS",
"description": "土工试验",
"author": "wwd",
"private": true,
"scripts": {
......
......@@ -413,10 +413,7 @@ export default {
}
},
_visibleChange(data) {
if (!data && this.$showBtn('food-aptitude-item-step-edit')) {
this.$emit('on-result-change')
this.$refs.testStepByAptitude._clear()
}
}
}
}
......
......@@ -69,7 +69,7 @@ export default {
{ key: 'belongUnit', title: '归口单位' },
{ key: 'publishUnit', title: '发布单位' }
],
modalTitle: '添加食品标准表',
modalTitle: '收样位置选择',
formObj: {
code: '',
name: ''
......
<template>
<div>
<Modal v-model="showModal" width="1010" class="modal-footer-none">
<Modal v-model="showModal" width="1030" class="modal-footer-none">
<p slot="header">
{{ modalTitle }}
</p>
......@@ -114,7 +114,7 @@ export default {
selectData: {},
getPage: {},
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样编号', key: 'sampleCode', width: 120, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 100 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '试验项目', key: 'experimentNames' },
......
......@@ -158,7 +158,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
{ title: '工程号', key: 'projectNo', width: 120 },
{ title: '平均容重', key: 'projectNo', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
{ title: '批准日期', key: 'approveDate', width: 120, date: true },
......
......@@ -28,8 +28,8 @@
<Form-item label="水深(米)" prop="waterDepth" class="width-48">
<Input v-model="formObj.waterDepth" name="waterDepth" placeholder="请输入深度"/>
</Form-item>
<Form-item label="工程号" prop="projectNo" class="width-48">
<Input v-model="formObj.projectNo" name="projectNo" placeholder="请输入工程号"/>
<Form-item label="平均容重" prop="projectNo" class="width-48">
<Input v-model="formObj.projectNo" name="projectNo" placeholder="请输入平均容重"/>
</Form-item>
<Form-item label="制单日期:" prop="tabulateDate" class="width-48">
<Date-picker v-model="formObj.tabulateDate" @on-change="_tabulateChange" name="tabulateDate" type="date" split-panels style="width:100%;"
......
......@@ -100,7 +100,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
{ title: '工程号', key: 'projectNo', width: 120 },
{ title: '平均容重', key: 'projectNo', width: 120 },
{ title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
......
......@@ -118,7 +118,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
{ title: '工程号', key: 'projectNo', width: 120 },
{ title: '平均容重', key: 'projectNo', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
{ title: '批准日期', key: 'approveDate', width: 120, date: true },
......
......@@ -61,9 +61,13 @@
</div>
<!--组件加载-->
<!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>
<Operation ref="operation"></Operation>
<FileManage ref="FileManage"></FileManage>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
</div>
</template>
<script>
......@@ -71,10 +75,8 @@ import UserInfo from '../../../components/user-info-single/assignPerson'
import { soilReport } from '../../../api'
import Operation from '../../../components/operation/Operation'
export default {
components: {
UserInfo,
Operation
},
// eslint-disable-next-line vue/no-unused-components
components: { UserInfo, Operation },
data() {
return {
formObj: {
......@@ -89,7 +91,6 @@ export default {
// name: '管理样品'
// },
{ type: 'md-cloud', id: '', name: '附件' },
{ type: 'md-trash', id: '', name: '删除' },
{
type: 'ios-clock',
id: '',
......@@ -429,7 +430,11 @@ export default {
},
_operationRecord(id) {
// 操作日志
this.$refs.operation._open(id)
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
},
_resultChange(msg) {
if (this.$store.state.FoodContract.success) {
......@@ -440,7 +445,11 @@ export default {
},
_upload(id) {
// 上传文件
this.$refs.FileManage._open(id, 'entrustId')
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
}
}
}
......
......@@ -2,14 +2,22 @@
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<!-- <el-tabs v-model="activeName" @tab-click="_changeTabs">-->
<!-- <el-tab-pane label="按委托编制" name="check">-->
<!-- <ReportMakeByEntrust ref="checkTabs"></ReportMakeByEntrust>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="历史报告" name="checkHis">-->
<!-- <ReportMakeHis ref="checkHisTabs"></ReportMakeHis>-->
<!-- </el-tab-pane>-->
<!-- </el-tabs>-->
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="按委托编制" name="check">
<ReportMakeByEntrust ref="checkTabs"></ReportMakeByEntrust>
</el-tab-pane>
<el-tab-pane label="历史报告" name="checkHis">
<ReportMakeHis ref="checkHisTabs"></ReportMakeHis>
</el-tab-pane>
<el-tab-pane label="数据审核" name="check"></el-tab-pane>
<el-tab-pane label="历史任务" name="checkHis"></el-tab-pane>
</el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div>
</div>
</div>
......@@ -20,28 +28,37 @@ import ReportMakeByEntrust from './tabs/ReportMakeByEntrust'
import ReportMakeHis from './ReportMakeHis'
export default {
components: {
ReportMakeByEntrust,
ReportMakeHis
},
// eslint-disable-next-line vue/no-unused-components
components: { ReportMakeByEntrust, ReportMakeHis },
data() {
return {
activeName: 'check'
activeName: 'check',
currentComponent: ''
}
},
mounted() {
this.activeName = 'check'
this.$refs.checkTabs._page()
this._page()
},
methods: {
_changeTabs(tab, event) {
if (tab.name === 'check') {
this.$refs.checkTabs._open()
this._page()
} else if (tab.name === 'applyRecord') {
// this.$refs.applyRecordTabs._page()
} else {
this.$refs.checkHisTabs._page()
this.currentComponent = 'ReportMakeHis'
this.$nextTick(() => {
this.$refs.refModal._page()
})
}
},
_page() {
this.currentComponent = 'ReportMakeByEntrust'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.entrustTabs._page()
}
}
}
......
......@@ -76,11 +76,15 @@
</Row>
</div>
</div>
<SampleByMakeModal ref="sampleByMakeModal"></SampleByMakeModal>
<Operation ref="operation"></Operation>
<FileManage ref="FileManage"></FileManage>
<OriginalRecordView ref="originalRecordView" @on-result-change="_page"></OriginalRecordView>
<UploadByReport ref="uploadReport" @on-result-change="_page"></UploadByReport>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
<!-- <SampleByMakeModal ref="sampleByMakeModal"></SampleByMakeModal>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <OriginalRecordView ref="originalRecordView" @on-result-change="_page"></OriginalRecordView>-->
<!-- <UploadByReport ref="uploadReport" @on-result-change="_page"></UploadByReport>-->
</div>
</template>
<script>
......@@ -91,9 +95,13 @@ import OriginalRecordView from '../OriginalRecordView'
import UploadByReport from '../UploadByReport'
export default {
components: {
// eslint-disable-next-line vue/no-unused-components
SampleByMakeModal,
// eslint-disable-next-line vue/no-unused-components
Operation,
// eslint-disable-next-line vue/no-unused-components
OriginalRecordView,
// eslint-disable-next-line vue/no-unused-components
UploadByReport
},
data() {
......@@ -124,12 +132,14 @@ export default {
{
type: 'ios-flask-outline',
id: '',
name: '管理样品和报告'
name: '管理样品和报告',
currentComponent: SampleByMakeModal
},
{
type: 'ios-beaker',
id: '',
name: '查看原始记录'
name: '查看原始记录',
currentComponent: OriginalRecordView
},
{
type: 'ios-cloud-upload',
......@@ -265,15 +275,21 @@ export default {
})
}
},
_componentResult(data, msg) {
switch (this.currentComponent) {
default:
this._page()
}
},
_iconClick(res, data, componentName) {
this.currentComponent = componentName
this.$nextTick(function() {
switch (res) {
case '管理样品和报告':
this.$refs.sampleByMakeModal._open(data.id)
this.$refs.refModal._open(data.id)
break
case '查看原始记录':
this.$refs.originalRecordView._open(data.id)
this.$refs.refModal._open(data.id)
break
case '上传报告':
this._uploadReport(data.id)
......@@ -297,7 +313,11 @@ export default {
})
},
_uploadReport(id) {
this.$refs.uploadReport._open(id)
this.currentComponent = 'UploadByReport'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.uploadReport._open(id)
},
_viewReport: async function(id) {
const result = await soilSample.getReport(id)
......@@ -314,8 +334,12 @@ export default {
})
},
_operationRecord(id) {
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// 操作日志
this.$refs.operation._open(id)
// this.$refs.operation._open(id)
},
_tableResultChange(msg, data) {
switch (msg) {
......@@ -370,8 +394,12 @@ export default {
})
},
_upload(id) {
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// 上传文件
this.$refs.FileManage._open(id, 'entrustId')
// this.$refs.FileManage._open(id, 'entrustId')
}
}
}
......
......@@ -28,7 +28,7 @@
<!-- 表格 -->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" @on-result-change="_tableResultChange">
:get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange" select-data>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
......@@ -51,7 +51,7 @@
</el-select>
<span v-if="!showOption">{{ scope.row[item.key]===0? '否':'是' }}</span>
</div>
<span v-else-if="item.status">{{scope.row[item.key]}}</span>
<span v-else-if="item.status">{{scope.row[item.key].display}}</span>
<div v-else-if="item.judged">
{{ scope.row[item.key]===0? '否':'是' }}
</div>
......@@ -105,28 +105,36 @@
<modal-footer ref="footerModal" :footer="footerList" @on-result-change="_footerResult" />
</div>
</Modal>
<ImportItem ref="itemImport" @on-result-change="_page"></ImportItem>
</div>
</template>
<script>
import http from '../../api/http'
import { soilEntrust } from '../../api'
import ImportItem from './sample-preparation/ImportItem'
export default {
components: {},
components: { ImportItem },
data() {
return {
formId: 'SoilSampleItemManage',
currentComponent: '',
btn: [],
iconMsg: [{ type: 'pt-a-end', id: '', name: '删除' }],
btn: [
{
type: 'success',
id: '',
name: '导入检测项目'
}
],
iconMsg: [{ type: 'md-trash', id: '', name: '删除' }],
sampleId: '', // 样品id
showModal: false,
modalTitle: '管理检测项目',
selectIds: [],
selectData: [],
itemId: '',
index: '',
showOption: true,
searchOpen: true,
selectData: {},
getPage: {},
currentRow: '',
currentIndex: '',
......@@ -142,7 +150,7 @@ export default {
{ title: '小类', key: 'smallType' },
{ title: '检测依据', key: 'testBasis', width: 180 },
{ title: '试验方法', key: 'testMethod', width: 180 },
{ title: '状态', key: 'status', width: 180 }
{ title: '状态', key: 'status', width: 180, status: true }
],
subOptions: [
{
......@@ -381,7 +389,6 @@ export default {
this._copy(data)
break
case '删除':
console.log(index)
this._deleteById(data.id)
break
case '导出样品委托协议':
......@@ -425,9 +432,9 @@ export default {
this.selectIds = selectIds
this.selectData = data
break
// case 'iconClick':
// this._iconClick(data.name, data.rowData, data.componentName)
// break
case 'iconClick':
this._iconClick(data.name, data.rowData, data.componentName)
break
case 'page':
this._page()
break
......@@ -480,7 +487,7 @@ export default {
},
_deleteOk: async function(ids) {
const result = await soilEntrust.deleteById(ids)
const result = await soilEntrust.experimentDeleteById(ids)
if (result) {
this._resultChange('删除成功! ')
}
......@@ -588,15 +595,7 @@ export default {
},
// 导入检测项目
_importItem() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选中一条样品数据!')
} else {
this.$refs.refModal._open(
this.selectIds,
this.selectData[0],
this.selectData
)
}
this.$refs.itemImport._open(this.sampleId)
},
// 导入检测项目包
_importItemPackage() {
......
......@@ -123,6 +123,7 @@ export default {
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 100 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '试验项目', key: 'experimentNames', width: 100 },
{ title: '土质描述', key: 'sampleDescribe', width: 160 },
{ title: '土质描述详情', key: 'describeDetail', width: 160 },
{ title: '样品包装类型', key: 'samplePack', width: 120 }
......
......@@ -18,7 +18,7 @@
</Form-item>
<Form-item label="备样人:">
<el-select :value="formObj.backupUser" @change="selUser" style="width:100%" size="small">
<el-option v-for="item in backupUserList" :value="item.id" :label="item.realname" :key="item.realname">{{ item.realname }}
<el-option v-for="item in backupUserList" :value="item.id" :label="item.realname" :key="item.id">{{ item.realname }}
</el-option>
</el-select>
</Form-item>
......
......@@ -135,30 +135,10 @@ export default {
type: 'primary',
id: '',
name: '批量填写存放信息'
},
{
type: 'primary',
id: 'food-sample-preparation-his-all',
name: '制备'
},
{
type: 'primary',
id: 'food-sample-preparation-his-no-pre',
name: '无需制备'
},
{
type: 'primary',
id: 'food-sample-preparation-his-scan-pre',
name: '扫码制备'
},
}
// { type: '', id: '', name: '填写存放信息' },
// { type: '', id: '', name: '申请处理' },
// { type: '', id: '', name: '导出' },
{
type: '',
id: 'food-sample-prepare-record-export',
name: '导出备样记录'
}
],
iconMsg: [
{ type: 'md-create', id: '', name: '编辑' }, // food-sample-prepare-edit
......
......@@ -67,11 +67,6 @@ export default {
},
btn: [
// { type: '', id: '', name: '导出' },
{
type: '',
id: 'food-sample-handle-already-export-sample-store',
name: '导出样品贮存表'
}
],
iconMsg: [
{
......
<template>
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="副样管理" name="wait">
<SampleBackupsManage ref="waitTabs"></SampleBackupsManage>
</el-tab-pane>
<el-tab-pane label="副样查询" name="query">
<SampleBackupsQuery ref="queryTabs"></SampleBackupsQuery>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
<script>
import SampleBackupsManage from './tab/SampleduplicateManage'
import SampleBackupsQuery from './tab/SampleduplicateQuery'
export default {
components: {
SampleBackupsManage,
SampleBackupsQuery
},
data() {
return {
activeName: 'wait'
}
},
mounted() {
this.activeName = 'wait'
this.$refs.waitTabs._page()
},
methods: {
_changeTabs(tab, event) {
if (tab.name === 'wait') {
this.$refs.waitTabs._page()
} else if (tab.name === 'applyRecord') {
// this.$refs.applyRecordTabs._page()
} else {
this.$refs.queryTabs._page()
}
}
}
}
</script>
<template>
<div>
<!--内容-->
<div class="layout-content-padding">
<div class="layout-content-main">
<Row>
<!--查询-->
<Col span="24">
<Form id="search-form-query" :label-width="80" v-show="searchOpen" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="试样编号:">
<Input @on-enter="_formSearch" v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入委托名称" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" @on-result-change="_btnClick" :showSearchBtn="true"
class="contHide"></btn-list>
</Col>
<!-- 表格 -->
<Col span="24">
<PTVXETableHeight ref="pageTable" :table-height="tableHeight" :loading="true"
:get-page="getPage" @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<span v-else-if="item.status">{{scope.row[item.key].display}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
<vxe-table-column
slot="col"
:width="80"
title="操作"
align="center"
fixed="right">
<template slot-scope="scope">
<VXEIconList :msg="editIndex===scope.rowIndex?iconMsgSave:iconMsg" @on-result-change="_iconClick" :rowData="scope.row" :rowIndex="scope.rowIndex"></VXEIconList>
</template>
</vxe-table-column>
</PTVXETableHeight>
</Col>
</Row>
</div>
</div>
<Operation ref="recordModal"></Operation>
</div>
</template>
<script>
import { soilSample } from '../../../../api'
import Operation from '../../../../components/operation/Operation'
export default {
components: { Operation },
data() {
return {
currentComponent: '',
selectIds: [],
formObj: {
client: '',
entrustCode: '',
sampleCode: ''
},
iconMsg: [
{
type: 'ios-clock',
id: '',
name: '操作日志'
}
],
btn: [
// { type: '', id: '', name: '导出' },
],
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 150 },
{ title: '状态', key: 'status', status: true, width: 100 },
{ title: '包装类型', key: 'samplePack', width: 100 },
{ title: '保存容器', key: 'keepContainer', width: 100 },
{ title: '制备数量', key: 'quantity', width: 100 },
{ title: '单位', key: 'unit', width: 70 },
{ title: '制备人', key: 'preparer', width: 130 },
{ title: '制备时间', key: 'prepareDate', date: true, width: 130 }
],
searchOpen: false,
getPage: {},
selectData: [],
endDateBegin: '',
endDateEnd: ''
}
},
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('', 255)
} else {
return this.$tableHeight('', 220)
}
}
},
methods: {
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await soilSample.pageSecondaryHis(
this.$serializeForm(this.formObj)
)
if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result
}
},
_tableResultChange(msg, data) {
switch (msg) {
case 'page':
this.selectIds = []
this.getPage = this.$store.state.FoodSampleBackup.page
break
case 'iconClick':
this._iconClick(data.name, data.rowData, data.componentName)
break
case 'selectData':
this.selectData = data
this.selectIds = []
for (let i = 0; i < data.length; i++) {
this.selectIds.push(data[i].id)
}
break
case 'changeSize':
this._page()
break
// default :
// this._page();
}
},
_iconClick(res, data, componentName, index) {
this.currentIndex = index
switch (res) {
case '操作日志':
this._record(data.id)
break
default:
this._page()
}
},
_record(id) {
this.$refs.recordModal._openSurplus(id)
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
_dateChange(data) {
this.endDateBegin = data[0]
this.endDateEnd = data[1]
},
_btnClick(msg) {
switch (msg) {
case '导出':
if (this.getPage.records.length === 0) {
this.$Message.warning('暂无数据,不可导出')
} else {
this._export()
}
break
case '导出样品贮存表':
this._exportSampleStore()
break
case 'search':
this.searchOpen = !this.searchOpen
break
}
},
_exportSampleStore() {
const obj = {
param: 'ids',
ids: this.selectIds,
url: '',
queryObj: this.$serialize('search-form-query')
}
this.$store
.dispatch(
'ReportExport/getById',
'food-sample-handle-already-export-sample-store'
)
.then(() => {
const result = this.$store.state.ReportExport.model
obj.url = result
this.$exportByQuery(obj)
})
},
// 样品详情
_sampleDetailModal(data) {
if (data.type === 1) {
// 政府
this.currentComponent = 'FoodSampleGovernDetail'
this.$nextTick(() => {
this.$store
.dispatch('FoodSample/getByGovernId', data.sampleId)
.then(() => {
this.$refs.refModal._open(
this.$store.state.FoodSample.governModel
)
})
})
} else {
this.currentComponent = 'FoodSampleCompanyDetail'
this.$nextTick(() => {
this.$store
.dispatch('FoodSample/getByCompanyId', data.sampleId)
.then(() => {
this.$refs.refModal._open(
this.$store.state.FoodSample.companyModel
)
})
})
}
},
/** *********************************导出-begin*********************************************/
_export() {
let result = []
if (this.selectData.length === 0) {
// 导出全部数据
this.$store
.dispatch('FoodSampleBackup/perSampleQuery', this._searchParams())
.then(() => {
result = this.$store.state.FoodSampleBackup.page.records
this.$Modal.confirm({
title: '提示',
content:
this.selectData.length === 0
? '确定导出全部数据(最多导出5000条)?'
: '确定导出这' + result.length + ' 条数据?',
onOk: () => {
this.$exportExcel(
'perSampleQuery',
'样品处理',
this.pageColumns,
result
)
}
})
})
} else {
// 只导出选中的数据
result = this.selectData
this.$Modal.confirm({
title: '提示',
content:
this.selectData.length === 0
? '确定导出全部数据(最多导出5000条)?'
: '确定导出这' + result.length + ' 条数据?',
onOk: () => {
this.$exportExcel(
'perSampleQuery',
'样品处理',
this.pageColumns,
result
)
}
})
}
},
// 参数
_searchParams() {
const data = this.$serialize('search-form-query')
return this.$extend(data, { page: 1, rows: 5000 })
}
/** *********************************导出样品台账-end*********************************************/
}
}
</script>
<template>
<div>
<Modal v-model="showEditModal" :mask-closable="false" :width="500" class="zIndex-1200">
<p slot="header">{{modalTitle}}</p>
<div>
<Form id="edit-form" ref="formObj" :model="formObj" :rules="ruleValidate" :label-width="100" inline>
<Form-item label="位置编号" prop="code" style="width: 100%">
<Input v-model="formObj.code" name="code" placeholder="请输入位置编号"/>
</Form-item>
<Form-item label="收样存储位置" prop="name" style="width: 100%">
<Input v-model="formObj.name" name="name" placeholder="请输入收样存储位置"/>
</Form-item>
<Form-item label="位置管理人" prop="manager" style="width: 100%">
<Input v-model="formObj.manager" @click.native="_selectStaff" name="manager" readonly/>
</Form-item>
<Form-item prop="managerId" style="width: 100%;display: none">
<Input v-model="formObj.managerId" @click.native="_selectStaff" name="managerId" readonly/>
</Form-item>
<Form-item label="备注说明" prop="remark" style="width: 100%">
<Input v-model="formObj.remark" name="remark" placeholder="请输入备注说明"/>
</Form-item>
</Form>
</div>
<div slot="footer">
<ModalFooter ref="footerModal" @on-result-change="_footerResult" :footer="footerList"></ModalFooter>
</div>
</Modal>
<UserInfo ref="userModal" @on-result-change="_userData" is-change></UserInfo>
</div>
</template>
<script>
/**
* 添加编辑
*/
import ModalFooter from '../../../components/base/modalFooter'
import { soilSample } from '../../../api'
import Global from '../../../api/config'
import UserInfo from '../../../components/user-info-single/assignPerson'
export default {
components: {
ModalFooter,
UserInfo
},
data() {
return {
formId: '',
lengthLimitList: [
{ key: 'stdNum', title: '标准号' },
{ key: 'enName', title: '英文名称' },
{ key: 'belongUnit', title: '归口单位' },
{ key: 'publishUnit', title: '发布单位' }
],
modalTitle: '收样位置选择',
formObj: {
name: '',
code: '',
remark: '',
manager: '',
managerId: ''
},
options: [
{
name: '国家标准'
},
{
name: '地方标准'
},
{
name: '行业标准'
},
{
name: '企业标准'
}
],
ruleValidate: {
code: [
{ required: true, message: '检测依据不能为空', trigger: 'blur' }
],
name: [
{ required: true, message: '检测依据名称不能为空', trigger: 'blur' }
]
},
showEditModal: false,
classifyList: [
{ value: 0, name: '判定依据' },
{ value: 1, name: '检测依据' },
{ value: 2, name: '其他' }
],
typeList: [
{ value: 0, name: '国家标准' },
{ value: 1, name: '地方标准' },
{ value: 2, name: '行业标准' },
{ value: 3, name: '企业标准' }
],
statusList: [
{ value: 0, name: '现行' },
{ value: 1, name: '即将实施' },
{ value: 2, name: '部分被代替' },
{ value: 3, name: '被代替' },
{ value: 4, name: '作废' }
],
footerList: [
{ id: '', name: '取消', type: '' },
{ id: '', name: '保存', type: 'primary' }
]
}
},
methods: {
_getUser() {
const user = Global.getUserInfo()
this.formObj.manager = user.realname
this.formObj.managerId = user.id
console.log(user)
},
_selectStaff() {
this.$refs.userModal._open()
},
_userData(data, msg, contractTempData) {
console.log(data, msg)
},
/** *modal-footer */
_footerResult(name) {
switch (name) {
case '取消':
this._cancel()
break
case '保存':
this._ok()
break
}
},
_hideLoading() {
this.$refs.footerModal._hideLoading()
},
_resultChange(msg) {
this.showEditModal = false
this.$Message.success(msg)
this.$emit('on-result-change')
this._hideLoading()
},
_ok() {
this.$refs.formObj.validate(valid => {
if (valid) {
if (this.formObj.publishDate && this.formObj.effectDate) {
if (this.formObj.publishDate > this.formObj.effectDate) {
this.$Message.error('发布日期应早于实施日期')
this._hideLoading()
return
}
}
const data = this.$serialize('edit-form')
if (this.$string(this.formObj.id).isEmpty()) {
// 添加
this._save(data)
} else {
// 编辑
this._edit({ id: this.formObj.id, obj: data })
}
} else {
this.$Message.error('表单验证失败!')
this._hideLoading()
}
})
},
_save: async function(data) {
const result = await soilSample.locationSave(data)
if (result) {
this._resultChange('添加成功!')
}
},
_edit: async function(data) {
const result = await soilSample.locationEdit(data)
if (result) {
this._resultChange('编辑成功!')
}
},
_cancel() {
this._hideLoading()
this.showEditModal = false
},
_open(formObj) {
this.formId = this.$randomCode()
this._hideLoading()
this.$refs.formObj.resetFields()
if (this.$string(formObj).isEmpty()) {
this.modalTitle = '添加'
this.formObj.id = ''
this._getUser()
} else {
this.formObj = formObj
this.formObj.id = formObj.id
this.formObj.effectDate = this.formObj.effectDate
? new Date(formObj.effectDate)
: ''
this.formObj.publishDate = this.formObj.publishDate
? new Date(formObj.publishDate)
: ''
this.modalTitle = '编辑'
}
this.showEditModal = true
},
_registerAdd() {
this.formId = this.$randomCode()
this._hideLoading()
this.$refs.formObj.resetFields()
this.modalTitle = '添加'
this.formObj.id = ''
this.formObj.type = 3
this.showEditModal = true
}
}
}
</script>
......@@ -9,7 +9,7 @@
<Form id="search-form" :label-width="90" v-show="searchOpen" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="位置编号:">
<Input @on-enter="_formSearch" v-model="formObj.code" name="code" placeholder="请输入检测依据" clearable/>
<Input @on-enter="_formSearch" v-model="formObj.code" name="code" placeholder="请输入位置编号" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
......@@ -60,6 +60,7 @@
</div>
</div>
<!--组件加载-->
<ViewSample ref="viewSample"></ViewSample>
<StandardsManageEdit ref="editModal" @on-result-change="_page"></StandardsManageEdit>
<DownloadTemplateImport ref="importModal" @on-result-change="_page"></DownloadTemplateImport>
<!-- <component ref="refModal" :is="currentComponent" @on-result-change="_page"></component>-->
......@@ -72,10 +73,12 @@ import { soilSample } from '../../../api'
import global from '../../../api/config'
import DownloadTemplateImport from '../../../components/import/DownloadTemplateImport' // 导入
import StandardsManageEdit from './AddressManageEdit' // 添加、编辑
import ViewSample from './ViewSample'
export default {
components: {
StandardsManageEdit,
DownloadTemplateImport
DownloadTemplateImport,
ViewSample
},
data() {
return {
......@@ -116,6 +119,11 @@ export default {
name: '编辑',
componentName: 'StandardsManageEdit'
},
{
type: 'md-apps',
id: '',
name: '查看试样'
},
{ type: 'md-remove-circle', id: '', name: '删除' }
],
searchOpen: false,
......@@ -190,6 +198,9 @@ export default {
case '编辑':
this._editModal(true, data.id)
break
case '查看试样':
this._viewSample(data.name)
break
case '上传':
this._upload(data.id)
break
......@@ -214,7 +225,10 @@ export default {
}
this.$refs.uploadModal._open(obj)
},
_viewSample(data) {
console.log(data)
this.$refs.viewSample._openHis(data)
},
_editModal: async function(edit, id) {
if (edit) {
// 编辑
......
......@@ -51,7 +51,7 @@ export default {
{ key: 'belongUnit', title: '归口单位' },
{ key: 'publishUnit', title: '发布单位' }
],
modalTitle: '添加食品标准表',
modalTitle: '收样位置选择',
formObj: {
name: '',
code: '',
......
......@@ -103,30 +103,10 @@ export default {
type: '',
id: '',
name: '驳回'
},
{
type: 'primary',
id: 'food-sample-preparation-his-all',
name: '制备'
},
{
type: 'primary',
id: 'food-sample-preparation-his-no-pre',
name: '无需制备'
},
{
type: 'primary',
id: 'food-sample-preparation-his-scan-pre',
name: '扫码制备'
},
}
// { type: '', id: '', name: '填写存放信息' },
// { type: '', id: '', name: '申请处理' },
// { type: '', id: '', name: '导出' },
{
type: '',
id: 'food-sample-prepare-record-export',
name: '导出备样记录'
}
],
iconMsg: [
{ type: 'md-create', id: '', name: '编辑' } // food-sample-prepare-edit
......
......@@ -94,39 +94,19 @@ export default {
selectSampleIds: [],
getPage: {},
btn: [
{
type: 'primary',
id: '',
name: '通过'
},
{
type: '',
id: '',
name: '驳回'
},
{
type: 'primary',
id: 'food-sample-preparation-his-all',
name: '制备'
},
{
type: 'primary',
id: 'food-sample-preparation-his-no-pre',
name: '无需制备'
},
{
type: 'primary',
id: 'food-sample-preparation-his-scan-pre',
name: '扫码制备'
},
// {
// type: 'primary',
// id: '',
// name: '通过'
// },
// {
// type: '',
// id: '',
// name: '驳回'
// }
// { type: '', id: '', name: '填写存放信息' },
// { type: '', id: '', name: '申请处理' },
// { type: '', id: '', name: '导出' },
{
type: '',
id: 'food-sample-prepare-record-export',
name: '导出备样记录'
}
],
iconMsg: [
{ type: 'md-create', id: '', name: '编辑' } // food-sample-prepare-edit
......
<!--资质项目列表-->
<template>
<div>
<div>
<Form :label-width="65" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="检测项目:" class="search-item">
<Input v-model="formObj.name" @on-enter="_search" placeholder="请输入检测项目" clearable />
</Form-item>
<Form-item>
<Button @click="_search" type="primary">搜索</Button>
</Form-item>
</Form>
</div>
<PTVXETable ref="pageTable" :tableHeight="tableHeight"
@on-result-change="_tableResultChange" :getPage="getPage" select-data>
<vxe-table-column
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined"
v-for="item in pageColumns"
:key="item.key" sortable>
<template slot-scope="scope">
<div v-if="item.judge">{{scope.row[item.key] === 0 ?'否':'是'}}</div>
<div v-else-if="item.key==='testBasis'">
{{(scope.row.testBasis?scope.row.testBasis:' ')+(scope.row.testBasisName?scope.row.testBasisName:'')}}
</div>
<div v-else>{{scope.row[item.key]}}</div>
</template>
</vxe-table-column>
</PTVXETable>
</div>
</template>
<script>
import { soilAptitude } from '../../../api'
export default {
components: {},
data() {
return {
getPage: {},
formObj: {
name: undefined,
testBasis: undefined,
aptitude: undefined
},
tableHeight: document.documentElement.clientHeight - 285,
pageColumns: [
{ title: '检测项目', key: 'name', width: 100 },
{ title: '检测依据', key: 'testBasis', width: 260 },
// {title: '检测依据名称', key: 'testBasisName', width: 330},
{ title: '检测方法', key: 'testMethod', width: 130 },
{ title: '检测科室', key: 'groupName', width: 140 },
{ title: '资质', key: 'aptitude', width: 130 },
{ title: '检出限类别', key: 'detectionType', width: 130 },
{ title: '检出限', key: 'detectionLimit', width: 130 },
{ title: '单位', key: 'unit', width: 130 }
],
formId: '',
itemList: [],
testBasisList: []
}
},
methods: {
_open() {
this.formObj = this.$resetFields(this.formObj)
this._page()
},
// 获取检测项目
_getItemList(data) {
const obj = {}
if (data) {
obj.name = data
}
this.$store.dispatch('FoodAptitudeItem/getTestItem', obj).then(() => {
this.itemList = this.$store.state.FoodAptitudeItem.list
})
},
// 检测项目结果
_testItemChange(msg, data) {
switch (msg) {
case 'select':
this.formObj.name = data
this._getItemList()
break
case 'query':
this.formObj.name = data
this._getItemList(data)
break
case 'focus':
this._getItemList()
break
case 'enter':
this._search()
break
}
},
_getTestBasisList(data) {
const obj = { classify: 1, page: 1, rows: 20 }
if (data) {
obj.name = data.stdNum
}
this.$store.dispatch('StandardInfo/pageListByName', obj).then(() => {
this.testBasisList = this.$store.state.StandardInfo.page.records
})
},
_testBasisChange(msg, data) {
switch (msg) {
case 'select':
this.formObj.testBasis = data.stdNum
this._getTestBasisList()
break
case 'query':
this.formObj.testBasis = data.stdNum
this._getTestBasisList(data)
break
case 'focus':
this._getTestBasisList()
break
case 'enter':
this._search()
break
}
},
_page: async function() {
const result = await soilAptitude.page(this.$serializeForm(this.formObj))
if (result) {
console.log(result)
this.getPage = result
this.$refs.pageTable._hideLoading()
}
},
_clearSelection() {
this.$refs.pageTable._clearSelection()
},
_search() {
this.$refs.pageTable._pageChange(1)
},
_reset() {
this.formObj = this.$resetFields(this.formObj)
},
_tableResultChange(msg, data, checked) {
switch (msg) {
case 'page':
this._page()
break
case 'selectAll':
this.$emit('on-result-change', 'selectAll', data)
break
case 'selectData':
this.$emit('on-result-change', 'selectData', data)
break
case 'dbSelect':
this.$emit('on-result-change', 'dbClick', data)
break
case 'changeSize':
this._page()
break
}
}
}
}
</script>
......@@ -35,7 +35,7 @@ export default {
{ key: 'belongUnit', title: '归口单位' },
{ key: 'publishUnit', title: '发布单位' }
],
modalTitle: '添加食品标准表',
modalTitle: '收样位置选择',
formObj: {
detail: ''
},
......
<!--Collapse关联框 单个导入项目-->
<template>
<div>
<Modal v-model="showModal" :mask-closable="false" width="100" class="zIndex-1200 full-screen modal-header-none">
<div>
<Collapse :right-title="'已选的检测项目 (共'+getPage.records.length+'条)'" @on-result-change="_optionResult"
:left-width="18"
left-title="资质项目">
<template #left>
<AptitudeItem ref="leftModal" @on-result-change="_leftResult"></AptitudeItem>
</template>
<template #right>
<PTVXETable ref="pageTable" :tableHeight="tableHeight" :getPage="getPage"
@on-result-change="_rightResult" select-data hide-page>
<vxe-table-column
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
v-for="item in pageColumns" :key="item.key">
<template slot-scope="scope">
<div v-if="item.key==='scened'">{{scope.row[item.key]?'':scope.row[item.key]===0?'否':'是'}}</div>
<div v-else-if="item.key==='testBasis'">
{{(scope.row.testBasis?scope.row.testBasis:' ')+
(scope.row.testBasisName?scope.row.testBasisName:'')}}
</div>
<div v-else>{{scope.row[item.key]}}</div>
</template>
</vxe-table-column>
</PTVXETable>
</template>
</Collapse>
</div>
<div slot="footer">
<modal-footer ref="footerModal" @on-result-change="_footerResult" :footer="footerList"></modal-footer>
</div>
</Modal>
</div>
</template>
<script>
import Collapse from '../../../components/base/Collapse'
import { soilSample } from '../../../api'
import AptitudeItem from './AptitudeItem'
/* 普通样品导入检测项目(一种是直接走接口保存,另一种是返回已选中的数据),专用于除了【质控】之外的导入检测项目 */
export default {
components: {
Collapse,
// AddItem,
AptitudeItem
},
props: {
isRepeat: null // 只有模拟样品才能导入重复的检测项目
},
data() {
return {
pageColumns: [
{ title: '检测项目', key: 'name', width: 100 },
{ title: '检测依据', key: 'testBasis', width: 260 },
// {title: '检测依据名称', key: 'testBasisName', width: 180,},
{ title: '检测方法', key: 'testMethod', width: 130 },
{ title: '检测科室', key: 'groupName', width: 140 }
],
footerList: [
{ name: '取消', type: '' },
{ name: '确定', type: 'primary' }
],
selectData: [],
showModal: false,
addIds: [],
sampleId: '',
delData: [],
getPage: {
records: []
},
isEditModal: false,
isReceive: false, // 用于区别是样品接收中导入检测项目还是普通样品中导入检测项目
tableHeight: document.documentElement.clientHeight - 240
}
},
methods: {
_open(sampleId) {
this.showModal = true
this.isReceive = false
this.sampleId = sampleId
this.selectData = []
this.addIds = []
this.delData = []
this.getPage.records = []
this.$refs.leftModal._open()
},
_footerResult(name) {
switch (name) {
case '取消':
this._cancel()
break
case '确定':
this._ok()
break
}
},
_ok: async function() {
const result = await soilSample.importExperiments({
aptitudeIds: this.addIds,
ids: this.sampleId
})
if (result) {
this.showModal = false
this.$Message.success('导入成功')
this.$emit('on-result-change')
}
},
_cancel() {
this.showModal = false
this.$refs.footerModal._hideLoading()
},
// 样品接收中用的导入检测项目(给一个样品导入检测项目)
_openReceive() {
this.isReceive = true
this.selectData = []
this.addIds = []
this.delData = []
// this.getPage = [];
this.getPage.records = []
this.$refs.leftModal._open()
},
_optionResult(name) {
switch (name) {
case '添加':
this._add()
break
case '删除':
this._deleteSelected()
break
}
},
// 未关联方法返回的数据
_leftResult(msg, data, checked) {
switch (msg) {
case 'selectAll':
this.selectData = data
break
case 'selectData':
this.selectData = data
// if (data.checked) {
// this.selectData.push(data)
// const set = new Set([...this.selectData])
// this.selectData = [...set]
// console.log('选择的数据', this.selectData)
// } else {
// const index = this.selectData.indexOf(data)
// this.selectData.splice(index, 1)
// }
break
case 'dbClick':
this.selectData = [data]
this._add()
break
case 'search':
this.selectData = []
break
}
},
// 已关联方法返回的数据
_rightResult(msg, data) {
switch (msg) {
case 'selectData':
this.delData = data
break
}
},
// 添加关联方法
_add() {
if (this.selectData.length === 0) {
this.$Message.warning('请至少选择一条数据!')
} else {
for (let i = 0; i < this.selectData.length; i++) {
if (this.isRepeat) {
// 表示模拟样品,可导入重复的项目
this.getPage.records.push(this.selectData[i])
this.addIds.push(this.selectData[i].id)
} else {
// 普通样品,不能导入重复的项目
// eslint-disable-next-line no-lonely-if
if (
!this.getPage.records.find(
item => item.name === this.selectData[i].name
)
) {
this.getPage.records.push(this.selectData[i])
this.addIds.push(this.selectData[i].id)
}
}
}
// 勾选之后两侧都需要手动清空,否则会出现另一侧也勾选的问题
this.$refs.leftModal._clearSelection()
this.$refs.pageTable._clearSelection()
this.selectData = []
}
},
_deleteSelected() {
if (this.delData.length === 0) {
this.$Message.warning('请选择一条或多条数据!')
} else {
this._deleteByIds(
this.delData,
'确定删除 ' + this.delData.length + ' 条记录?'
)
}
},
_deleteByIds(row, content) {
for (let i = 0; i < row.length; i++) {
const dataIndex = this.getPage.records.indexOf(row[i])
this.getPage.records.splice(dataIndex, 1)
const idIndex = this.addIds.indexOf(row[i].id)
this.addIds.splice(idIndex, 1)
}
// 勾选之后两侧都需要手动清空,否则会出现另一侧也勾选的问题
this.$refs.leftModal._clearSelection()
this.$refs.pageTable._clearSelection()
// 手动清空删除的数据
this.delData = []
}
}
}
</script>
......@@ -344,46 +344,6 @@ export default {
this.showModal = false
this._hideLoading()
},
_changeMic() {
const preList = []
for (let i = 0; i < this.getPage.records.length; i++) {
const obj = {
groupName: this.getPage.records[i].groupName,
groupId: this.getPage.records[i].groupId,
sampleId: this.getPage.records[i].sampleId,
itemName: this.getPage.records[i].itemName,
resultQuantity: this.getPage.records[i].resultQuantity,
preparationWay: this.getPage.records[i].preparationWay,
unit: this.getPage.records[i].unit,
remark: this.getPage.records[i].remark,
resultState: this.getPage.records[i].resultState,
saveWay: this.getPage.records[i].saveWay,
pack: this.getPage.records[i].pack,
storePlace: this.getPage.records[i].storePlace,
preparationDate: this.getPage.records[i].preparationDate,
sampleQuantity: this.getPage.records[i].sampleQuantity,
preparationPerson: this.getPage.records[i].preparationPerson,
preparationPersonId: this.getPage.records[i].preparationPersonId
}
if (this.getPage.records[i].id) {
obj.id = this.getPage.records[i].id
}
preList.push(obj)
}
this.$store
.dispatch('FoodSamplePreparation/saveBatch', {
foodSamplePreparationList: preList,
flag: 1
})
.then(() => {
if (this.$store.state.FoodSamplePreparation.success) {
this.showModal = false
this.$Message.success('操作成功')
this.$emit('on-result-change')
}
this.$refs.footerModal._hideLoading()
})
},
_ok() {
console.log(this.getPage.records)
const prepareList = []
......@@ -396,22 +356,6 @@ export default {
return false
}
this.save({ prepareList: prepareList })
// const preList = []
// for (let i = 0; i < this.getPage.records.length; i++) {
// const reg = /^[0-9]+([.]{1}[0-9]+){0,1}$/
// if (!reg.test(this.getPage.records[i].resultQuantity)) {
// this.$Message.warning('制备数量请输入数字')
// this._hideLoading()
// return
// }
// const obj = {
// groupName: this.getPage.records[i].groupName
// }
// if (this.getPage.records[i].id) {
// obj.id = this.getPage.records[i].id
// }
// preList.push(obj)
// }
},
save: async function(data) {
const result = await soilEntrust.savePrepare(data)
......@@ -496,7 +440,7 @@ export default {
'58.87mm',
'24.74mm',
'QRCode',
data[i].sampleCode + '-' + data[i].groupName
data[i].sampleCode + '-' + data[i].groupId
)
LODOP.ADD_PRINT_TEXT(
130,
......
......@@ -40,7 +40,7 @@
</Form-item>
<Form-item label="制备人:">
<el-select :value="formObj.preparer" @change="selUser" style="width:100%" size="small">
<el-option v-for="item in backupUserList" :value="item.id" :label="item.realname" :key="item.realname">{{ item.realname }}
<el-option v-for="(item,index) in backupUserList" :value="item.id" :label="item.realname" :key="index">{{ item.realname }}
</el-option>
</el-select>
</Form-item>
......
......@@ -145,7 +145,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
// { title: '工程号', key: 'projectNo', width: 120 },
// { title: '平均容重', key: 'projectNo', width: 120 },
// { title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
......
......@@ -114,7 +114,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
{ title: '工程号', key: 'projectNo', width: 120 },
{ title: '平均容重', key: 'projectNo', width: 120 },
{ title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
......
......@@ -17,6 +17,9 @@
<Form-item label="试验科室:" class="search-item">
<Input v-model="formObj.groupName" @on-enter="_formSearch" placeholder="请输入试验科室" clearable />
</Form-item>
<Form-item label="试验编号:" class="search-item">
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入试样编号" clearable />
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">
搜索
......@@ -110,7 +113,7 @@
<modal-footer ref="footerModal" :footer="footerList" @on-result-change="_footerResult" />
</div>
</Modal>
<PrepareItemBatchEdit ref="batchEdit" @on-result-change="_page"></PrepareItemBatchEdit>
<PrepareItemBatchEdit ref="batchEdit" @on-result-change="_pageByEntrustId"></PrepareItemBatchEdit>
</div>
</template>
<script>
......@@ -129,6 +132,11 @@ export default {
type: 'success',
id: '',
name: '批量填写试验项目信息'
},
{
type: 'error',
id: '',
name: '删除'
}
],
iconMsg: [{ type: 'pt-a-end', id: '', name: '删除' }],
......@@ -182,6 +190,7 @@ export default {
name: undefined,
sampleId: undefined,
groupName: undefined,
sampleCode: undefined,
entrustId: undefined
}
}
......@@ -372,7 +381,7 @@ export default {
const result = await soilEntrust.pageItemEdit(data)
if (result) {
this.$message.success('保存成功')
this._page()
this._pageByEntrustId()
} else {
this.$message.warning('保存失败')
}
......@@ -381,7 +390,7 @@ export default {
const result = await soilEntrust.pageItemEdit(data)
if (result) {
this.$message.success('保存成功')
this._page()
this._pageByEntrustId()
} else {
this.$message.warning('保存失败')
}
......@@ -390,7 +399,7 @@ export default {
const result = await soilEntrust.pageItemEdit(data)
if (result) {
this.$message.success('保存成功')
this._page()
this._pageByEntrustId()
} else {
this.$message.warning('保存失败')
}
......@@ -399,7 +408,7 @@ export default {
const result = await soilEntrust.pageItemEdit(data)
if (result) {
this.$message.success('保存成功')
this._page()
this._pageByEntrustId()
} else {
this.$message.warning('保存失败')
}
......@@ -541,7 +550,7 @@ export default {
this.showModal = true
this.sampleId = id // 委托id
this.$refs.pageTable._hideLoading()
this._page()
this._pageByEntrustId()
},
_openByEntrustId(id) {
this.formObj = this.$resetFields(this.formObj)
......@@ -560,7 +569,7 @@ export default {
this.sampleId = id // 委托id
this.$refs.pageTable._hideLoading()
this.showOption = false
this._page()
this._pageByEntrustId()
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
......@@ -602,7 +611,7 @@ export default {
},
_deleteOk: async function(ids) {
const result = await soilEntrust.deleteById(ids)
const result = await soilEntrust.experimentDeleteById(ids)
if (result) {
this._resultChange('删除成功! ')
}
......@@ -654,10 +663,10 @@ export default {
}
},
_search() {
this._page()
this._pageByEntrustId()
},
_resultChange(msg) {
this._page()
this._pageByEntrustId()
this.$Message.success(msg)
this.$emit('on-result-change')
},
......
......@@ -103,7 +103,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
{ title: '工程号', key: 'projectNo', width: 120 },
{ title: '平均容重', key: 'projectNo', width: 120 },
{ title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
......
......@@ -106,7 +106,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
{ title: '工程号', key: 'projectNo', width: 120 },
{ title: '平均容重', key: 'projectNo', width: 120 },
{ title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
......
......@@ -39,7 +39,7 @@ export default {
{ key: 'belongUnit', title: '归口单位' },
{ key: 'publishUnit', title: '发布单位' }
],
modalTitle: '添加食品标准表',
modalTitle: '收样位置选择',
formObj: {
receiveLocation: '',
locationId: ''
......@@ -112,6 +112,7 @@ export default {
if (result) {
this._resultChange('收样成功!')
}
this._hideLoading()
},
_save: async function(data) {
const result = await soilAptitude.standardSave(data)
......
<template>
<div>
<Modal v-model="showEditModal" :mask-closable="false" :width="500" class="zIndex-1200">
<p slot="header">{{modalTitle}}</p>
<div>
<Form id="edit-form" ref="formObj" :model="formObj" :rules="ruleValidate" :label-width="100" inline>
<Form-item label="收样位置" prop="name" style="width: 100%">
<el-select v-model="formObj.locationId" @change="selectLocation($event)" name="locationId">
<el-option v-for="(item) in options" :label="item.name" :key="item.id" :value="item.id">
{{ item.name }}
</el-option>
</el-select>
</Form-item>
</Form>
</div>
<div slot="footer">
<ModalFooter ref="footerModal" @on-result-change="_footerResult" :footer="footerList"></ModalFooter>
</div>
</Modal>
</div>
</template>
<script>
/**
* 添加编辑
*/
import ModalFooter from '../../../../components/base/modalFooter'
import { soilAptitude, soilEntrust, soilSample } from '../../../../api'
export default {
components: {
ModalFooter
},
data() {
return {
formId: '',
lengthLimitList: [
{ key: 'stdNum', title: '标准号' },
{ key: 'enName', title: '英文名称' },
{ key: 'belongUnit', title: '归口单位' },
{ key: 'publishUnit', title: '发布单位' }
],
modalTitle: '留存位置选择',
formObj: {
receiveLocation: '',
locationId: ''
},
ruleValidate: {},
showEditModal: false,
ids: '',
options: [],
classifyList: [
{ value: 0, name: '判定依据' },
{ value: 1, name: '检测依据' },
{ value: 2, name: '其他' }
],
typeList: [
{ value: 0, name: '国家标准' },
{ value: 1, name: '地方标准' },
{ value: 2, name: '行业标准' },
{ value: 3, name: '企业标准' }
],
statusList: [
{ value: 0, name: '现行' },
{ value: 1, name: '即将实施' },
{ value: 2, name: '部分被代替' },
{ value: 3, name: '被代替' },
{ value: 4, name: '作废' }
],
footerList: [
{ id: '', name: '取消', type: '' },
{ id: '', name: '保存', type: 'primary' }
]
}
},
methods: {
/** *modal-footer */
selectLocation(data) {
this._getLocationById(data)
},
_footerResult(name) {
switch (name) {
case '取消':
this._cancel()
break
case '保存':
this._ok()
break
}
},
_hideLoading() {
this.$refs.footerModal._hideLoading()
},
_resultChange(msg) {
this.showEditModal = false
this.$Message.success(msg)
this.$emit('on-result-change')
this._hideLoading()
},
_ok() {
this.$refs.formObj.validate(valid => {
if (valid) {
this.formObj.ids = this.ids
this._receive(this.formObj)
} else {
this.$Message.error('表单验证失败!')
this._hideLoading()
}
})
},
_receive: async function(data) {
const result = await soilEntrust.sampleRetain(data)
if (result) {
this._resultChange('留存成功!')
}
this.$refs.footerModal._hideLoading()
},
_save: async function(data) {
const result = await soilAptitude.standardSave(data)
if (result) {
this._resultChange('添加成功!')
}
},
_edit: async function(data) {
const result = await soilAptitude.standardEdit(data)
if (result) {
this._resultChange('编辑成功!')
}
},
_cancel() {
this._hideLoading()
this.showEditModal = false
},
_open(ids) {
this.formObj.receiveLocation = ''
this.formObj.locationId = ''
this._getLocation()
this.ids = ids
this.showEditModal = true
},
_getLocation: async function() {
const result = await soilSample.locationList()
if (result) {
console.log(result)
this.options = result
console.log(this.options)
}
},
_getLocationById: async function(id) {
console.log(id)
const result = await soilSample.locationGetById(id)
if (result) {
this.formObj.receiveLocation = result.name
}
console.log(this.formObj.receiveLocation)
},
_registerAdd() {
this.formId = this.$randomCode()
this._hideLoading()
this.$refs.formObj.resetFields()
this.modalTitle = '添加'
this.formObj.id = ''
this.formObj.type = 3
this.showEditModal = true
}
}
}
</script>
<template>
<div>
<Modal v-model="showSampleModal" @on-visible-change="_visibleChange" width="1000"
<Modal v-model="showSampleModal" @on-visible-change="_visibleChange" width="1100"
class="zIndex-900 modal-footer-none">
<p slot="header"> {{name}}--管理样品</p>
<div>
......
......@@ -5,11 +5,16 @@
<Row>
<!--查询-->
<Col span="24" style="padding-bottom: 5px">
<Form id="search-wait" :label-width="90" v-show="searchOpen" inline onsubmit="return false">
<Form id="search-wait" :label-width="100" v-show="searchOpen" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="试样编号:" class="search-item">
<Input @on-enter="_formSearch" v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入试样编号" clearable></Input>
</Form-item>
<Form-item label="是否有试验项目:" class="search-item">
<Select v-model="formObj.haveExp" clearable name="groupId" style="width:150px" placeholder="请选择检测科室">
<Option v-for="(item,index) in itemData" :value="item.value" :key="index">{{item.name}}</Option>
</Select>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
......@@ -52,23 +57,39 @@
<!--选择领样人-->
<SampleReceiveModal ref="locationModal" @on-result-change="_page()"></SampleReceiveModal>
<SoilSampleItemManage ref="sampleItemManage" @on-result-change="_page"></SoilSampleItemManage>
<KeepAdress ref="keepAdressModal" @on-result-change="_page"></KeepAdress>
</div>
</template>
<script>
import { soilEntrust } from '../../../../api'
import SampleReceiveModal from '../SampleReceiveModal'
import SoilSampleItemManage from './SoilSampleItemManage'
import KeepAdress from './KeepAdress'
export default {
components: { SampleReceiveModal, SoilSampleItemManage },
components: { SampleReceiveModal, SoilSampleItemManage, KeepAdress },
data() {
return {
btn: [{ type: 'primary', id: '', name: '收样室收样' }],
btn: [
{ type: 'primary', id: '', name: '收样室收样' },
{ type: 'primary', id: '', name: '样品留存' }
],
selectIds: [],
getPage: {},
itemData: [
{
name: '是',
value: 1
},
{
name: '否',
value: 0
}
],
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 120, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 120 },
{ title: '现场编号', key: 'siteNo', width: 120 },
{ title: '试样深度', key: 'sampleDepth', width: 100 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '试验项目', key: 'experimentNames', width: 220 },
{ title: '土质描述', key: 'sampleDescribe', width: 205 },
{ title: '样品包装类型', key: 'samplePack', width: 120 },
{ title: '备注', key: 'remark', width: 210 }
......@@ -84,7 +105,8 @@ export default {
num: '',
detectType: '',
standard: '',
samplingLinkList: []
samplingLinkList: [],
haveExp: undefined
},
stdList: [],
sampleLinkList: [
......@@ -268,6 +290,9 @@ export default {
case '收样室收样':
this._sampleReceive(this.selectIds)
break
case '样品留存':
this._sampleKeep(this.selectIds)
break
case '打印标签':
this._selectPrinter('print-label')
break
......@@ -501,7 +526,14 @@ export default {
break
}
},
_sampleKeep(id) {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选中一条样品数据!')
} else {
const ids = id.join(',')
this.$refs.keepAdressModal._open(ids)
}
},
// 样品接收
_sampleReceive(id) {
if (this.selectIds.length === 0) {
......
......@@ -70,6 +70,7 @@ export default {
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 95 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '试验项目', key: 'experimentNames', width: 225 },
{ title: '土质描述', key: 'sampleDescribe', width: 185 },
{ title: '样品包装类型', key: 'samplePack', width: 120 }
],
......
......@@ -78,30 +78,10 @@ export default {
type: '',
id: '',
name: '驳回'
},
{
type: 'primary',
id: 'food-sample-preparation-his-all',
name: '制备'
},
{
type: 'primary',
id: 'food-sample-preparation-his-no-pre',
name: '无需制备'
},
{
type: 'primary',
id: 'food-sample-preparation-his-scan-pre',
name: '扫码制备'
},
}
// { type: '', id: '', name: '填写存放信息' },
// { type: '', id: '', name: '申请处理' },
// { type: '', id: '', name: '导出' },
{
type: '',
id: 'food-sample-prepare-record-export',
name: '导出备样记录'
}
],
iconMsg: [
{ type: 'md-create', id: '', name: '编辑' } // food-sample-prepare-edit
......
......@@ -56,11 +56,6 @@ export default {
formObj: {},
btn: [
// { type: '', id: '', name: '导出' },
{
type: '',
id: 'food-sample-handle-already-export-sample-store',
name: '导出样品贮存表'
}
],
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 150 },
......
<template>
<div>
<Modal v-model="showSubmitModal" :mask-closable="false" @on-visible-change="_visibleChange" width="700">
<p slot="header">{{modalTitle}}</p>
<div>
<Form :label-width="80" onsubmit="return false">
<Form-item label="样品编号" prop="num">
<Input ref="inputFocus" @submit.native.prevent @on-enter="_numBlur" v-model="num"
placeholder="请将鼠标聚焦在此,并保持英文输入状态" style="width:100%"></Input>
</Form-item>
<Form-item label="扫码信息">
<div class="scanInfo">
<ul>
<li v-for="(item,index) in scanInfo" v-bind:key="index">{{item}}</li>
</ul>
</div>
</Form-item>
</Form>
</div>
</Modal>
</div>
</template>
<script>
/* 扫码接收、扫码发放 */
import { soilSample } from '../../../api'
export default {
components: {},
data() {
return {
modalTitle: '',
showSubmitModal: false,
scanInfo: [],
num: '',
formObj: {
personId: '',
person: ''
}
}
},
methods: {
_open(title, data) {
if (title) {
this.modalTitle = title
} else {
this.modalTitle = '扫码接收'
}
if (data) {
this.formObj.person = data.realname
this.formObj.personId = data.userId
} else {
this.formObj = this.$serializeFormSearch(this.formObj)
}
this.showSubmitModal = true
this.num = ''
this.scanInfo = []
this._autoFocus()
},
_autoFocus() {
this.$nextTick(() => {
this.$refs.inputFocus.focus()
})
},
_cancel() {
this.showSubmitModal = false
},
_numBlur: async function() {
// 扫码发放
const param = {}
Object.assign(param, this.formObj, { num: this.num })
const result = await soilSample.scanTakeSample(this.num)
if (result) {
console.log(result)
this.num = ''
this.$Message.success('领样成功')
// this._resultChange(' 领样')
}
// this.$store
// .dispatch('FoodSample/scanSend', this.$serializeFormSearch(param))
// .then(() => {
// this._resultChange(' 发放')
// })
this._autoFocus()
},
_resultChange(msg) {
const returnNum = this.$store.state.FoodSample.success
if (returnNum) {
this.scanInfo.push('编号 ' + returnNum + msg + '成功!')
this.num = ''
} else {
this.num = ''
}
},
// 关闭弹框,刷新界面
_visibleChange(data) {
if (!data) {
this.$emit('on-result-change')
}
}
}
}
</script>
<style>
.scanInfo {
overflow: auto;
}
</style>
......@@ -59,6 +59,7 @@
<!--打印(可填打印数量)-->
<!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>
<TakeByEwm ref="ewmModal"></TakeByEwm>
</div>
</template>
......@@ -66,10 +67,11 @@
import http from '../../../api/http'
import UserInfo from '../../../components/user-info-single/assignPerson'
import { soilEntrust, soilSample } from '../../../api'
import TakeByEwm from './TakeByEwm'
export default {
components: {
UserInfo
UserInfo,
TakeByEwm
},
data() {
return {
......@@ -142,7 +144,10 @@ export default {
{ title: '单位', key: 'unit', width: 130 }
],
searchOpen: false,
btn: [{ type: 'primary', id: '', name: '领样', componentName: '' }],
btn: [
{ type: 'primary', id: '', name: '领样', componentName: '' },
{ type: 'primary', id: '', name: '扫码领样', componentName: '' }
],
selectIds: [],
selectData: [],
currentComponent: '',
......@@ -207,11 +212,17 @@ export default {
case '领样':
this._sampleTake()
break
case '扫码领样':
this._ewmTake()
break
default:
this._btnOption(msg, formTypeObj)
}
})
},
_ewmTake() {
this.$refs.ewmModal._open()
},
// btn操作
_btnOption(msg, formTypeObj) {
switch (msg) {
......
......@@ -101,30 +101,10 @@ export default {
type: 'primary',
id: '',
name: '完成处理'
},
{
type: 'primary',
id: 'food-sample-preparation-his-all',
name: '制备'
},
{
type: 'primary',
id: 'food-sample-preparation-his-no-pre',
name: '无需制备'
},
{
type: 'primary',
id: 'food-sample-preparation-his-scan-pre',
name: '扫码制备'
},
}
// { type: '', id: '', name: '填写存放信息' },
// { type: '', id: '', name: '申请处理' },
// { type: '', id: '', name: '导出' },
{
type: '',
id: 'food-sample-prepare-record-export',
name: '导出备样记录'
}
],
iconMsg: [
{ type: 'md-create', id: '', name: '编辑' }, // food-sample-prepare-edit
......
......@@ -78,11 +78,6 @@ export default {
],
btn: [
// { type: '', id: '', name: '导出' },
{
type: '',
id: 'food-sample-handle-already-export-sample-store',
name: '导出样品贮存表'
}
],
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 150 },
......
......@@ -2,14 +2,22 @@
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<!-- <el-tabs v-model="activeName" @tab-click="_changeTabs">-->
<!-- <el-tab-pane label="数据审核" name="check">-->
<!-- <SampleBackupsManage ref="checkTabs"></SampleBackupsManage>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="历史任务" name="checkHis">-->
<!-- <SampleBackupsQuery ref="checkHisTabs"></SampleBackupsQuery>-->
<!-- </el-tab-pane>-->
<!-- </el-tabs>-->
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="数据审核" name="check">
<SampleBackupsManage ref="checkTabs"></SampleBackupsManage>
</el-tab-pane>
<el-tab-pane label="历史任务" name="checkHis">
<SampleBackupsQuery ref="checkHisTabs"></SampleBackupsQuery>
</el-tab-pane>
<el-tab-pane label="数据审核" name="check"></el-tab-pane>
<el-tab-pane label="历史任务" name="checkHis"></el-tab-pane>
</el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div>
</div>
</div>
......@@ -20,28 +28,37 @@ import SampleBackupsManage from './DataAudit'
import SampleBackupsQuery from './DataAuditHis'
export default {
components: {
SampleBackupsManage,
SampleBackupsQuery
},
// eslint-disable-next-line vue/no-unused-components
components: { SampleBackupsManage, SampleBackupsQuery },
data() {
return {
activeName: 'check'
activeName: 'check',
currentComponent: ''
}
},
mounted() {
this.activeName = 'check'
this.$refs.checkTabs._page()
this._page()
},
methods: {
_changeTabs(tab, event) {
if (tab.name === 'check') {
this.$refs.checkTabs._page()
this._page()
} else if (tab.name === 'applyRecord') {
// this.$refs.applyRecordTabs._page()
} else {
this.$refs.checkHisTabs._page()
this.currentComponent = 'SampleBackupsQuery'
this.$nextTick(() => {
this.$refs.refModal._page()
})
}
},
_page() {
this.currentComponent = 'SampleBackupsManage'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.entrustTabs._page()
}
}
}
......
......@@ -61,10 +61,14 @@
</div>
<!--组件加载-->
<!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>
<Operation ref="operation"></Operation>
<AuditDataModal ref="sampleManageModal" @on-result-change="_page"></AuditDataModal>
<FileManage ref="FileManage"></FileManage>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <AuditDataModal ref="sampleManageModal" @on-result-change="_page"></AuditDataModal>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
</div>
</template>
<script>
......@@ -73,12 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation'
import AuditDataModal from './AuditDataModal'
export default {
components: {
UserInfo,
Operation,
// eslint-disable-next-line vue/no-unused-components
AuditDataModal
},
components: { UserInfo, Operation, AuditDataModal },
data() {
return {
formObj: {
......@@ -108,7 +108,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
// { title: '工程号', key: 'projectNo', width: 120 },
// { title: '平均容重', key: 'projectNo', width: 120 },
// { title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
......@@ -139,7 +139,7 @@ export default {
}
},
mounted() {
this._page()
// this._page()
// 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
},
......@@ -365,7 +365,11 @@ export default {
})
},
_editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, '数据录入')
this.currentComponent = 'AuditDataModal'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, '数据录入')
})
// this.$refs.sampleManageModal._open(id, type, '数据录入')
},
_editModals(res, data) {
if (res === '登记协议') {
......@@ -430,7 +434,11 @@ export default {
},
_operationRecord(id) {
// 操作日志
this.$refs.operation._open(id)
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
},
_resultChange(msg) {
if (this.$store.state.FoodContract.success) {
......@@ -441,7 +449,11 @@ export default {
},
_upload(id) {
// 上传文件
this.$refs.FileManage._open(id, 'entrustId')
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
}
}
}
......
......@@ -61,10 +61,14 @@
</div>
<!--组件加载-->
<!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>
<Operation ref="operation"></Operation>
<FileManage ref="FileManage"></FileManage>
<SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>-->
</div>
</template>
<script>
......@@ -73,11 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation'
import SoilSampleManageHis from './SoilSampleManageHis'
export default {
components: {
UserInfo,
Operation,
SoilSampleManageHis
},
// eslint-disable-next-line vue/no-unused-components
components: { UserInfo, Operation, SoilSampleManageHis },
data() {
return {
formObj: {
......@@ -92,7 +93,6 @@ export default {
name: '管理样品'
},
{ type: 'md-cloud', id: '', name: '附件' },
{ type: 'md-trash', id: '', name: '删除' },
{
type: 'ios-clock',
id: '',
......@@ -108,7 +108,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
{ title: '工程号', key: 'projectNo', width: 120 },
{ title: '平均容重', key: 'projectNo', width: 120 },
{ title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
......@@ -139,7 +139,7 @@ export default {
}
},
mounted() {
this._page()
// this._page()
// 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
},
......@@ -365,7 +365,11 @@ export default {
})
},
_editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, name)
this.currentComponent = 'SoilSampleManageHis'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, name)
})
// this.$refs.sampleManageModal._open(id, type, name)
},
_editModals(res, data) {
if (res === '登记协议') {
......@@ -430,7 +434,11 @@ export default {
},
_operationRecord(id) {
// 操作日志
this.$refs.operation._open(id)
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
},
_resultChange(msg) {
if (this.$store.state.FoodContract.success) {
......@@ -440,8 +448,12 @@ export default {
}
},
_upload(id) {
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// 上传文件
this.$refs.FileManage._open(id, 'entrustId')
// this.$refs.FileManage._open(id, 'entrustId')
}
}
}
......
......@@ -2,14 +2,22 @@
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<!-- <el-tabs v-model="activeName" @tab-click="_changeTabs">-->
<!-- <el-tab-pane label="数据复核" name="check">-->
<!-- <SampleBackupsManage ref="checkTabs"></SampleBackupsManage>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="历史任务" name="checkHis">-->
<!-- <SampleBackupsQuery ref="checkHisTabs"></SampleBackupsQuery>-->
<!-- </el-tab-pane>-->
<!-- </el-tabs>-->
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="数据复核" name="check">
<SampleBackupsManage ref="checkTabs"></SampleBackupsManage>
</el-tab-pane>
<el-tab-pane label="历史任务" name="checkHis">
<SampleBackupsQuery ref="checkHisTabs"></SampleBackupsQuery>
</el-tab-pane>
<el-tab-pane label="数据复核" name="check"></el-tab-pane>
<el-tab-pane label="历史任务" name="checkHis"></el-tab-pane>
</el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div>
</div>
</div>
......@@ -20,28 +28,37 @@ import SampleBackupsManage from './DataCheck'
import SampleBackupsQuery from './DataCheckHis'
export default {
components: {
SampleBackupsManage,
SampleBackupsQuery
},
// eslint-disable-next-line vue/no-unused-components
components: { SampleBackupsManage, SampleBackupsQuery },
data() {
return {
activeName: 'check'
activeName: 'check',
currentComponent: ''
}
},
mounted() {
this.activeName = 'check'
this.$refs.checkTabs._page()
this._page()
},
methods: {
_changeTabs(tab, event) {
if (tab.name === 'check') {
this.$refs.checkTabs._page()
this._page()
} else if (tab.name === 'applyRecord') {
// this.$refs.applyRecordTabs._page()
} else {
this.$refs.checkHisTabs._page()
this.currentComponent = 'SampleBackupsQuery'
this.$nextTick(() => {
this.$refs.refModal._page()
})
}
},
_page() {
this.currentComponent = 'SampleBackupsManage'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.entrustTabs._page()
}
}
}
......
......@@ -61,10 +61,14 @@
</div>
<!--组件加载-->
<!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>
<Operation ref="operation"></Operation>
<AuditDataModal ref="sampleManageModal" @on-result-change="_page"></AuditDataModal>
<FileManage ref="FileManage"></FileManage>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <AuditDataModal ref="sampleManageModal" @on-result-change="_page"></AuditDataModal>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
</div>
</template>
<script>
......@@ -73,12 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation'
import AuditDataModal from './CheckDataModal'
export default {
components: {
UserInfo,
Operation,
// eslint-disable-next-line vue/no-unused-components
AuditDataModal
},
components: { UserInfo, Operation, AuditDataModal },
data() {
return {
formObj: {
......@@ -108,7 +108,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
// { title: '工程号', key: 'projectNo', width: 120 },
// { title: '平均容重', key: 'projectNo', width: 120 },
// { title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
......@@ -139,7 +139,7 @@ export default {
}
},
mounted() {
this._page()
// this._page()
// 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
},
......@@ -365,7 +365,11 @@ export default {
})
},
_editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, '数据录入')
this.currentComponent = 'AuditDataModal'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, '数据录入')
})
// this.$refs.sampleManageModal._open(id, type, '数据录入')
},
_editModals(res, data) {
if (res === '登记协议') {
......@@ -429,8 +433,12 @@ export default {
this._page()
},
_operationRecord(id) {
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// 操作日志
this.$refs.operation._open(id)
// this.$refs.operation._open(id)
},
_resultChange(msg) {
if (this.$store.state.FoodContract.success) {
......@@ -440,8 +448,12 @@ export default {
}
},
_upload(id) {
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// 上传文件
this.$refs.FileManage._open(id, 'entrustId')
// this.$refs.FileManage._open(id, 'entrustId')
}
}
}
......
......@@ -61,10 +61,14 @@
</div>
<!--组件加载-->
<!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>
<Operation ref="operation"></Operation>
<FileManage ref="FileManage"></FileManage>
<SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>-->
</div>
</template>
<script>
......@@ -73,11 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation'
import SoilSampleManageHis from './SoilSampleManageHis'
export default {
components: {
UserInfo,
Operation,
SoilSampleManageHis
},
// eslint-disable-next-line vue/no-unused-components
components: { UserInfo, Operation, SoilSampleManageHis },
data() {
return {
formObj: {
......@@ -107,7 +108,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
{ title: '工程号', key: 'projectNo', width: 120 },
{ title: '平均容重', key: 'projectNo', width: 120 },
{ title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
......@@ -138,7 +139,7 @@ export default {
}
},
mounted() {
this._page()
// this._page()
// 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
},
......@@ -364,7 +365,11 @@ export default {
})
},
_editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, name)
this.currentComponent = 'SoilSampleManageHis'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, name)
})
// this.$refs.sampleManageModal._open(id, type, name)
},
_editModals(res, data) {
if (res === '登记协议') {
......@@ -429,7 +434,11 @@ export default {
},
_operationRecord(id) {
// 操作日志
this.$refs.operation._open(id)
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
},
_resultChange(msg) {
if (this.$store.state.FoodContract.success) {
......@@ -440,7 +449,11 @@ export default {
},
_upload(id) {
// 上传文件
this.$refs.FileManage._open(id, 'entrustId')
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
}
}
}
......
......@@ -61,10 +61,14 @@
</div>
<!--组件加载-->
<!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>
<Operation ref="operation"></Operation>
<FileManage ref="FileManage"></FileManage>
<SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>-->
</div>
</template>
<script>
......@@ -73,11 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation'
import SoilSampleManageHis from './SoilSampleManageHis'
export default {
components: {
UserInfo,
Operation,
SoilSampleManageHis
},
// eslint-disable-next-line vue/no-unused-components
components: { UserInfo, Operation, SoilSampleManageHis },
data() {
return {
formObj: {
......@@ -89,7 +90,7 @@ export default {
{
type: 'ios-beaker',
id: '',
name: '审核数据'
name: '管理样品'
},
{ type: 'md-cloud', id: '', name: '附件' },
{
......@@ -107,7 +108,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
// { title: '工程号', key: 'projectNo', width: 120 },
// { title: '平均容重', key: 'projectNo', width: 120 },
// { title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
......@@ -345,7 +346,7 @@ export default {
console.log(res)
this.$nextTick(() => {
switch (res) {
case '审核数据':
case '管理样品':
this._editModal(data.id, data.type, data.cname)
break
case '项目管理':
......@@ -364,7 +365,11 @@ export default {
})
},
_editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, '数据录入')
this.currentComponent = 'SoilSampleManageHis'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, '数据录入')
})
// this.$refs.sampleManageModal._open(id, type, '数据录入')
},
_editModals(res, data) {
if (res === '登记协议') {
......@@ -429,7 +434,11 @@ export default {
},
_operationRecord(id) {
// 操作日志
this.$refs.operation._open(id)
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
},
_resultChange(msg) {
if (this.$store.state.FoodContract.success) {
......@@ -440,7 +449,11 @@ export default {
},
_upload(id) {
// 上传文件
this.$refs.FileManage._open(id, 'entrustId')
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
}
}
}
......
......@@ -61,10 +61,14 @@
</div>
<!--组件加载-->
<!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>
<Operation ref="operation"></Operation>
<SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage>
<FileManage ref="FileManage"></FileManage>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</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>
</template>
<script>
......@@ -73,12 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation'
import SampleManage from './SampleManage'
export default {
components: {
UserInfo,
Operation,
// eslint-disable-next-line vue/no-unused-components
SampleManage
},
components: { UserInfo, Operation, SampleManage },
data() {
return {
formObj: {
......@@ -108,7 +108,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
// { title: '工程号', key: 'projectNo', width: 120 },
// { title: '平均容重', key: 'projectNo', width: 120 },
// { title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
......@@ -139,7 +139,7 @@ export default {
}
},
mounted() {
this._page()
// this._page()
// 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
},
......@@ -365,7 +365,11 @@ export default {
})
},
_editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, '数据录入')
this.currentComponent = 'SampleManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, '数据录入')
})
// this.$refs.sampleManageModal._open(id, type, '数据录入')
},
_editModals(res, data) {
if (res === '登记协议') {
......@@ -429,8 +433,12 @@ export default {
this._page()
},
_operationRecord(id) {
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// 操作日志
this.$refs.operation._open(id)
// this.$refs.operation._open(id)
},
_resultChange(msg) {
if (this.$store.state.FoodContract.success) {
......@@ -441,7 +449,11 @@ export default {
},
_upload(id) {
// 上传文件
this.$refs.FileManage._open(id, 'entrustId')
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
}
}
}
......
......@@ -61,10 +61,14 @@
</div>
<!--组件加载-->
<!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>
<Operation ref="operation"></Operation>
<FileManage ref="FileManage"></FileManage>
<SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>-->
</div>
</template>
<script>
......@@ -73,11 +77,8 @@ import { soilTest } from '../../../api'
import Operation from '../../../components/operation/Operation'
import SoilSampleManageHis from './SoilSampleManageHis'
export default {
components: {
UserInfo,
Operation,
SoilSampleManageHis
},
// eslint-disable-next-line vue/no-unused-components
components: { UserInfo, Operation, SoilSampleManageHis },
data() {
return {
formObj: {
......@@ -107,7 +108,7 @@ export default {
{ title: '水深(米)', key: 'waterDepth', width: 120 },
{ title: '钻孔名称', key: 'boreholeName', width: 120 },
{ title: '进度', key: 'progress', width: 120, status: true },
{ title: '工程号', key: 'projectNo', width: 120 },
{ title: '平均容重', key: 'projectNo', width: 120 },
{ title: '报告编号', key: 'reportCode', width: 120 },
{ title: '制表日期', key: 'tabulateDate', width: 120, date: true },
{ title: '制表人', key: 'tabulater', width: 120 },
......@@ -138,7 +139,7 @@ export default {
}
},
mounted() {
this._page()
// this._page()
// 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
},
......@@ -364,7 +365,11 @@ export default {
})
},
_editModal(id, type, name) {
this.$refs.sampleManageModal._open(id, type, name)
this.currentComponent = 'SoilSampleManageHis'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, name)
})
// this.$refs.sampleManageModal._open(id, type, name)
},
_editModals(res, data) {
if (res === '登记协议') {
......@@ -429,7 +434,11 @@ export default {
},
_operationRecord(id) {
// 操作日志
this.$refs.operation._open(id)
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
},
_resultChange(msg) {
if (this.$store.state.FoodContract.success) {
......@@ -440,7 +449,11 @@ export default {
},
_upload(id) {
// 上传文件
this.$refs.FileManage._open(id, 'entrustId')
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
}
}
}
......
......@@ -2,14 +2,22 @@
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<!-- <el-tabs v-model="activeName" @tab-click="_changeTabs">-->
<!-- <el-tab-pane label="数据录入" name="wait">-->
<!-- <SampleBackupsManage ref="waitTabs"></SampleBackupsManage>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="录入历史" name="query">-->
<!-- <SampleBackupsQuery ref="queryTabs"></SampleBackupsQuery>-->
<!-- </el-tab-pane>-->
<!-- </el-tabs>-->
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="数据录入" name="wait">
<SampleBackupsManage ref="waitTabs"></SampleBackupsManage>
</el-tab-pane>
<el-tab-pane label="录入历史" name="query">
<SampleBackupsQuery ref="queryTabs"></SampleBackupsQuery>
</el-tab-pane>
<el-tab-pane label="数据录入" name="waitTabs"></el-tab-pane>
<el-tab-pane label="录入历史" name="queryTabs"></el-tab-pane>
</el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div>
</div>
</div>
......@@ -20,28 +28,37 @@ import SampleBackupsManage from './TestInput'
import SampleBackupsQuery from './TestInputHis'
export default {
components: {
SampleBackupsManage,
SampleBackupsQuery
},
// eslint-disable-next-line vue/no-unused-components
components: { SampleBackupsManage, SampleBackupsQuery },
data() {
return {
activeName: 'wait'
activeName: 'waitTabs',
currentComponent: ''
}
},
mounted() {
this.activeName = 'wait'
this.$refs.waitTabs._page()
this.activeName = 'waitTabs'
this._page()
},
methods: {
_changeTabs(tab, event) {
if (tab.name === 'wait') {
this.$refs.waitTabs._page()
if (tab.name === 'waitTabs') {
this._page()
} else if (tab.name === 'applyRecord') {
// this.$refs.applyRecordTabs._page()
} else {
this.$refs.queryTabs._page()
this.currentComponent = 'SampleBackupsQuery'
this.$nextTick(() => {
this.$refs.refModal._page()
})
}
},
_page() {
this.currentComponent = 'SampleBackupsManage'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.entrustTabs._page()
}
}
}
......
......@@ -59,11 +59,15 @@
</div>
<!--组件加载-->
<!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>
<SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage>
<ItemManage ref="itemManageModal" @on-result-change="_page"></ItemManage>
<Operation ref="operation"></Operation>
<FileManage ref="FileManage"></FileManage>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage>-->
<!-- <ItemManage ref="itemManageModal" @on-result-change="_page"></ItemManage>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
</div>
</template>
<script>
......@@ -73,12 +77,8 @@ import Operation from '../../../components/operation/Operation'
import SampleManage from './entrust-sample-manage/SampleManage'
import ItemManage from './ItemManage'
export default {
components: {
UserInfo,
SampleManage,
ItemManage,
Operation
},
// eslint-disable-next-line vue/no-unused-components
components: { UserInfo, SampleManage, ItemManage, Operation },
data() {
return {
formObj: {
......@@ -200,7 +200,11 @@ export default {
})
},
_editModal(id, type) {
this.$refs.sampleManageModal._open(id, type, '分配历史')
this.currentComponent = 'SampleManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, '分配历史')
})
// this.$refs.sampleManageModal._open(id, type, '分配历史')
},
_tableResultChange(msg, data) {
switch (msg) {
......@@ -233,12 +237,20 @@ export default {
},
_operationRecord(id) {
// 操作日志
this.$refs.operation._open(id)
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
},
_resultChange(msg) {},
_upload(id) {
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// 上传文件
this.$refs.FileManage._open(id, 'entrustId')
// this.$refs.FileManage._open(id, 'entrustId')
}
}
}
......
......@@ -39,7 +39,7 @@ export default {
{ key: 'belongUnit', title: '归口单位' },
{ key: 'publishUnit', title: '发布单位' }
],
modalTitle: '添加食品标准表',
modalTitle: '收样位置选择',
formObj: {
receiveLocation: '',
locationId: ''
......
......@@ -61,11 +61,15 @@
</div>
<!--组件加载-->
<!--选择领样人-->
<UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>
<SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage>
<ItemManage ref="itemManageModal" @on-result-change="_page"></ItemManage>
<Operation ref="operation"></Operation>
<FileManage ref="FileManage"></FileManage>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <SampleManage ref="sampleManageModal" @on-result-change="_page"></SampleManage>-->
<!-- <ItemManage ref="itemManageModal" @on-result-change="_page"></ItemManage>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
</div>
</template>
<script>
......@@ -76,9 +80,13 @@ import SampleManage from './entrust-sample-manage/SampleManage'
import ItemManage from './ItemManage'
export default {
components: {
// eslint-disable-next-line vue/no-unused-components
UserInfo,
// eslint-disable-next-line vue/no-unused-components
SampleManage,
// eslint-disable-next-line vue/no-unused-components
ItemManage,
// eslint-disable-next-line vue/no-unused-components
Operation
},
data() {
......@@ -362,7 +370,11 @@ export default {
})
},
_editModal(id, type) {
this.$refs.sampleManageModal._open(id, type, '按委托分配')
this.currentComponent = 'SampleManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, type, '按委托分配')
})
// this.$refs.sampleManageModal._open(id, type, '按委托分配')
},
_editModals(res, data) {
if (res === '登记协议') {
......@@ -426,7 +438,11 @@ export default {
},
_operationRecord(id) {
// 操作日志
this.$refs.operation._open(id)
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operation._open(id)
},
_resultChange(msg) {
if (this.$store.state.FoodContract.success) {
......@@ -437,7 +453,11 @@ export default {
},
_upload(id) {
// 上传文件
this.$refs.FileManage._open(id, 'entrustId')
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
}
}
}
......
......@@ -39,7 +39,7 @@ export default {
{ key: 'belongUnit', title: '归口单位' },
{ key: 'publishUnit', title: '发布单位' }
],
modalTitle: '添加食品标准表',
modalTitle: '收样位置选择',
formObj: {
receiveLocation: '',
locationId: ''
......
......@@ -3,13 +3,13 @@
<div class="layout-content-padding">
<div class="layout-content-main">
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="试验任务分配" name="entrust">
<ReceiveByEntrust ref="entrustTabs"></ReceiveByEntrust>
</el-tab-pane>
<el-tab-pane label="分配历史" name="sample">
<ReceiveBySample ref="sampleTabs"></ReceiveBySample>
</el-tab-pane>
<el-tab-pane label="试验任务分配" name="entrust"></el-tab-pane>
<el-tab-pane label="分配历史" name="sample"></el-tab-pane>
</el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div>
</div>
</div>
......@@ -21,13 +21,12 @@ import ReceiveByEntrust from './AllotByEntrust'
export default {
name: 'MeterSummaryEntrustIndex',
components: {
ReceiveByEntrust,
ReceiveBySample
},
// eslint-disable-next-line vue/no-unused-components
components: { ReceiveByEntrust, ReceiveBySample },
data() {
return {
activeName: 'entrust'
activeName: 'entrust',
currentComponent: ''
}
},
mounted() {
......@@ -39,11 +38,19 @@ export default {
if (tab.name === 'entrust') {
this._page()
} else {
this.$refs.sampleTabs._page()
this.currentComponent = 'ReceiveBySample'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.sampleTabs._page()
}
},
_page() {
this.$refs.entrustTabs._page()
this.currentComponent = 'ReceiveByEntrust'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.entrustTabs._page()
}
}
}
......
......@@ -10,9 +10,11 @@ import ReviewEntrust from '../pages/meter-entrust/entrust-review/ReviewEntrust'
import SampleReceiveIndex from '../pages/soil-sample-manage/sample-receive/SampleReceiveIndex'
import SamplePreparationIndex from '../pages/soil-sample-manage/sample-preparation/SamplePreparationIndex'
import AddressManage from '../pages/soil-sample-manage/sample-address/AddressManage'
import KeepAdress from '../pages/soil-sample-manage/keep-address/AddressManage'
import BackupsManage from '../pages/soil-sample-manage/backups-manage/SampleBackupsIndex'
import SampleTakeIndex from '../pages/soil-sample-manage/sample-take/SampleTakeIndex'
import SurplusManage from '../pages/soil-sample-manage/surplus-manage/SampleSurplusIndex'
import DuplicateManage from '../pages/soil-sample-manage/duplicate-manage/SampleduplicateIndex'
import TestTaskIndex from '../pages/soil-test-manage/test-task-manage/TestTaskIndex'
import TestInputIndex from '../pages/soil-test-manage/test-input/TestInputIndex'
import CheckIndex from '../pages/soil-test-manage/test-data-check/CheckIndex'
......@@ -78,11 +80,21 @@ export default [
meta: { title: '备样管理' }
},
{
path: 'keep',
component: KeepAdress,
meta: { title: '留存位置查询' }
},
{
path: 'surplus',
component: SurplusManage,
meta: { title: '余样管理' }
},
{
path: 'copy',
component: DuplicateManage,
meta: { title: '副样管理' }
},
{
path: 'dispose',
component: SampleDisposeIndex,
meta: { title: '样品处理' }
......
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