Commit d4c8cb39 by lichengming

修改了检测数据录入编制证书按钮

parent 6e5c92df
...@@ -59,6 +59,7 @@ export default { ...@@ -59,6 +59,7 @@ export default {
webURL: process.env.WEB_URL, webURL: process.env.WEB_URL,
staticURL: process.env.STATIC_URL, staticURL: process.env.STATIC_URL,
ncURL: process.env.NC_URL, ncURL: process.env.NC_URL,
recordURL: process.env.RECORD_URL,
transformRequest: [ transformRequest: [
// 后面数组中的函数必须返回一个字符串,或 ArrayBuffer,或 Stream // 后面数组中的函数必须返回一个字符串,或 ArrayBuffer,或 Stream
function(data) { function(data) {
......
...@@ -36,4 +36,5 @@ export { default as meterContract } from './meter/meter-contract' ...@@ -36,4 +36,5 @@ export { default as meterContract } from './meter/meter-contract'
export { default as meterSampleQuote } from './meter/meter-sample-quote' export { default as meterSampleQuote } from './meter/meter-sample-quote'
export { default as meterRecord } from './meter/meter-record' export { default as meterRecord } from './meter/meter-record'
export { default as meterSubContract } from './meter/meter-sub-contract' export { default as meterSubContract } from './meter/meter-sub-contract'
export { default as meterPrint } from './meter/meter-print'
export { default as lmsBaseDict } from './lims/lms-base-dict' export { default as lmsBaseDict } from './lims/lms-base-dict'
/**
* 工作台
*/
import http from '../http'
export default {
// 证书模板
pageSampleInputRecordTemp: data =>
http.post('/print/v1/template_category/list_type', data).then(res => res)
}
<template>
<div>
<div class="layout-content-padding">
<div>
<Row :gutter=gutter>
<Col :span="leftSpan">
<Card>
<p slot="title" style="width: 60%;">{{leftName}}</p>
<p slot="title" style="width: 40%;text-align: right">
<a @click="_refresh" class="blue-color">
<Icon type="refresh" size="20"></Icon>
</a>
</p>
<div>
<slot name="left"></slot>
</div>
</Card>
</Col>
<Col :span="rightSpan">
<Card>
<p slot="title">{{rightName}}</p>
<div>
<slot name="right"></slot>
</div>
</Card>
</Col>
</Row>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
gutter: null,
leftName: null,
rightName: null,
leftSpan: null
},
data() {
return {
rowGutter: this.gutter ? this.gutter : 0
}
},
computed: {
rightSpan: function() {
return 24 - this.leftSpan
}
},
methods: {
// 刷新
_refresh() {
this.$emit('on-result-change')
}
}
}
</script>
<style scoped>
</style>
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
<InstruMentEdit ref="InstruEdit"></InstruMentEdit> <InstruMentEdit ref="InstruEdit"></InstruMentEdit>
<MeterPersonItemTaskManage ref="personModal"></MeterPersonItemTaskManage> <MeterPersonItemTaskManage ref="personModal"></MeterPersonItemTaskManage>
<MeterSubcontractorEdit ref="editSubcontractorModal" @on-result-change="_formSearch"></MeterSubcontractorEdit> <MeterSubcontractorEdit ref="editSubcontractorModal" @on-result-change="_formSearch"></MeterSubcontractorEdit>
<SelectOriTempRecord ref="SelectOriTempRecord"></SelectOriTempRecord>
</div> </div>
</template> </template>
<script> <script>
...@@ -71,8 +72,10 @@ import MeterSubcontractorEdit from './MeterGoOutTestEdit' ...@@ -71,8 +72,10 @@ import MeterSubcontractorEdit from './MeterGoOutTestEdit'
import CarManage from './CarManage' import CarManage from './CarManage'
import MeterPersonItemTaskManage from './MeterPersonItemTaskManage' import MeterPersonItemTaskManage from './MeterPersonItemTaskManage'
import InstruMentEdit from './InstrumentEdit' import InstruMentEdit from './InstrumentEdit'
import SelectOriTempRecord from './SelectOriTempRecord'
export default { export default {
components: { components: {
SelectOriTempRecord,
MeterSubcontractorEdit, MeterSubcontractorEdit,
CarManage, CarManage,
MeterPersonItemTaskManage, MeterPersonItemTaskManage,
...@@ -103,6 +106,11 @@ export default { ...@@ -103,6 +106,11 @@ export default {
], ],
iconMsg: [ iconMsg: [
{ {
type: 'ios-bookmarks',
id: '',
name: '编制证书'
},
{
type: 'md-create', type: 'md-create',
id: '', id: '',
name: '编辑' name: '编辑'
...@@ -215,6 +223,9 @@ export default { ...@@ -215,6 +223,9 @@ export default {
this.currentComponent = componentName this.currentComponent = componentName
this.$nextTick(function() { this.$nextTick(function() {
switch (res) { switch (res) {
case '编制证书':
this.$refs.SelectOriTempRecord._open(data.id)
break
case '仪器领用': case '仪器领用':
this.$refs.InstruEdit._open() this.$refs.InstruEdit._open()
break break
......
<template>
<div>
<div>
<Form onsubmit="return false">
<Form-item>
<Input v-model="key" @on-enter="_search" placeholder="请输入关键字,回车查询" style="width:100%"
icon="ios-search-strong"/>
</Form-item>
</Form>
</div>
<!--加载中-->
<div v-show="isloading" class="demo-spin-container spin-bg tree_height">
<Spin fix size="large"></Spin>
</div>
<ul :id="treeId" v-show="isTree"
class="ztree ztreePro tree_height" style="overflow-x: auto;"></ul>
</div>
</template>
<style>
</style>
<script>
/**
* 原始记录类别添加编辑Ztree
*/
import { meterPrint } from '../../../api'
export default {
data() {
return {
treeId: '',
key: '',
isloading: true,
isTree: false,
setting: {
data: {
simpleData: {
enable: true,
idKey: 'id',
pIdKey: 'pid'
}
},
callback: {
onClick: this.zTreeOnClick
}
},
businessTypeList: ''
}
},
created() {
// this.$bus.$on('refreshTree', pid => {
// this._Ztree()
// })
},
methods: {
_Ztree(tableHeight, businessTypeList) {
this.key = ''
this.treeId = 'oriRecordClassTree' + this.$randomCode()
this.isloading = false
this.isTree = true
if (businessTypeList === undefined) {
// 查询所有类别
this._request()
} else {
// 采样实/实验室不同类型
this.businessTypeList = businessTypeList
this._requestByBusinessTypeList()
}
// if (tableHeight) {
// $('.tree_height').height(tableHeight)
// } else {
// $('.tree_height').height(document.documentElement.clientHeight - 230)
// }
},
zTreeOnClick(event, treeId, treeNode) {
this.$emit('on-result-change', treeNode)
},
_search() {
this.isloading = true
this.isTree = false
// 查询实验室、采样、所有类型的数据
if (this.businessTypeList !== undefined) {
this._requestByBusinessTypeList()
} else {
this._request()
}
this.$emit('on-result-change')
},
// 原始记录模板管理查env所有的类别
_page: async function(data) {
data.service = 'env'
const result = await meterPrint.pageSampleInputRecordTemp(data)
if (result) {
console.log(result)
} else {
console.log('请求失败')
}
},
_request() {
console.log('// 查询所有类别')
const data = {}
if (this.key) {
data.name = this.key
}
this._page(data)
// this.$store.dispatch('ElnTemplateCategory/list', data).then(() => {
// const treeObj = $.fn.zTree.init(
// $('#' + this.treeId),
// this.setting,
// this.$store.state.ElnTemplateCategory.list
// )
// treeObj.expandAll(true)
// setTimeout(() => {
// this.isloading = false
// this.isTree = true
// }, 300)
// })
},
// 采样/实验室查env下,不同类型(采样/实验室)的树数据
_requestByBusinessTypeList() {
console.log('采样/实验室查env下,不同类型(采样/实验室)的树数据')
const data = {}
data.businessTypeList = this.businessTypeList
if (this.key) {
data.name = this.key
}
this._page(data)
// this.$store.dispatch('ElnTemplateCategory/listType', data).then(() => {
// const treeObj = $.fn.zTree.init(
// $('#' + this.treeId),
// this.setting,
// this.$store.state.ElnTemplateCategory.list
// )
// treeObj.expandAll(true)
// setTimeout(() => {
// this.isloading = false
// this.isTree = true
// }, 300)
// })
}
}
}
</script>
<style>
.tree_height {
height: 300px;
}
</style>
<template>
<div>
</div>
</template>
<script>
import { Iframe } from '../../../plugins/iframe'
export default {
props: {
ifrAction: null
},
data() {
return {
iframeShow: false,
isLoading: false,
fullScreenHeight: 300 + 'px',
iframeHeight: 300 + 'px',
iframeHeader: '原始记录添加'
}
},
methods: {
/** 自定义iframe**/
_createIframe(bindUri, params) {
Iframe.iframe(bindUri, params)
},
/** 自定义iframe的使用**/
_closeIframe() {
Iframe.closeModalDiv()
}
}
}
</script>
<style>
.record-modal {
width: 800px;
height: 500px;
border: 1px solid #0079fd;
position: fixed;
box-shadow: 0 0 10px #505050;
top: 0;
left: 0;
display: block;
}
.record-modal-header {
width: 100%;
height: 30px;
background-color: #ffffff;
position: relative;
border-bottom: 1px solid #ffffff;
}
.record-modal-title {
width: 200px;
position: absolute;
left: 0;
top: 0;
height: 100%;
font-size: 14px;
font-weight: 400;
color: #000;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 30px;
margin-left: 10px;
}
.record-modal-btn {
position: absolute;
right: 0;
top: 0;
width: 120px;
height: 100%;
margin-top: 0;
/*margin-left: 680px;*/
}
.record-modal-btn > div {
float: left;
width: 40px;
height: 100%;
font-size: 14px;
line-height: 30px;
text-align: center;
cursor: default;
user-select: none;
}
.record-modal-max {
font-weight: bold;
}
.record-modal-min:hover,
.record-modal-max:hover {
background-color: #e5e5e5;
}
.record-modal-close {
font-size: 24px !important;
}
.record-modal-close:hover {
background-color: #e81123 !important;
}
.record-modal-content {
width: 100%;
height: 470px;
position: relative;
background-color: #ffffff;
}
.record-loading-content {
background-color: #ffffff;
width: 100%;
text-align: center;
position: absolute;
top: 50%;
transform: translateY(-50%);
}
</style>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</el-date-picker> </el-date-picker>
</Form-item> </Form-item>
<Form-item class="marginLeft-70" style="margin-left: -60px;"> <Form-item class="marginLeft-70" style="margin-left: -60px;">
<Button type="primary" class="width-80" @click="_getData">搜索</Button> <Button type="primary" class="width-80" @click="_search">搜索</Button>
</Form-item> </Form-item>
</Form> </Form>
</div> </div>
...@@ -111,8 +111,6 @@ export default { ...@@ -111,8 +111,6 @@ export default {
this.$refs.contractTableModal._pieOpen(res) this.$refs.contractTableModal._pieOpen(res)
}, },
_getData: async function() { _getData: async function() {
this.forObject.edateBegin = this.queryDate[0]
this.forObject.edateEnd = this.queryDate[1]
console.log('753951') console.log('753951')
console.log('选择时间后的请求', this.forObject) console.log('选择时间后的请求', this.forObject)
const result = await meterSample.pageCertificateRateStatistics( const result = await meterSample.pageCertificateRateStatistics(
......
...@@ -31,7 +31,9 @@ export default { ...@@ -31,7 +31,9 @@ export default {
return { return {
loading: true, loading: true,
formObj: { formObj: {
client: undefined client: undefined,
edateBegin: undefined,
edateEnd: undefined
}, },
pageColumns: [ pageColumns: [
{ title: '样品编号', key: 'code', width: 180 }, { title: '样品编号', key: 'code', width: 180 },
...@@ -55,6 +57,8 @@ export default { ...@@ -55,6 +57,8 @@ export default {
methods: { methods: {
// 日期变化时,将时间赋值,导出根据查询条件 // 日期变化时,将时间赋值,导出根据查询条件
_changeDate(data) { _changeDate(data) {
console.log(123456)
console.log(data)
$('input[name=beginDate]').val(data.beginDate) $('input[name=beginDate]').val(data.beginDate)
$('input[name=endDate]').val(data.endDate) $('input[name=endDate]').val(data.endDate)
$('input[name=type]').val('') $('input[name=type]').val('')
...@@ -70,6 +74,8 @@ export default { ...@@ -70,6 +74,8 @@ export default {
$('input[name=beginDate]').val(data.beginDate) $('input[name=beginDate]').val(data.beginDate)
$('input[name=endDate]').val(data.endDate) $('input[name=endDate]').val(data.endDate)
$('input[name=type]').val('') $('input[name=type]').val('')
this.formObj.edateBegin = data.beginDate
this.formObj.edateEnd = data.endDate
this._page() this._page()
}, },
_pieOpen(res) { _pieOpen(res) {
...@@ -82,6 +88,7 @@ export default { ...@@ -82,6 +88,7 @@ export default {
// }, // },
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('要传的参数', this.formObj)
const result = await meterSample.pageCertificateRateSample(this.formObj) const result = await meterSample.pageCertificateRateSample(this.formObj)
if (result) { if (result) {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment