Commit f9cb1da1 by wangweidong

Merge remote-tracking branch 'origin/dev' into dev

parents 3cdb341d d43f0059
...@@ -197,5 +197,7 @@ export default { ...@@ -197,5 +197,7 @@ export default {
getInExport: data => getInExport: data =>
http.get('soil/v1/alone_sample/get_in_export_' + data).then(res => res), http.get('soil/v1/alone_sample/get_in_export_' + data).then(res => res),
getOutExport: data => getOutExport: data =>
http.get('soil/v1/alone_sample/get_out_export_' + data).then(res => res) http.get('soil/v1/alone_sample/get_out_export_' + data).then(res => res),
experimentDelete: data =>
http.delete('soil/v1/experiment/?ids=' + data).then(res => res)
} }
...@@ -32,5 +32,7 @@ export default { ...@@ -32,5 +32,7 @@ export default {
.post('soil/v1/entrust/page_report_end_by_summary_report', data) .post('soil/v1/entrust/page_report_end_by_summary_report', data)
.then(res => res), .then(res => res),
reportDelete: data => reportDelete: data =>
http.delete('soil/v1/report/?ids=' + data).then(res => res) http.delete('soil/v1/report/?ids=' + data).then(res => res),
generateAppendix: data =>
http.post('soil/v1/exp_report/generate_appendix', data).then(res => res)
} }
...@@ -314,5 +314,7 @@ export default { ...@@ -314,5 +314,7 @@ export default {
.post('soil/v1/alone_in_out_stock/get_stay_date', data) .post('soil/v1/alone_in_out_stock/get_stay_date', data)
.then(res => res), .then(res => res),
outStorageBack: data => outStorageBack: data =>
http.post('soil/v1/alone_sample/out_storage_back', data).then(res => res) http.post('soil/v1/alone_sample/out_storage_back', data).then(res => res),
editSample: data =>
http.put('soil/v1/sample/' + data.id, data.obj).then(res => res)
} }
<template>
<div style="margin-top: 5px">
<quill-editor
ref="myTextEditor"
v-model="html"
:options="editorOption"
@change="onEditorChange($event)"></quill-editor>
</div>
</template>
<script>
export default {
props: ['html'],
data() {
return {
content: '',
editorOption: {
// 操作按钮
modules: {
toolbar: [
['bold', 'italic', 'underline'],
[{ header: 1 }, { header: 2 }],
[{ color: [] }],
['image']
]
},
placeholder: '请完善新闻详情'
}
}
},
methods: {
onEditorChange({ editor, html, text }) {
// 富文本编辑器 文本改变时 设置字段值
this.html = html
const data = {
html: this.html,
content: text
}
this.$emit('on-result-change', data)
}
}
}
</script>
<style>
.ql-container {
height: 300px !important;
}
.ql-snow {
border: 1px solid #dddee1 !important;
}
.ql-editor.ql-blank::before {
color: #bbbec4 /* rgba(0,0,0,0.6)*/;
font-style: normal;
}
.ql-toolbar.ql-snow {
border-radius: 5px 5px 0 0 !important;
}
.ql-container.ql-snow {
border-radius: 0 0 5px 5px !important;
border-top: none !important;
}
</style>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</Upload> </Upload>
</label> </label>
<Button @click="_batchUpload">批量上传</Button> <Button @click="_batchUpload">批量上传</Button>
<Button @click="_exportList()">列表导出</Button> <!-- <Button @click="_exportList()">列表导出</Button>-->
<!--一系列操作--> <!--一系列操作-->
<!--非表格--> <!--非表格-->
<!-- <Button v-if="viewStyle === 2 || viewStyle === 3" v-for="item in menusListA" :key="item.name" @click="_radioChange(item.value)"--> <!-- <Button v-if="viewStyle === 2 || viewStyle === 3" v-for="item in menusListA" :key="item.name" @click="_radioChange(item.value)"-->
...@@ -301,9 +301,9 @@ export default { ...@@ -301,9 +301,9 @@ export default {
break break
} }
}, },
_exportList() { // _exportList() {
console.log('列表导出') // console.log('列表导出')
}, // },
_iconClick(res, data) { _iconClick(res, data) {
switch (res) { switch (res) {
case '下载': case '下载':
......
<template>
<div>
<Modal v-model="showEditModal" :mask-closable="false" width="600">
<p slot="header">{{modalTitle}}</p>
<div>
<Upload
:action="action"
:show-upload-list="false"
:before-upload="_beupload"
multiple
>
<Button type="dashed" icon="ios-cloud-upload-outline">上传文件(小于50MB)</Button>
</Upload>
<div>
<Card :dis-hover="true" style="width: 100%;height: 400px;overflow: auto;">
<p slot="title">已上传文件列表</p>
<div v-for="(item,index) in fileList" :key="index" class="file-upload-list">
<div>
<div class="file-upload-list-cover">
<Icon @click.native.stop="_handleRemove(item)" type="md-trash" style="color: white;font-size: 20px;"></Icon>
</div>
</div>
{{item.fileName }}
</div>
</Card>
</div>
</div>
<div slot="footer" class="btn-width">
<Button @click="showEditModal = false">取消</Button>
<Button @click="_mutipleUpload" :loading="isLoading" type="primary">{{btnName}}</Button>
</div>
</Modal>
</div>
</template>
<script>
/**
* 上传文件,在文件夹下
*/
import axios from 'axios'
import global from '../../../api/config'
import loading from '../../../api/loading'
export default {
data() {
return {
id: '',
ID: '',
action: '',
modalTitle: '',
showEditModal: false,
name: '',
isLoading: false,
btnName: '上传',
fileList: []
}
},
methods: {
_open(obj) {
this.fileList = []
this.showEditModal = true
this.ID = obj
this.modalTitle = '上传文件'
},
_beupload(file) {
// 单个文件上传超过50M时,取消上传
const isLt50M = file.size / 1024 / 1024 < 50
const fileName = file.name.split('.')[0]
if (!isLt50M) {
this.$Message.warning({
content: '文件 ' + fileName + ' 大小超多50M,请重新上传!',
duration: 3
})
this.isLoading = false
} else {
// 动态循环给文件命名
const temObj = {
file: file,
fileName: fileName
}
this.fileList.push(temObj)
}
return false
},
_mutipleUpload() {
if (this.fileList.length > 0 && this.btnName === '上传') {
this.isLoading = true
this.btnName = '上传中...'
// 创建formula对象
const formData = new FormData()
formData.append('entrustId', this.ID)
// 多个文件
for (let i = 0; i < this.fileList.length; i++) {
formData.append('file' + i, this.fileList[i].file)
}
const config = {
headers: {
'Content-Type': 'multipart/form-data'
}
}
const instanceFile = axios.create()
instanceFile.defaults.withCredentials = true
// 发起请求
instanceFile
.post(
global.baseURL + '/soil/v1/entrust_annex/upload_bath/' + this.ID,
formData,
{
headers: config
}
)
.then(res => {
if (res.data.code === '1') {
this.$Message.success('上传成功!')
this.showEditModal = false
this.$emit('on-result-change')
} else if (res.data.code === '0') {
loading.toast.show(res.data.code, res.data.msg)
this.$Message.error('操作失败')
}
this._resetLoading()
})
.catch(err => {
console.log(err)
this._resetLoading()
})
} else {
this.$Message.warning('请至少上传一个文件')
this._resetLoading()
}
},
_resetLoading() {
this.isLoading = false
this.btnName = '上传'
},
// 删除对应的上传的文件
_handleRemove(data) {
const index = this.fileList.findIndex(item => item === data)
this.fileList.splice(index, 1)
}
}
}
</script>
<style>
.file-upload-list {
display: inline-block;
width: 100px;
height: 100px;
text-align: center;
line-height: 100px;
border: 1px solid transparent;
border-radius: 4px;
overflow: hidden;
background: #fff;
position: relative;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
margin-right: 4px;
}
.file-upload-list:hover .file-upload-list-cover {
display: block;
}
.file-upload-list-cover {
display: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.6);
}
</style>
<template>
<div>
<Modal v-model="showEditModal" :mask-closable="false" width="600">
<p slot="header">{{modalTitle}}</p>
<div>
<Upload
:action="action"
:show-upload-list="false"
:before-upload="_beupload"
multiple
>
<Button type="dashed" icon="ios-cloud-upload-outline">上传文件(小于50MB)</Button>
</Upload>
<div>
<Card :dis-hover="true" style="width: 100%;height: 400px;overflow: auto;">
<p slot="title">已上传文件列表</p>
<div v-for="(item,index) in fileList" :key="index" class="file-upload-list">
<div>
<div class="file-upload-list-cover">
<Icon @click.native.stop="_handleRemove(item)" type="md-trash" style="color: white;font-size: 20px;"></Icon>
</div>
</div>
{{item.fileName }}
</div>
</Card>
</div>
</div>
<div slot="footer" class="btn-width">
<Button @click="showEditModal = false">取消</Button>
<Button @click="_mutipleUpload" :loading="isLoading" type="primary">{{btnName}}</Button>
</div>
</Modal>
</div>
</template>
<script>
/**
* 上传文件,在文件夹下
*/
import axios from 'axios'
import global from '../../../api/config'
import loading from '../../../api/loading'
export default {
data() {
return {
id: '',
ID: '',
action: '',
modalTitle: '',
showEditModal: false,
name: '',
isLoading: false,
btnName: '上传',
fileList: []
}
},
methods: {
_open(obj) {
this.fileList = []
this.showEditModal = true
this.ID = obj
this.modalTitle = '文件上传'
},
_beupload(file) {
// 单个文件上传超过50M时,取消上传
const isLt50M = file.size / 1024 / 1024 < 50
const fileName = file.name.split('.')[0]
if (!isLt50M) {
this.$Message.warning({
content: '文件 ' + fileName + ' 大小超多50M,请重新上传!',
duration: 3
})
this.isLoading = false
} else {
// 动态循环给文件命名
const temObj = {
file: file,
fileName: fileName
}
this.fileList.push(temObj)
}
return false
},
_mutipleUpload() {
if (this.fileList.length > 0 && this.btnName === '上传') {
this.isLoading = true
this.btnName = '上传中...'
// 创建formula对象
const formData = new FormData()
formData.append('entrustId', this.ID)
// 多个文件
for (let i = 0; i < this.fileList.length; i++) {
formData.append('file' + i, this.fileList[i].file)
}
const config = {
headers: {
'Content-Type': 'multipart/form-data'
}
}
const instanceFile = axios.create()
instanceFile.defaults.withCredentials = true
// 发起请求
instanceFile
.post(
global.baseURL +
'/soil/v1/alone_sample_annex/upload_bath/' +
this.ID,
formData,
{
headers: config
}
)
.then(res => {
if (res.data.code === '1') {
this.$Message.success('上传成功!')
this.showEditModal = false
this.$emit('on-result-change')
} else if (res.data.code === '0') {
loading.toast.show(res.data.code, res.data.msg)
this.$Message.error('操作失败')
}
this._resetLoading()
})
.catch(err => {
console.log(err)
this._resetLoading()
})
} else {
this.$Message.warning('请至少上传一个文件')
this._resetLoading()
}
},
_resetLoading() {
this.isLoading = false
this.btnName = '上传'
},
// 删除对应的上传的文件
_handleRemove(data) {
const index = this.fileList.findIndex(item => item === data)
this.fileList.splice(index, 1)
}
}
}
</script>
<style>
.file-upload-list {
display: inline-block;
width: 100px;
height: 100px;
text-align: center;
line-height: 100px;
border: 1px solid transparent;
border-radius: 4px;
overflow: hidden;
background: #fff;
position: relative;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
margin-right: 4px;
}
.file-upload-list:hover .file-upload-list-cover {
display: block;
}
.file-upload-list-cover {
display: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.6);
}
</style>
<template>
<div>
<Modal v-model="showModal" :width="900" v-drag class="modal-footer-none zIndex-1100">
<p slot="header">{{modalTitle}}</p>
<div>
<FileManageCont ref="fileCont" :flag="flag"></FileManageCont>
</div>
</Modal>
</div>
</template>
<script>
import FileManageCont from './FileManageCont'
export default {
components: {
FileManageCont
},
props: {
// 只能删除自己的标识
flag: null
},
data() {
return {
showModal: false,
modalTitle: '附件管理'
}
},
methods: {
_open(id, key, title) {
this.showModal = true
if (title) {
this.modalTitle = title
} else {
this.modalTitle = '附件管理'
}
this.$refs.fileCont._open(id, key)
}
}
}
</script>
<template>
<div>
<!--内容-->
<Row>
<!--查询-->
<Col span="24" style="margin-bottom: -10px">
<Form :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="文件名称:">
<Input v-model="fileName" @on-enter="_search" placeholder="请输入文件名称"
style="width:200px" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_search" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<!--列表-->
<Col span="24">
<FilesList ref="fileModal" :fileName="fileName" @on-result-change="_fileData"></FilesList>
</Col>
</Row>
<!--删除提示框-->
<ModalConfirm ref="confirmModal" :content="modalContent" :btnModalList="btnModalList"
@on-result-change="_modalResult"></ModalConfirm>
</div>
</template>
<script>
import ModalConfirm from '../../base/ModalConfirm'
import { meterEntrust } from '../../../api'
import FilesList from './FilesList'
export default {
components: {
FilesList,
ModalConfirm
},
props: {
// 只能删除自己的标识
flag: null
},
data() {
return {
fileName: '',
selectIds: [],
getPage: {},
// ids
contractId: '',
sampleId: '',
subcontractorId: '',
originalRecordId: '',
curveId: '',
// 用于区分是哪种附件(合同、委托、样品)
idKey: '',
// 弹框的内容
modalContent: '',
btnModalList: [
{ type: '', name: '取消' },
{ type: 'primary', name: '确定' }
],
//
deleteId: [],
urlData: {}
}
},
methods: {
/**
* msg:表示是哪种附件(委托,样品,分包商)
* pageUrl:page 请求地址
* deleteUrl:删除请求地址
* uploadFileUrl:上传地址
* downloadFileUrl:下载地址
* uri:预览请求地址
* viewUri:预览图片地址
* downloadBatch:批量打包下载
*/
_open(id, key) {
this.fileName = ''
this.showModal = true
this.contractId = ''
this.sampleId = ''
this.subcontractorId = ''
this.originalRecordId = ''
this.curveId = ''
this.entrustId = ''
this.idKey = key
switch (key) {
// 委托
case 'contractId':
this.contractId = id
this.urlData = {
msg: 'FoodContractAttachment',
pageUrl: '/meter/v1/entrust_attachment/page',
deleteUrl: '/meter/v1/entrust_attachment/?ids=',
uploadFileUrl: '/meter/v1/entrust_attachment/upload/',
downloadFileUrl: '/meter/v1/entrust_attachment/download/',
downloadBatch: '/food/v1/contract_attachment/download_batch',
uri: 'FoodContractAttachment/getByContractId',
viewUri: '/meter/v1/entrust_attachment/preview/'
}
break
case 'entrustId':
this.entrustId = id
this.urlData = {
msg: 'FoodContractAttachment',
pageUrl: 'soil/v1/entrust_annex/page',
deleteUrl: '/soil/v1/entrust_annex/?ids=',
uploadFileUrl: '/soil/v1/entrust_annex/upload/',
downloadFileUrl: '/soil/v1/entrust_annex/download/',
downloadBatch: '/food/v1/contract_attachment/download_batch',
uri: 'FoodContractAttachment/getByContractId',
viewUri: '/soil/v1/standard_annex/preview/'
}
break
case 'aloneSampleId':
// 样品
this.entrustId = id
this.urlData = {
msg: 'FoodSampleAttachment',
pageUrl: 'soil/v1/alone_sample_annex/page',
deleteUrl: '/soil/v1/alone_sample_annex/?ids=',
uploadFileUrl: '/soil/v1/alone_sample_annex/upload/',
downloadFileUrl: '/soil/v1/alone_sample_annex/download/',
downloadBatch: '/food/v1/sample_attachment/download_batch',
uri: 'FoodSampleAttachment/getBySampleId',
viewUri: '/food/v1/sample_attachment/view'
}
break
case 'subcontractorId':
// 分包商
this.subcontractorId = id
this.urlData = {
msg: 'FoodSubContractAttachment',
pageUrl: '/meter/v1/contract_attachment/page',
deleteUrl: '/meter/v1/contract_attachment/?ids=',
uploadFileUrl: '/meter/v1/contract_attachment/upload/',
downloadFileUrl: '/meter/v1/contract_attachment/download/',
downloadBatch: '/food/v1/subcontractor_attachment/download_batch',
uri: 'FoodSubContractAttachment/getBySubcontractorId',
viewUri: '/food/v1/subcontractor_attachment/view'
}
break
case 'originalRecordId':
// 原始记录
this.originalRecordId = id
this.urlData = {
msg: 'FoodOriginalRecordAttachment',
pageUrl: 'FoodOriginalRecordAttachment/page',
deleteUrl: 'FoodOriginalRecordAttachment/deleteByIds',
uploadFileUrl: '/food/v1/original_attachment/',
downloadFileUrl: '/food/v1/original_attachment/download/',
downloadBatch: '/food/v1/original_attachment/download_batch',
uri: 'FoodOriginalRecordAttachment/getByOriginalRecordId',
viewUri: '/food/v1/original_attachment/preview'
}
break
case 'curveId':
// 采样记录
this.curveId = id
this.urlData = {
msg: 'ElnCurveAttachment',
pageUrl: 'ElnCurveAttachment/page',
deleteUrl: 'ElnCurveAttachment/deleteByIds',
uploadFileUrl: '/print/v1/curve_attachment/',
downloadFileUrl: '/print/v1/curve_attachment/download/',
downloadBatch: '/print/v1/curve_attachment/download_batch',
uri: 'ElnCurveAttachment/getById',
viewUri: '/print/v1/curve_attachment/view'
}
break
}
const idsObj = {
contractId: this.contractId,
sampleId: this.sampleId,
subcontractorId: this.subcontractorId,
originalRecordId: this.originalRecordId,
curveId: this.curveId,
entrustId: this.entrustId
}
this.$refs.fileModal._setUploadData(
Object.assign({ id: id }, this.urlData),
idsObj,
this.idKey
)
},
_deleteById(ids) {
this.deleteId = ids
this.modalContent = '确定要删除这 ' + ids.length + ' 个附件?'
this.$refs.confirmModal._openModal()
},
_delPage: async function(data) {
console.log(data)
const result = await meterEntrust.attachmentDelete(
this.urlData.deleteUrl,
data.id
)
if (result) {
this.$Message.success('删除成功!')
this.$refs.fileModal._page()
}
this.$refs.confirmModal._closeModal()
this.deleteId = []
},
// 删除提示框返回
_modalResult(msg) {
if (msg === '确定') {
// 删除一条记录
if (this.flag === undefined) {
// 只能删除自己上传的
this._delPage({ id: this.deleteId, flag: 1 })
} else {
// 可以删除全部
this._delPage({ id: this.deleteId })
}
}
},
_fileData(msg, data) {
switch (msg) {
case 'delete':
this._deleteById(data)
break
}
},
// 搜索
_search() {
this.$refs.fileModal._page(this.fileName)
}
}
}
</script>
<template>
<div>
<Modal v-model="showEditModal" :mask-closable="false" width="600">
<p slot="header">{{modalTitle}}</p>
<div>
<Upload
:action="action"
:show-upload-list="false"
:before-upload="_beupload"
multiple
>
<Button type="dashed" icon="ios-cloud-upload-outline">上传文件(小于50MB)</Button>
</Upload>
<div>
<Card :dis-hover="true" style="width: 100%;height: 400px;overflow: auto;">
<p slot="title">已上传文件列表</p>
<div v-for="(item,index) in fileList" :key="index" class="file-upload-list">
<div>
<div class="file-upload-list-cover">
<Icon @click.native.stop="_handleRemove(item)" type="md-trash" style="color: white;font-size: 20px;"></Icon>
</div>
</div>
{{item.fileName }}
</div>
</Card>
</div>
</div>
<div slot="footer" class="btn-width">
<Button @click="showEditModal = false">取消</Button>
<Button @click="_mutipleUpload" :loading="isLoading" type="primary">{{btnName}}</Button>
</div>
</Modal>
</div>
</template>
<script>
/**
* 上传文件,在文件夹下
*/
import axios from 'axios'
import global from '../../../api/config'
import loading from '../../../api/loading'
export default {
data() {
return {
id: '',
ID: '',
action: '',
modalTitle: '',
showEditModal: false,
name: '',
isLoading: false,
btnName: '上传',
fileList: []
}
},
methods: {
_open(obj) {
this.fileList = []
this.showEditModal = true
this.ID = obj
this.modalTitle = '上传文件'
},
_beupload(file) {
// 单个文件上传超过50M时,取消上传
const isLt50M = file.size / 1024 / 1024 < 50
const fileName = file.name.split('.')[0]
if (!isLt50M) {
this.$Message.warning({
content: '文件 ' + fileName + ' 大小超多50M,请重新上传!',
duration: 3
})
this.isLoading = false
} else {
// 动态循环给文件命名
const temObj = {
file: file,
fileName: fileName
}
this.fileList.push(temObj)
}
return false
},
_mutipleUpload() {
if (this.fileList.length > 0 && this.btnName === '上传') {
this.isLoading = true
this.btnName = '上传中...'
// 创建formula对象
const formData = new FormData()
formData.append('entrustId', this.ID)
// 多个文件
for (let i = 0; i < this.fileList.length; i++) {
formData.append('file' + i, this.fileList[i].file)
}
const config = {
headers: {
'Content-Type': 'multipart/form-data'
}
}
const instanceFile = axios.create()
instanceFile.defaults.withCredentials = true
// 发起请求
instanceFile
.post(
global.baseURL + '/soil/v1/entrust_annex/upload_bath/' + this.ID,
formData,
{
headers: config
}
)
.then(res => {
if (res.data.code === '1') {
this.$Message.success('上传成功!')
this.showEditModal = false
this.$emit('on-result-change')
} else if (res.data.code === '0') {
loading.toast.show(res.data.code, res.data.msg)
this.$Message.error('操作失败')
}
this._resetLoading()
})
.catch(err => {
console.log(err)
this._resetLoading()
})
} else {
this.$Message.warning('请至少上传一个文件')
this._resetLoading()
}
},
_resetLoading() {
this.isLoading = false
this.btnName = '上传'
},
// 删除对应的上传的文件
_handleRemove(data) {
const index = this.fileList.findIndex(item => item === data)
this.fileList.splice(index, 1)
}
}
}
</script>
<style>
.file-upload-list {
display: inline-block;
width: 100px;
height: 100px;
text-align: center;
line-height: 100px;
border: 1px solid transparent;
border-radius: 4px;
overflow: hidden;
background: #fff;
position: relative;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
margin-right: 4px;
}
.file-upload-list:hover .file-upload-list-cover {
display: block;
}
.file-upload-list-cover {
display: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.6);
}
</style>
<template>
<div>
<Modal v-model="showEditModal" :mask-closable="false" width="600">
<p slot="header">{{modalTitle}}</p>
<div>
<Upload
:action="action"
:show-upload-list="false"
:before-upload="_beupload"
multiple
>
<Button type="dashed" icon="ios-cloud-upload-outline">上传文件(小于50MB)</Button>
</Upload>
<div>
<Card :dis-hover="true" style="width: 100%;height: 400px;overflow: auto;">
<p slot="title">已上传文件列表</p>
<div v-for="(item,index) in fileList" :key="index" class="file-upload-list">
<div>
<div class="file-upload-list-cover">
<Icon @click.native.stop="_handleRemove(item)" type="md-trash" style="color: white;font-size: 20px;"></Icon>
</div>
</div>
{{item.fileName }}
</div>
</Card>
</div>
</div>
<div slot="footer" class="btn-width">
<Button @click="showEditModal = false">取消</Button>
<Button @click="_mutipleUpload" :loading="isLoading" type="primary">{{btnName}}</Button>
</div>
</Modal>
</div>
</template>
<script>
/**
* 上传文件,在文件夹下
*/
import axios from 'axios'
import global from '../../../api/config'
import loading from '../../../api/loading'
export default {
data() {
return {
id: '',
ID: '',
action: '',
modalTitle: '',
showEditModal: false,
name: '',
isLoading: false,
btnName: '上传',
fileList: []
}
},
methods: {
_open(obj) {
this.fileList = []
this.showEditModal = true
this.ID = obj
this.modalTitle = '文件上传'
},
_beupload(file) {
// 单个文件上传超过50M时,取消上传
const isLt50M = file.size / 1024 / 1024 < 50
const fileName = file.name.split('.')[0]
if (!isLt50M) {
this.$Message.warning({
content: '文件 ' + fileName + ' 大小超多50M,请重新上传!',
duration: 3
})
this.isLoading = false
} else {
// 动态循环给文件命名
const temObj = {
file: file,
fileName: fileName
}
this.fileList.push(temObj)
}
return false
},
_mutipleUpload() {
if (this.fileList.length > 0 && this.btnName === '上传') {
this.isLoading = true
this.btnName = '上传中...'
// 创建formula对象
const formData = new FormData()
formData.append('entrustId', this.ID)
// 多个文件
for (let i = 0; i < this.fileList.length; i++) {
formData.append('file' + i, this.fileList[i].file)
}
const config = {
headers: {
'Content-Type': 'multipart/form-data'
}
}
const instanceFile = axios.create()
instanceFile.defaults.withCredentials = true
// 发起请求
instanceFile
.post(
global.baseURL +
'/soil/v1/alone_sample_annex/upload_bath/' +
this.ID,
formData,
{
headers: config
}
)
.then(res => {
if (res.data.code === '1') {
this.$Message.success('上传成功!')
this.showEditModal = false
this.$emit('on-result-change')
} else if (res.data.code === '0') {
loading.toast.show(res.data.code, res.data.msg)
this.$Message.error('操作失败')
}
this._resetLoading()
})
.catch(err => {
console.log(err)
this._resetLoading()
})
} else {
this.$Message.warning('请至少上传一个文件')
this._resetLoading()
}
},
_resetLoading() {
this.isLoading = false
this.btnName = '上传'
},
// 删除对应的上传的文件
_handleRemove(data) {
const index = this.fileList.findIndex(item => item === data)
this.fileList.splice(index, 1)
}
}
}
</script>
<style>
.file-upload-list {
display: inline-block;
width: 100px;
height: 100px;
text-align: center;
line-height: 100px;
border: 1px solid transparent;
border-radius: 4px;
overflow: hidden;
background: #fff;
position: relative;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
margin-right: 4px;
}
.file-upload-list:hover .file-upload-list-cover {
display: block;
}
.file-upload-list-cover {
display: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.6);
}
</style>
<template>
<div>
<Modal v-model="showModal" :width="900" v-drag class="modal-footer-none zIndex-1100">
<p slot="header">{{modalTitle}}</p>
<div>
<FileManageCont ref="fileCont" :flag="flag"></FileManageCont>
</div>
</Modal>
</div>
</template>
<script>
import FileManageCont from './FileManageCont'
export default {
components: {
FileManageCont
},
props: {
// 只能删除自己的标识
flag: null
},
data() {
return {
showModal: false,
modalTitle: '附件管理'
}
},
methods: {
_open(id, key, title) {
this.showModal = true
if (title) {
this.modalTitle = title
} else {
this.modalTitle = '附件管理'
}
this.$refs.fileCont._open(id, key)
}
}
}
</script>
<template>
<div>
<!--内容-->
<Row>
<!--查询-->
<Col span="24" style="margin-bottom: -10px">
<Form :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="文件名称:">
<Input v-model="fileName" @on-enter="_search" placeholder="请输入文件名称"
style="width:200px" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_search" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<!--列表-->
<Col span="24">
<FilesList ref="fileModal" :fileName="fileName" @on-result-change="_fileData"></FilesList>
</Col>
</Row>
<!--删除提示框-->
<ModalConfirm ref="confirmModal" :content="modalContent" :btnModalList="btnModalList"
@on-result-change="_modalResult"></ModalConfirm>
</div>
</template>
<script>
import ModalConfirm from '../../base/ModalConfirm'
import { meterEntrust } from '../../../api'
import FilesList from './FilesList'
export default {
components: {
FilesList,
ModalConfirm
},
props: {
// 只能删除自己的标识
flag: null
},
data() {
return {
fileName: '',
selectIds: [],
getPage: {},
// ids
contractId: '',
sampleId: '',
subcontractorId: '',
originalRecordId: '',
curveId: '',
// 用于区分是哪种附件(合同、委托、样品)
idKey: '',
// 弹框的内容
modalContent: '',
btnModalList: [
{ type: '', name: '取消' },
{ type: 'primary', name: '确定' }
],
//
deleteId: [],
urlData: {}
}
},
methods: {
/**
* msg:表示是哪种附件(委托,样品,分包商)
* pageUrl:page 请求地址
* deleteUrl:删除请求地址
* uploadFileUrl:上传地址
* downloadFileUrl:下载地址
* uri:预览请求地址
* viewUri:预览图片地址
* downloadBatch:批量打包下载
*/
_open(id, key) {
this.fileName = ''
this.showModal = true
this.contractId = ''
this.sampleId = ''
this.subcontractorId = ''
this.originalRecordId = ''
this.curveId = ''
this.entrustId = ''
this.idKey = key
switch (key) {
// 委托
case 'contractId':
this.contractId = id
this.urlData = {
msg: 'FoodContractAttachment',
pageUrl: '/meter/v1/entrust_attachment/page',
deleteUrl: '/meter/v1/entrust_attachment/?ids=',
uploadFileUrl: '/meter/v1/entrust_attachment/upload/',
downloadFileUrl: '/meter/v1/entrust_attachment/download/',
downloadBatch: '/food/v1/contract_attachment/download_batch',
uri: 'FoodContractAttachment/getByContractId',
viewUri: '/meter/v1/entrust_attachment/preview/'
}
break
case 'entrustId':
this.entrustId = id
this.urlData = {
msg: 'FoodContractAttachment',
pageUrl: 'soil/v1/entrust_annex/page',
deleteUrl: '/soil/v1/entrust_annex/?ids=',
uploadFileUrl: '/soil/v1/entrust_annex/upload/',
downloadFileUrl: '/soil/v1/entrust_annex/download/',
downloadBatch: '/food/v1/contract_attachment/download_batch',
uri: 'FoodContractAttachment/getByContractId',
viewUri: '/soil/v1/standard_annex/preview/'
}
break
case 'aloneSampleId':
// 样品
this.entrustId = id
this.urlData = {
msg: 'FoodSampleAttachment',
pageUrl: 'soil/v1/alone_sample_annex/page',
deleteUrl: '/soil/v1/alone_sample_annex/?ids=',
uploadFileUrl: '/soil/v1/alone_sample_annex/upload/',
downloadFileUrl: '/soil/v1/alone_sample_annex/download/',
downloadBatch: '/food/v1/sample_attachment/download_batch',
uri: 'FoodSampleAttachment/getBySampleId',
viewUri: '/food/v1/sample_attachment/view'
}
break
case 'subcontractorId':
// 分包商
this.subcontractorId = id
this.urlData = {
msg: 'FoodSubContractAttachment',
pageUrl: '/meter/v1/contract_attachment/page',
deleteUrl: '/meter/v1/contract_attachment/?ids=',
uploadFileUrl: '/meter/v1/contract_attachment/upload/',
downloadFileUrl: '/meter/v1/contract_attachment/download/',
downloadBatch: '/food/v1/subcontractor_attachment/download_batch',
uri: 'FoodSubContractAttachment/getBySubcontractorId',
viewUri: '/food/v1/subcontractor_attachment/view'
}
break
case 'originalRecordId':
// 原始记录
this.originalRecordId = id
this.urlData = {
msg: 'FoodOriginalRecordAttachment',
pageUrl: 'FoodOriginalRecordAttachment/page',
deleteUrl: 'FoodOriginalRecordAttachment/deleteByIds',
uploadFileUrl: '/food/v1/original_attachment/',
downloadFileUrl: '/food/v1/original_attachment/download/',
downloadBatch: '/food/v1/original_attachment/download_batch',
uri: 'FoodOriginalRecordAttachment/getByOriginalRecordId',
viewUri: '/food/v1/original_attachment/preview'
}
break
case 'curveId':
// 采样记录
this.curveId = id
this.urlData = {
msg: 'ElnCurveAttachment',
pageUrl: 'ElnCurveAttachment/page',
deleteUrl: 'ElnCurveAttachment/deleteByIds',
uploadFileUrl: '/print/v1/curve_attachment/',
downloadFileUrl: '/print/v1/curve_attachment/download/',
downloadBatch: '/print/v1/curve_attachment/download_batch',
uri: 'ElnCurveAttachment/getById',
viewUri: '/print/v1/curve_attachment/view'
}
break
}
const idsObj = {
contractId: this.contractId,
sampleId: this.sampleId,
subcontractorId: this.subcontractorId,
originalRecordId: this.originalRecordId,
curveId: this.curveId,
entrustId: this.entrustId
}
this.$refs.fileModal._setUploadData(
Object.assign({ id: id }, this.urlData),
idsObj,
this.idKey
)
},
_deleteById(ids) {
this.deleteId = ids
this.modalContent = '确定要删除这 ' + ids.length + ' 个附件?'
this.$refs.confirmModal._openModal()
},
_delPage: async function(data) {
console.log(data)
const result = await meterEntrust.attachmentDelete(
this.urlData.deleteUrl,
data.id
)
if (result) {
this.$Message.success('删除成功!')
this.$refs.fileModal._page()
}
this.$refs.confirmModal._closeModal()
this.deleteId = []
},
// 删除提示框返回
_modalResult(msg) {
if (msg === '确定') {
// 删除一条记录
if (this.flag === undefined) {
// 只能删除自己上传的
this._delPage({ id: this.deleteId, flag: 1 })
} else {
// 可以删除全部
this._delPage({ id: this.deleteId })
}
}
},
_fileData(msg, data) {
switch (msg) {
case 'delete':
this._deleteById(data)
break
}
},
// 搜索
_search() {
this.$refs.fileModal._page(this.fileName)
}
}
}
</script>
// docker测试环境 请求地址
WEB_URL=http://soil.docker.com
BASE_URL=http://api.docker.com
SSO_URL=http://sso.docker.com
STATIC_URL=http://static.docker.com
RECORD_URL=http://record.patzn.com
NC_URL=http://123.133.38.68:8088
...@@ -100,7 +100,6 @@ module.exports = { ...@@ -100,7 +100,6 @@ module.exports = {
{ src: '~/plugins/common.js', ssr: true }, { src: '~/plugins/common.js', ssr: true },
{ src: '~/plugins/drag.js', ssr: true }, { src: '~/plugins/drag.js', ssr: true },
{ src: '~/plugins/global.js', ssr: true }, { src: '~/plugins/global.js', ssr: true },
{ src: '~/plugins/editor.js', ssr: false },
{ src: '@/plugins/gallery.js', ssr: false }, { src: '@/plugins/gallery.js', ssr: false },
{ src: '@/plugins/ieCharts.js', ssr: false }, { src: '@/plugins/ieCharts.js', ssr: false },
{ src: '@/plugins/fullcalendar.js', ssr: false } { src: '@/plugins/fullcalendar.js', ssr: false }
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"build": "nuxt build", "build": "nuxt build",
"start": "cross-env NODE_ENV=production node server/index.js", "start": "cross-env NODE_ENV=production node server/index.js",
"zhyf": "cross-env NODE_ENV=zhyf STATIC_URL=http://static.lims.com nuxt build", "zhyf": "cross-env NODE_ENV=zhyf STATIC_URL=http://static.lims.com nuxt build",
"dockertest": "cross-env NODE_ENV=dockertest STATIC_URL=http://static.docker.com nuxt build",
"test": "cross-env NODE_ENV=testing node server/index.js", "test": "cross-env NODE_ENV=testing node server/index.js",
"pertest": "cross-env NODE_ENV=pertesting node server/index.js", "pertest": "cross-env NODE_ENV=pertesting node server/index.js",
"devtest": "cross-env NODE_ENV=devtest node server/index.js", "devtest": "cross-env NODE_ENV=devtest node server/index.js",
...@@ -43,7 +44,6 @@ ...@@ -43,7 +44,6 @@
"vue-echarts-v3": "^2.0.1", "vue-echarts-v3": "^2.0.1",
"vue-full-calendar": "^2.8.1-0", "vue-full-calendar": "^2.8.1-0",
"vue-gallery-slideshow": "^1.3.1", "vue-gallery-slideshow": "^1.3.1",
"vue-quill-editor": "^3.0.6",
"vue-runtime-helpers": "^1.1.2", "vue-runtime-helpers": "^1.1.2",
"vxe-table": "^2.9.11", "vxe-table": "^2.9.11",
"vxe-utils": "^1.9.3", "vxe-utils": "^1.9.3",
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<Row> <Row>
<!--查询--> <!--查询-->
<Col span="24" style="margin-top: 10px"> <Col span="24" style="margin-top: 10px">
<Form id="search-form" :label-width="50" inline onsubmit="return false"> <Form id="search-form" :label-width="80" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="width-23" label="位置:"> <Form-item class="width-23" label="位置:">
<input name="type" type="hidden" value=0> <input name="type" type="hidden" value=0>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
@on-result-change="_cusNameChange" name="client" placeholder="请输入或选择委托单位" @on-result-change="_cusNameChange" name="client" placeholder="请输入或选择委托单位"
></AutoComplete> ></AutoComplete>
</Form-item> </Form-item>
<Form-item label="委托日期" prop="entrustDate" class="width-48"> <Form-item label="委托日期" prop="entrustDate" class="width-48">
<Date-picker v-model="formObj.entrustDate" @on-change="_ctimeChange" type="date" split-panels style="width:100%;" <Date-picker v-model="formObj.entrustDate" @on-change="_ctimeChange" type="date" split-panels style="width:100%;"
placeholder="请选择委托日期" name="entrustDate"></Date-picker> placeholder="请选择委托日期" name="entrustDate"></Date-picker>
</Form-item> </Form-item>
...@@ -44,11 +44,11 @@ ...@@ -44,11 +44,11 @@
<Form-item @click.native="_selectPerson" label="制表人" prop="tabulater" class="width-48"> <Form-item @click.native="_selectPerson" label="制表人" prop="tabulater" class="width-48">
<Input v-model="formObj.tabulater" name="tabulater" placeholder="请输入名称"/> <Input v-model="formObj.tabulater" name="tabulater" placeholder="请输入名称"/>
</Form-item> </Form-item>
<Form-item label="制单日期" prop="tabulateDate" class="width-48"> <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%;" <Date-picker v-model="formObj.tabulateDate" @on-change="_tabulateChange" name="tabulateDate" type="date" split-panels style="width:100%;"
placeholder="请选择委托日期"></Date-picker> placeholder="请选择委托日期"></Date-picker>
</Form-item> </Form-item>
<Form-item label="检验类别" prop="testType" class="width-48"> <Form-item label="检验类别" prop="testType" class="width-48">
<el-select v-model="formObj.testType" @change="typeChange" name="testType" placeholder="请选择" <el-select v-model="formObj.testType" @change="typeChange" name="testType" placeholder="请选择"
size="small" size="small"
style="width:100%" style="width:100%"
......
<template> <template>
<div> <div>
<el-dialog <Modal
v-drag v-drag
:visible.sync="showModal" v-model="showModal"
append-to-body append-to-body
title="流程启动表单" title="流程启动表单"
width="1000px" width="1000px"
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div slot="footer"> <div slot="footer">
<modal-footer ref="footerModal" :footer="footerList" @on-result-change="_footerResult" /> <modal-footer ref="footerModal" :footer="footerList" @on-result-change="_footerResult" />
</div> </div>
</el-dialog> </Modal>
</div> </div>
</template> </template>
......
...@@ -57,6 +57,8 @@ ...@@ -57,6 +57,8 @@
import { soilEntrust, soilSample } from '../../api' import { soilEntrust, soilSample } from '../../api'
import Operation from '../../components/operation/Operation' import Operation from '../../components/operation/Operation'
import importModal from '../../components/import/DownloadTemplateImport' import importModal from '../../components/import/DownloadTemplateImport'
import photoManage from '../../components/file/instock-file-manage/FileManage'
import sampleFileManage from '../../components/file/sample-file-manage/FileManage'
import EntrustRegisterEdit from './EntrustRegisterEdit' import EntrustRegisterEdit from './EntrustRegisterEdit'
import RegisterDetail from './RegisterDetail' import RegisterDetail from './RegisterDetail'
import ViewDetail from './ViewDetail' import ViewDetail from './ViewDetail'
...@@ -74,7 +76,11 @@ export default { ...@@ -74,7 +76,11 @@ export default {
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
ViewDetail, ViewDetail,
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
Instock Instock,
// eslint-disable-next-line vue/no-unused-components
sampleFileManage,
// eslint-disable-next-line vue/no-unused-components
photoManage
}, },
data() { data() {
return { return {
...@@ -251,7 +257,7 @@ export default { ...@@ -251,7 +257,7 @@ export default {
}, },
_uploadPhoto(data) { _uploadPhoto(data) {
// 上传照片文件 // 上传照片文件
this.currentComponent = 'FileManage' this.currentComponent = 'photoManage'
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.refModal._open(data.id, 'aloneSampleId', '照片管理') this.$refs.refModal._open(data.id, 'aloneSampleId', '照片管理')
}) })
...@@ -404,7 +410,7 @@ export default { ...@@ -404,7 +410,7 @@ export default {
}, },
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.currentComponent = 'FileManage' this.currentComponent = 'sampleFileManage'
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.refModal._open(id, 'aloneSampleId') this.$refs.refModal._open(id, 'aloneSampleId')
}) })
......
...@@ -53,11 +53,23 @@ ...@@ -53,11 +53,23 @@
<script> <script>
import { soilAptitude, soilEntrust, soilSample } from '../../api' import { soilAptitude, soilEntrust, soilSample } from '../../api'
import MeterEntrustRecord from '../../components/operation/Operation' import MeterEntrustRecord from '../../components/operation/Operation'
import SampleFileManage from '../../components/file/sample-file-manage/FileManage'
import SamplePhotoManage from '../../components/file/instock-file-manage/FileManage'
import ViewDetail from './ViewDetail' import ViewDetail from './ViewDetail'
import CreateReport from './CreateReport' import CreateReport from './CreateReport'
export default { export default {
// eslint-disable-next-line vue/no-unused-components components: {
components: { MeterEntrustRecord, ViewDetail, CreateReport }, // eslint-disable-next-line vue/no-unused-components
MeterEntrustRecord,
// eslint-disable-next-line vue/no-unused-components
ViewDetail,
// eslint-disable-next-line vue/no-unused-components
CreateReport,
// eslint-disable-next-line vue/no-unused-components
SampleFileManage,
// eslint-disable-next-line vue/no-unused-components
SamplePhotoManage
},
data() { data() {
return { return {
currentComponent: '', currentComponent: '',
...@@ -82,6 +94,11 @@ export default { ...@@ -82,6 +94,11 @@ export default {
name: '导出入库资料' name: '导出入库资料'
}, },
{ {
type: 'ios-camera',
id: '',
name: '照片'
},
{
type: 'ios-cloud', type: 'ios-cloud',
id: 'instock-his-upload', id: 'instock-his-upload',
name: '附件' name: '附件'
...@@ -152,6 +169,9 @@ export default { ...@@ -152,6 +169,9 @@ export default {
case '资质项目': case '资质项目':
this._itemModal(data.id) this._itemModal(data.id)
break break
case '照片':
this._uploadPhoto(data.id)
break
case '附件': case '附件':
this._upload(data.id) this._upload(data.id)
break break
...@@ -341,10 +361,17 @@ export default { ...@@ -341,10 +361,17 @@ export default {
_itemModal(data) { _itemModal(data) {
this.$refs.refModal._open(data) this.$refs.refModal._open(data)
}, },
_uploadPhoto(data) {
// 上传照片文件
this.currentComponent = 'SamplePhotoManage'
this.$nextTick(() => {
this.$refs.refModal._open(data, 'aloneSampleId', '照片管理')
})
// this.$refs.PhotoManage._open(id, 'entrustId')
},
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.currentComponent = 'FileManage' this.currentComponent = 'SampleFileManage'
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.refModal._open(id, 'aloneSampleId') this.$refs.refModal._open(id, 'aloneSampleId')
}) })
......
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
</Form-item> </Form-item>
<Form-item label="留存有效期:" prop="keepLimitTime" style="width: 100%;"> <Form-item label="留存有效期:" prop="keepLimitTime" style="width: 100%;">
<!-- <Date-picker v-model="formObj.keepLimitTime" @on-change="_keepLimitTimeChange" type="date" split-panels style="width:100%;"--> <Date-picker v-model="formObj.keepLimitTime" @on-change="_keepLimitTimeChange" type="date" split-panels style="width:100%;"
<!-- placeholder="请选择入库时间" name="keepLimitTime"></Date-picker>--> placeholder="请选择入库时间" name="keepLimitTime"></Date-picker>
<Select v-model="formObj.keepLimit" clearable name="keepLimit" style="width:150px" placeholder="请选择期限"> <!-- <Select v-model="formObj.keepLimit" clearable name="keepLimit" style="width:150px" placeholder="请选择期限">-->
<Option v-for="(item,index) in itemData" :value="item.value" :key="index">{{item.name}}</Option> <!-- <Option v-for="(item,index) in itemData" :value="item.value" :key="index">{{item.name}}</Option>-->
</Select> <!-- </Select>-->
</Form-item> </Form-item>
</Form> </Form>
</div> </div>
......
...@@ -60,6 +60,8 @@ ...@@ -60,6 +60,8 @@
import { soilEntrust, soilSample } from '../../../api' import { soilEntrust, soilSample } from '../../../api'
import Operation from '../../../components/operation/Operation' import Operation from '../../../components/operation/Operation'
import importModal from '../../../components/import/DownloadTemplateImport' import importModal from '../../../components/import/DownloadTemplateImport'
import SampleFileManage from '../../../components/file/sample-file-manage/FileManage'
import SamplePhotoManage from '../../../components/file/instock-file-manage/FileManage'
import EntrustRegisterEdit from './EntrustRegisterEdit' import EntrustRegisterEdit from './EntrustRegisterEdit'
import RegisterDetail from './RegisterDetail' import RegisterDetail from './RegisterDetail'
import ViewDetail from './ViewDetail' import ViewDetail from './ViewDetail'
...@@ -77,7 +79,11 @@ export default { ...@@ -77,7 +79,11 @@ export default {
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
ViewDetail, ViewDetail,
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
Outstock Outstock,
// eslint-disable-next-line vue/no-unused-components
SampleFileManage,
// eslint-disable-next-line vue/no-unused-components
SamplePhotoManage
}, },
data() { data() {
return { return {
...@@ -108,6 +114,11 @@ export default { ...@@ -108,6 +114,11 @@ export default {
name: '附件' name: '附件'
}, },
{ {
type: 'ios-camera',
id: '',
name: '照片'
},
{
type: 'md-remove-circle', type: 'md-remove-circle',
id: 'outstock-delete', id: 'outstock-delete',
name: '删除' name: '删除'
...@@ -235,6 +246,9 @@ export default { ...@@ -235,6 +246,9 @@ export default {
case '附件': case '附件':
this._upload(data.id) this._upload(data.id)
break break
case '照片':
this._uploadPhoto(data.id)
break
case '删除': case '删除':
this._deleteByIds([data.id]) this._deleteByIds([data.id])
break break
...@@ -390,9 +404,17 @@ export default { ...@@ -390,9 +404,17 @@ export default {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
} }
}, },
_uploadPhoto(data) {
// 上传照片文件
this.currentComponent = 'SamplePhotoManage'
this.$nextTick(() => {
this.$refs.refModal._open(data, 'aloneSampleId', '照片管理')
})
// this.$refs.PhotoManage._open(id, 'entrustId')
},
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.currentComponent = 'FileManage' this.currentComponent = 'SampleFileManage'
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.refModal._open(id, 'aloneSampleId') this.$refs.refModal._open(id, 'aloneSampleId')
}) })
......
...@@ -53,11 +53,23 @@ ...@@ -53,11 +53,23 @@
<script> <script>
import { soilAptitude, soilEntrust, soilSample } from '../../../api' import { soilAptitude, soilEntrust, soilSample } from '../../../api'
import MeterEntrustRecord from '../../../components/operation/Operation' import MeterEntrustRecord from '../../../components/operation/Operation'
import SampleFileManage from '../../../components/file/sample-file-manage/FileManage'
import SamplePhotoManage from '../../../components/file/instock-file-manage/FileManage'
import ViewDetail from './ViewDetail' import ViewDetail from './ViewDetail'
import CreateReport from './CreateReport' import CreateReport from './CreateReport'
export default { export default {
// eslint-disable-next-line vue/no-unused-components components: {
components: { MeterEntrustRecord, ViewDetail, CreateReport }, // eslint-disable-next-line vue/no-unused-components
MeterEntrustRecord,
// eslint-disable-next-line vue/no-unused-components
ViewDetail,
// eslint-disable-next-line vue/no-unused-components
CreateReport,
// eslint-disable-next-line vue/no-unused-components
SampleFileManage,
// eslint-disable-next-line vue/no-unused-components
SamplePhotoManage
},
data() { data() {
return { return {
currentComponent: '', currentComponent: '',
...@@ -87,6 +99,11 @@ export default { ...@@ -87,6 +99,11 @@ export default {
name: '附件' name: '附件'
}, },
{ {
type: 'ios-camera',
id: '',
name: '照片'
},
{
type: 'ios-cloud-download', type: 'ios-cloud-download',
id: 'outstock-his-export', id: 'outstock-his-export',
name: '导出出库资料' name: '导出出库资料'
...@@ -162,6 +179,9 @@ export default { ...@@ -162,6 +179,9 @@ export default {
case '附件': case '附件':
this._upload(data.id) this._upload(data.id)
break break
case '照片':
this._uploadPhoto(data.id)
break
case '删除': case '删除':
this._deleteByIds([data.id]) this._deleteByIds([data.id])
break break
...@@ -353,10 +373,17 @@ export default { ...@@ -353,10 +373,17 @@ export default {
_itemModal(data) { _itemModal(data) {
this.$refs.refModal._open(data) this.$refs.refModal._open(data)
}, },
_uploadPhoto(data) {
// 上传照片文件
this.currentComponent = 'SamplePhotoManage'
this.$nextTick(() => {
this.$refs.refModal._open(data, 'aloneSampleId', '照片管理')
})
// this.$refs.PhotoManage._open(id, 'entrustId')
},
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.currentComponent = 'FileManage' this.currentComponent = 'SampleFileManage'
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.refModal._open(id, 'aloneSampleId') this.$refs.refModal._open(id, 'aloneSampleId')
}) })
......
...@@ -71,6 +71,8 @@ ...@@ -71,6 +71,8 @@
<FileManage ref="FileManage" @on-result-change="_page"></FileManage> <FileManage ref="FileManage" @on-result-change="_page"></FileManage>
<BatchModal ref="batchModal" @on-result-change="_page"></BatchModal> <BatchModal ref="batchModal" @on-result-change="_page"></BatchModal>
<stockSampleEdit ref="editModal" @on-result-change="_page"></stockSampleEdit> <stockSampleEdit ref="editModal" @on-result-change="_page"></stockSampleEdit>
<SampleFileManage ref="SampleFileManage" @on-result-change="_page"></SampleFileManage>
<SamplePhotoManage ref="SamplePhotoManage" @on-result-change="_page"></SamplePhotoManage>
</div> </div>
</template> </template>
...@@ -78,6 +80,8 @@ ...@@ -78,6 +80,8 @@
import { soilEntrust, soilSample } from '../../../api' import { soilEntrust, soilSample } from '../../../api'
import ViewDetail from '../../soil-alone-sample/ViewDetail' import ViewDetail from '../../soil-alone-sample/ViewDetail'
import Outstock from '../soil-alone-sample-outstock/Outstock' import Outstock from '../soil-alone-sample-outstock/Outstock'
import SampleFileManage from '../../../components/file/sample-file-manage/FileManage'
import SamplePhotoManage from '../../../components/file/instock-file-manage/FileManage'
import ViewSample from './ViewLocationEntrust' import ViewSample from './ViewLocationEntrust'
import stockSampleEdit from './stockSampleEdit' import stockSampleEdit from './stockSampleEdit'
import BatchModal from './BatchModal' import BatchModal from './BatchModal'
...@@ -87,7 +91,9 @@ export default { ...@@ -87,7 +91,9 @@ export default {
ViewSample, ViewSample,
ViewDetail, ViewDetail,
BatchModal, BatchModal,
Outstock Outstock,
SampleFileManage,
SamplePhotoManage
}, },
data() { data() {
return { return {
...@@ -133,6 +139,11 @@ export default { ...@@ -133,6 +139,11 @@ export default {
name: '查看' name: '查看'
}, },
{ {
type: 'ios-camera',
id: '',
name: '照片'
},
{
type: 'md-cloud', type: 'md-cloud',
id: 'storehouse-sample-upload', id: 'storehouse-sample-upload',
name: '附件' name: '附件'
...@@ -236,6 +247,9 @@ export default { ...@@ -236,6 +247,9 @@ export default {
case '查看': case '查看':
this._viewModal(true, data.id) this._viewModal(true, data.id)
break break
case '照片':
this._uploadPhoto(data.id)
break
case '附件': case '附件':
this._upload(data.id) this._upload(data.id)
break break
...@@ -245,9 +259,14 @@ export default { ...@@ -245,9 +259,14 @@ export default {
} }
}) })
}, },
_uploadPhoto(data) {
// 上传照片文件
this.$refs.SamplePhotoManage._open(data, 'aloneSampleId', '照片管理')
// this.$refs.PhotoManage._open(id, 'entrustId')
},
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'aloneSampleId') this.$refs.SampleFileManage._open(id, 'aloneSampleId')
}, },
_viewModal(edit, id) { _viewModal(edit, id) {
if (edit) { if (edit) {
......
...@@ -82,6 +82,8 @@ ...@@ -82,6 +82,8 @@
<FileManage ref="FileManage" @on-result-change="_page"></FileManage> <FileManage ref="FileManage" @on-result-change="_page"></FileManage>
<BatchModal ref="batchModal" @on-result-change="_page"></BatchModal> <BatchModal ref="batchModal" @on-result-change="_page"></BatchModal>
<stockSampleEdit ref="editModal" @on-result-change="_page"></stockSampleEdit> <stockSampleEdit ref="editModal" @on-result-change="_page"></stockSampleEdit>
<SampleFileManage ref="SampleFileManage" @on-result-change="_page"></SampleFileManage>
<SamplePhotoManage ref="SamplePhotoManage" @on-result-change="_page"></SamplePhotoManage>
</div> </div>
</template> </template>
...@@ -89,6 +91,8 @@ ...@@ -89,6 +91,8 @@
import { soilEntrust, soilSample } from '../../../api' import { soilEntrust, soilSample } from '../../../api'
import ViewDetail from '../../soil-alone-sample/ViewDetail' import ViewDetail from '../../soil-alone-sample/ViewDetail'
import Outstock from '../soil-alone-sample-outstock/Outstock' import Outstock from '../soil-alone-sample-outstock/Outstock'
import SampleFileManage from '../../../components/file/sample-file-manage/FileManage'
import SamplePhotoManage from '../../../components/file/instock-file-manage/FileManage'
import ViewSample from './ViewLocationEntrust' import ViewSample from './ViewLocationEntrust'
import stockSampleEdit from './stockSampleEdit' import stockSampleEdit from './stockSampleEdit'
import BatchModal from './BatchModal' import BatchModal from './BatchModal'
...@@ -98,7 +102,9 @@ export default { ...@@ -98,7 +102,9 @@ export default {
ViewSample, ViewSample,
ViewDetail, ViewDetail,
BatchModal, BatchModal,
Outstock Outstock,
SampleFileManage,
SamplePhotoManage
}, },
data() { data() {
return { return {
...@@ -141,6 +147,11 @@ export default { ...@@ -141,6 +147,11 @@ export default {
name: '查看' name: '查看'
}, },
{ {
type: 'ios-camera',
id: '',
name: '照片'
},
{
type: 'md-cloud', type: 'md-cloud',
id: '', id: '',
name: '附件' name: '附件'
...@@ -259,6 +270,9 @@ export default { ...@@ -259,6 +270,9 @@ export default {
case '查看试样': case '查看试样':
this._viewSample(data.name) this._viewSample(data.name)
break break
case '照片':
this._uploadPhoto(data.id)
break
case '查看': case '查看':
this._viewModal(true, data.id) this._viewModal(true, data.id)
break break
...@@ -271,9 +285,14 @@ export default { ...@@ -271,9 +285,14 @@ export default {
} }
}) })
}, },
_uploadPhoto(data) {
// 上传照片文件
this.$refs.SamplePhotoManage._open(data, 'aloneSampleId', '照片管理')
// this.$refs.PhotoManage._open(id, 'entrustId')
},
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.$refs.FileManage._open(id, 'aloneSampleId') this.$refs.SampleFileManage._open(id, 'aloneSampleId')
}, },
_viewModal(edit, id) { _viewModal(edit, id) {
if (edit) { if (edit) {
......
...@@ -57,6 +57,8 @@ ...@@ -57,6 +57,8 @@
import { soilEntrust, soilSample } from '../../api' import { soilEntrust, soilSample } from '../../api'
import Operation from '../../components/operation/Operation' import Operation from '../../components/operation/Operation'
import importModal from '../../components/import/DownloadTemplateImport' import importModal from '../../components/import/DownloadTemplateImport'
import sampleFileManage from '../../components/file/sample-file-manage/FileManage'
import SamplePhotoManage from '../../components/file/instock-file-manage/FileManage'
import EntrustRegisterEdit from './EntrustRegisterEdit' import EntrustRegisterEdit from './EntrustRegisterEdit'
import RegisterDetail from './RegisterDetail' import RegisterDetail from './RegisterDetail'
import ViewDetail from './ViewDetail' import ViewDetail from './ViewDetail'
...@@ -71,7 +73,11 @@ export default { ...@@ -71,7 +73,11 @@ export default {
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
RegisterDetail, RegisterDetail,
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
ViewDetail ViewDetail,
// eslint-disable-next-line vue/no-unused-components
sampleFileManage,
// eslint-disable-next-line vue/no-unused-components
SamplePhotoManage
}, },
data() { data() {
return { return {
...@@ -102,6 +108,11 @@ export default { ...@@ -102,6 +108,11 @@ export default {
name: '查看' name: '查看'
}, },
{ {
type: 'ios-camera',
id: '',
name: '照片管理'
},
{
type: 'md-cloud', type: 'md-cloud',
id: 'entrust-register-upload', id: 'entrust-register-upload',
name: '附件' name: '附件'
...@@ -218,6 +229,9 @@ export default { ...@@ -218,6 +229,9 @@ export default {
case '试验项目列表': case '试验项目列表':
this._itemManage(data.id) this._itemManage(data.id)
break break
case '照片管理':
this._uploadPhoto(data.id)
break
case '附件': case '附件':
this._upload(data.id) this._upload(data.id)
break break
...@@ -230,7 +244,14 @@ export default { ...@@ -230,7 +244,14 @@ export default {
} }
}) })
}, },
_uploadPhoto(data) {
// 上传照片文件
this.currentComponent = 'SamplePhotoManage'
this.$nextTick(() => {
this.$refs.refModal._open(data, 'aloneSampleId', '照片管理')
})
// this.$refs.PhotoManage._open(id, 'entrustId')
},
_sampleManage(data) { _sampleManage(data) {
// 管理样品 // 管理样品
this.currentComponent = 'SoilSampleManage' this.currentComponent = 'SoilSampleManage'
...@@ -378,7 +399,7 @@ export default { ...@@ -378,7 +399,7 @@ export default {
}, },
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.currentComponent = 'FileManage' this.currentComponent = 'sampleFileManage'
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.refModal._open(id, 'aloneSampleId') this.$refs.refModal._open(id, 'aloneSampleId')
}) })
......
...@@ -53,10 +53,20 @@ ...@@ -53,10 +53,20 @@
<script> <script>
import { soilAptitude, soilEntrust } from '../../api' import { soilAptitude, soilEntrust } from '../../api'
import MeterEntrustRecord from '../../components/operation/Operation' import MeterEntrustRecord from '../../components/operation/Operation'
import SampleFileManage from '../../components/file/sample-file-manage/FileManage'
import SamplePhotoManage from '../../components/file/instock-file-manage/FileManage'
import ViewDetail from './ViewDetail' import ViewDetail from './ViewDetail'
export default { export default {
// eslint-disable-next-line vue/no-unused-components components: {
components: { MeterEntrustRecord, ViewDetail }, // eslint-disable-next-line vue/no-unused-components
MeterEntrustRecord,
// eslint-disable-next-line vue/no-unused-components
ViewDetail,
// eslint-disable-next-line vue/no-unused-components
SampleFileManage,
// eslint-disable-next-line vue/no-unused-components
SamplePhotoManage
},
data() { data() {
return { return {
currentComponent: '', currentComponent: '',
...@@ -76,6 +86,11 @@ export default { ...@@ -76,6 +86,11 @@ export default {
name: '查看' name: '查看'
}, },
{ {
type: 'ios-camera',
id: '',
name: '照片'
},
{
type: 'ios-cloud', type: 'ios-cloud',
id: 'receive-sample-upload', id: 'receive-sample-upload',
name: '附件' name: '附件'
...@@ -149,6 +164,9 @@ export default { ...@@ -149,6 +164,9 @@ export default {
case '资质项目': case '资质项目':
this._itemModal(data.id) this._itemModal(data.id)
break break
case '照片':
this._uploadPhoto(data.id)
break
case '附件': case '附件':
this._upload(data.id) this._upload(data.id)
break break
...@@ -167,6 +185,14 @@ export default { ...@@ -167,6 +185,14 @@ export default {
} }
}) })
}, },
_uploadPhoto(data) {
// 上传照片文件
this.currentComponent = 'SamplePhotoManage'
this.$nextTick(() => {
this.$refs.refModal._open(data, 'aloneSampleId', '照片管理')
})
// this.$refs.PhotoManage._open(id, 'entrustId')
},
_viewModal(edit, id) { _viewModal(edit, id) {
this.currentComponent = 'ViewDetail' this.currentComponent = 'ViewDetail'
if (edit) { if (edit) {
...@@ -256,7 +282,7 @@ export default { ...@@ -256,7 +282,7 @@ export default {
_upload(id) { _upload(id) {
// 上传文件 // 上传文件
this.currentComponent = 'FileManage' this.currentComponent = 'SampleFileManage'
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.refModal._open(id, 'aloneSampleId') this.$refs.refModal._open(id, 'aloneSampleId')
}) })
......
<template> <template>
<div> <div>
<Modal v-model="showModal" v-drag width="1050" class="modal-footer-none zIndex-1100"> <Modal v-model="showModal" v-drag width="1050" class="modal-footer-none zIndex-1100">
<p slot="header">项目试验项目编制</p> <p slot="header">分项报告审核</p>
<div> <div>
<Row> <Row>
<!--查询--> <!--查询-->
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
{ title: '创建人', key: 'uname' }, { title: '创建人', key: 'uname' },
{ title: '创建时间', key: 'ctime', dateTime: true } { title: '创建时间', key: 'ctime', dateTime: true }
], ],
btn: [{ id: 'item-check-submit', type: 'primary', name: '提交至签发' }], btn: [{ id: 'item-check-submit', type: 'primary', name: '提交至复核' }],
iconMsg: [ iconMsg: [
{ {
type: 'ios-book', type: 'ios-book',
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
}, },
_btnClick(msg, data) { _btnClick(msg, data) {
switch (msg) { switch (msg) {
case '提交至签发': case '提交至复核':
this._submitExpReportCheck() this._submitExpReportCheck()
break break
case 'search': case 'search':
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<div class="layout-content-padding"> <div class="layout-content-padding">
<div class="layout-content-main"> <div class="layout-content-main">
<el-tabs v-model="activeName" @tab-click="_changeTabs"> <el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="试验项目报告批准" name="lab"> <el-tab-pane label="试验项目报告复核" name="lab">
<reportMake ref="labTabs" /> <reportMake ref="labTabs" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="试验项目报告批准历史" name="his"> <el-tab-pane label="试验项目报告复核历史" name="his">
<historyTask ref="hisTabs" /> <historyTask ref="hisTabs" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
......
<template> <template>
<div> <div>
<Modal v-model="showModal" v-drag width="1050" class="modal-footer-none zIndex-1100"> <Modal v-model="showModal" v-drag width="1050" class="modal-footer-none zIndex-1100">
<p slot="header">项目试验报告签发</p> <p slot="header">分项报告复核</p>
<div> <div>
<Row> <Row>
<!--查询--> <!--查询-->
......
...@@ -173,6 +173,11 @@ export default { ...@@ -173,6 +173,11 @@ export default {
type: 'primary', type: 'primary',
id: 'make-report-pass', id: 'make-report-pass',
name: '提交' name: '提交'
},
{
type: 'primary',
id: '',
name: '生成报告'
} }
], ],
selectIds: [], selectIds: [],
...@@ -208,6 +213,13 @@ export default { ...@@ -208,6 +213,13 @@ export default {
case '提交': case '提交':
this._submitToCheck() this._submitToCheck()
break break
case '生成报告':
if (this.selectIds.length === 1) {
this._viewItemRecord(this.selectIds.join(','))
} else {
this.$Message.warning('请选择一条数据')
}
break
case 'search': case 'search':
this.searchOpen = !this.searchOpen this.searchOpen = !this.searchOpen
break break
...@@ -363,6 +375,8 @@ export default { ...@@ -363,6 +375,8 @@ export default {
} }
}, },
_page: async function() { _page: async function() {
this.selectIds = []
this.selectData = []
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await soilStatistics.pageReportMakeByExpReport( const result = await soilStatistics.pageReportMakeByExpReport(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
......
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
<DescribeDetailModal ref="writeDetailModal" @on-result-change="_page"></DescribeDetailModal> <DescribeDetailModal ref="writeDetailModal" @on-result-change="_page"></DescribeDetailModal>
<PreparationModal ref="preModal" @on-result-change="_page"></PreparationModal> <PreparationModal ref="preModal" @on-result-change="_page"></PreparationModal>
<SoilSampleSplit ref="splitModal" @on-result-change="_page"></SoilSampleSplit> <SoilSampleSplit ref="splitModal" @on-result-change="_page"></SoilSampleSplit>
<SoilSampleSplitChild ref="splitModalChild" @on-result-change="_page"></SoilSampleSplitChild>
<SelectFlowRelBtn ref="flow"/> <SelectFlowRelBtn ref="flow"/>
</div> </div>
</template> </template>
...@@ -77,13 +78,15 @@ import SoilSampleItemManage from './SoilSampleItemManage' ...@@ -77,13 +78,15 @@ import SoilSampleItemManage from './SoilSampleItemManage'
import DescribeDetailModal from './sample-preparation/DescribeDetailModal' import DescribeDetailModal from './sample-preparation/DescribeDetailModal'
import PreparationModal from './sample-preparation/Preparation' import PreparationModal from './sample-preparation/Preparation'
import SoilSampleSplit from './SoilSampleSplit' import SoilSampleSplit from './SoilSampleSplit'
import SoilSampleSplitChild from './SoilSampleSplitChild'
export default { export default {
components: { components: {
SoilSampleItemManage, SoilSampleItemManage,
DescribeDetailModal, DescribeDetailModal,
PreparationModal, PreparationModal,
SoilSampleSplit, SoilSampleSplit,
SelectFlowRelBtn SelectFlowRelBtn,
SoilSampleSplitChild
}, },
data() { data() {
return { return {
...@@ -277,7 +280,11 @@ export default { ...@@ -277,7 +280,11 @@ export default {
}, },
_sampleSplit() { _sampleSplit() {
if (this.selectData.length === 1) { if (this.selectData.length === 1) {
this.$refs.splitModal._open(this.selectData[0]) if (this.selectData[0].sampleCode.indexOf('-') === -1) {
this.$refs.splitModal._open(this.selectData[0])
} else {
this.$refs.splitModalChild._open(this.selectData[0])
}
} else { } else {
this.$Message.warning('请选择一条数据') this.$Message.warning('请选择一条数据')
} }
...@@ -366,6 +373,7 @@ export default { ...@@ -366,6 +373,7 @@ export default {
this.$refs.pageTable._pageChange(1) this.$refs.pageTable._pageChange(1)
}, },
_page: async function() { _page: async function() {
this.$forceUpdate()
this.selectData = [] this.selectData = []
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj.entrustId = this.contractId this.formObj.entrustId = this.contractId
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true" <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">
<vxe-table-column <vxe-table-column
v-for="item in pageColumns" v-for="item in pageColumns"
:key="item.key" :key="item.key"
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
formId: 'SampleItemManage', formId: 'SampleItemManage',
currentComponent: '', currentComponent: '',
btn: [], btn: [],
iconMsg: [{ type: 'pt-a-end', id: '', name: '删除' }], iconMsg: [{ type: 'md-trash', id: '', name: '删除' }],
sampleId: '', // 样品id sampleId: '', // 样品id
showModal: false, showModal: false,
modalTitle: '管理检测项目', modalTitle: '管理检测项目',
...@@ -406,7 +406,6 @@ export default { ...@@ -406,7 +406,6 @@ export default {
this._copy(data) this._copy(data)
break break
case '删除': case '删除':
console.log(index)
this._deleteById(data.id) this._deleteById(data.id)
break break
case '附件': case '附件':
...@@ -428,6 +427,9 @@ export default { ...@@ -428,6 +427,9 @@ export default {
case 'page': case 'page':
this._page() this._page()
break break
case 'iconClick':
this._iconClick(data.name, data.rowData)
break
case 'changeSize': case 'changeSize':
this._page() this._page()
break break
...@@ -478,7 +480,7 @@ export default { ...@@ -478,7 +480,7 @@ export default {
}, },
_deleteOk: async function(ids) { _deleteOk: async function(ids) {
const result = await soilEntrust.deleteById(ids) const result = await soilEntrust.experimentDelete(ids)
if (result) { if (result) {
this._resultChange('删除成功! ') this._resultChange('删除成功! ')
} }
......
...@@ -44,6 +44,7 @@ export default { ...@@ -44,6 +44,7 @@ export default {
}, },
_page() { _page() {
this.$refs.entrustTabs._page() this.$refs.entrustTabs._page()
this.$refs.entrustTabs._getGroupList()
} }
} }
} }
......
...@@ -14,6 +14,19 @@ ...@@ -14,6 +14,19 @@
<Form-item class="search-item" label="委托编号:"> <Form-item class="search-item" label="委托编号:">
<Input v-model="formObj.entrustCode" @on-enter="_formSearch" placeholder="请输入委托编号" clearable></Input> <Input v-model="formObj.entrustCode" @on-enter="_formSearch" placeholder="请输入委托编号" clearable></Input>
</Form-item> </Form-item>
<Form-item class="search-item" label="钻孔名称:">
<Input v-model="formObj.boreholeName" @on-enter="_formSearch" placeholder="请输入钻孔名称" clearable></Input>
</Form-item>
<Form-item label="试验科室:" class="search-item">
<el-select v-model="formObj.groupId" @change="_selGroup" placeholder="请选择" clearable style="width: 100%">
<el-option
v-for="(item,index) in groupoptions"
:key="index"
:label="item.name"
:value="item.id"
/>
</el-select>
</Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
</Form-item> </Form-item>
...@@ -69,7 +82,7 @@ ...@@ -69,7 +82,7 @@
</template> </template>
<script> <script>
import UserInfo from '../../../components/user-info-single/assignPerson' import UserInfo from '../../../components/user-info-single/assignPerson'
import { soilEntrust } from '../../../api' import { soilAptitude, soilEntrust } from '../../../api'
import Operation from '../../../components/operation/Operation' import Operation from '../../../components/operation/Operation'
import global from '../../../api/config' import global from '../../../api/config'
import SampleManage from './TakeSampleManage' import SampleManage from './TakeSampleManage'
...@@ -83,9 +96,11 @@ export default { ...@@ -83,9 +96,11 @@ export default {
return { return {
formObj: { formObj: {
client: undefined, client: undefined,
entrustCode: undefined entrustCode: undefined,
boreholeName: undefined
}, },
typeList: [{ name: '企业', value: 0 }, { name: '政府', value: 1 }], typeList: [{ name: '企业', value: 0 }, { name: '政府', value: 1 }],
groupoptions: [],
iconMsg: [ iconMsg: [
{ {
type: 'ios-beaker', type: 'ios-beaker',
...@@ -154,6 +169,12 @@ export default { ...@@ -154,6 +169,12 @@ export default {
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue') // this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
}, },
methods: { methods: {
_getGroupList: async function() {
const result = await soilAptitude.getGroupList()
if (result) {
this.groupoptions = result
}
},
_userResult(data, msg) { _userResult(data, msg) {
const sendData = { const sendData = {
ids: this.selectIds.join(',') ids: this.selectIds.join(',')
......
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
<el-date-picker <el-date-picker
v-model="queryDate" v-model="queryDate"
@change="_dateChange" @change="_dateChange"
type="monthrange" type="daterange"
range-separator="-" range-separator="-"
start-placeholder="开始月份" start-placeholder="开始月份"
end-placeholder="结束月份" end-placeholder="结束月份"
size="small" size="small"
value-format="yyyy-MM" value-format="yyyy-MM-dd"
> >
</el-date-picker> </el-date-picker>
</Form-item> </Form-item>
...@@ -69,10 +69,10 @@ import { soilStatistics } from '../../../api' ...@@ -69,10 +69,10 @@ import { soilStatistics } from '../../../api'
export default { export default {
components: {}, components: {},
data() { data() {
const date = this.$dateformat(new Date(), 'yyyy-mm') const date = this.$dateformat(new Date(), 'yyyy-mm-dd')
const nextMonth = this.$dateformat( const nextMonth = this.$dateformat(
new Date().setMonth(new Date().getMonth() + 1), new Date().setMonth(new Date().getMonth() + 1),
'yyyy-mm' 'yyyy-mm-dd'
) )
return { return {
formId: 'AreaSample', formId: 'AreaSample',
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
const str = this.tempData.endDate const str = this.tempData.endDate
const arr = str.split('-') const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1 const lastday = this.mGetDate(arr[0], arr[1], arr[2]).getTime() - 1
this.formObj.entrustDateBeg = this.tempData.beginDate this.formObj.entrustDateBeg = this.tempData.beginDate
this.formObj.entrustDateEnd = this.$dateformat( this.formObj.entrustDateEnd = this.$dateformat(
lastday, lastday,
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
this.formObj.entrustDateBeg = data[0] this.formObj.entrustDateBeg = data[0]
const str = data[1] const str = data[1]
const arr = str.split('-') const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1 const lastday = this.mGetDate(arr[0], arr[1], arr[2]).getTime() - 1
this.formObj.entrustDateEnd = this.$dateformat( this.formObj.entrustDateEnd = this.$dateformat(
lastday, lastday,
'yyyy-mm-dd HH:MM:ss' 'yyyy-mm-dd HH:MM:ss'
...@@ -141,8 +141,8 @@ export default { ...@@ -141,8 +141,8 @@ export default {
this.formObj.entrustDateEnd = undefined this.formObj.entrustDateEnd = undefined
} }
}, },
mGetDate(year, month) { mGetDate(year, month, day) {
const d = new Date(year, month, 1) const d = new Date(year, month - 1, day, 24)
return d return d
}, },
// 服务类型 // 服务类型
......
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
<el-date-picker <el-date-picker
v-model="queryDate" v-model="queryDate"
@change="_dateChange" @change="_dateChange"
type="monthrange" type="daterange"
range-separator="-" range-separator="-"
start-placeholder="开始月份" start-placeholder="开始月份"
end-placeholder="结束月份" end-placeholder="结束月份"
size="small" size="small"
value-format="yyyy-MM" value-format="yyyy-MM-dd"
> >
</el-date-picker> </el-date-picker>
</Form-item> </Form-item>
...@@ -56,7 +56,9 @@ ...@@ -56,7 +56,9 @@
<span v-else>{{ scope.row[item.key] === undefined ? '': scope.row[item.key].display }}</span> <span v-else>{{ scope.row[item.key] === undefined ? '': scope.row[item.key].display }}</span>
</div> </div>
<span v-else-if="item.key==='backReasons'" style="color: red">{{scope.row[item.key]}}</span> <span v-else-if="item.key==='backReasons'" style="color: red">{{scope.row[item.key]}}</span>
<span v-else>{{scope.row[item.key]}}</span> <span v-else-if="item.key==='projectType'">{{scope.row[item.key]}}</span>
<span v-else-if="item.key==='projectName'">{{scope.row[item.key]}}</span>
<span v-else>{{scope.row[item.key]?scope.row[item.key]:0}}</span>
</template> </template>
</vxe-table-column> </vxe-table-column>
</PTVXETable> </PTVXETable>
...@@ -74,10 +76,10 @@ import { soilAptitude, soilStatistics } from '../../../api' ...@@ -74,10 +76,10 @@ import { soilAptitude, soilStatistics } from '../../../api'
export default { export default {
components: {}, components: {},
data() { data() {
const date = this.$dateformat(new Date(), 'yyyy-mm') const date = this.$dateformat(new Date(), 'yyyy-mm-dd')
const nextMonth = this.$dateformat( const nextMonth = this.$dateformat(
new Date().setMonth(new Date().getMonth() + 1), new Date().setMonth(new Date().getMonth() + 1),
'yyyy-mm' 'yyyy-mm-dd'
) )
return { return {
formId: 'ProjectItem', formId: 'ProjectItem',
...@@ -88,10 +90,52 @@ export default { ...@@ -88,10 +90,52 @@ export default {
tester: '', tester: '',
testerId: '', testerId: '',
pageColumns: [ pageColumns: [
{ title: '工程类型', key: 'projectType', detail: true, width: 140 }, { title: '工程类型', key: 'projectType', detail: true, width: 150 },
{ title: '工程名称', key: 'projectName', width: 100 }, { title: '工程名称', key: 'projectName', width: 150 },
{ title: '检测项目', key: 'itemNames', width: 110 }, { title: '比重', key: '比重', width: 110 },
{ title: '数量', key: 'num', width: 110 } { title: '导热系数', key: '导热系数', width: 110 },
{ title: '电导率', key: '电导率', width: 110 },
{ title: '界限含水率', key: '界限含水率', width: 110 },
{ title: '颗粒分析-Hyd', key: '颗粒分析-Hyd', width: 150 },
{ title: '颗粒分析-Sieve', key: '颗粒分析-Sieve', width: 150 },
{ title: '密度', key: '密度', width: 110 },
{ title: '渗透', key: '渗透', width: 110 },
{ title: '碳酸盐含量', key: '碳酸盐含量', width: 110 },
{ title: '相对密度', key: '相对密度', width: 110 },
{ title: '点荷载强度', key: '点荷载强度', width: 110 },
{ title: '固结', key: '固结', width: 110 },
{ title: '落锥', key: '落锥', width: 110 },
{ title: '落锥-重塑', key: '落锥-重塑', width: 110 },
{ title: '三轴压缩-CD', key: '三轴压缩-CD', width: 150 },
{ title: '三轴压缩-CU', key: '三轴压缩-CU', width: 150 },
{ title: '三轴压缩-UU', key: '三轴压缩-UU', width: 150 },
{ title: '三轴压缩-UU-重塑', key: '三轴压缩-UU-重塑', width: 150 },
{ title: '手动十字板剪切', key: '手动十字板剪切', width: 150 },
{ title: '无侧限抗压强度', key: '无侧限抗压强度', width: 150 },
{ title: '休止角', key: '休止角', width: 110 },
{ title: '袖珍贯入仪', key: '袖珍贯入仪', width: 110 },
{ title: '直接剪切', key: '直接剪切', width: 110 },
{ title: '波速模量', key: '波速模量', width: 110 },
{ title: '液化', key: '液化', width: 110 },
{ title: '触变', key: '触变', width: 110 },
{ title: '动单剪', key: '动单剪', width: 110 },
{ title: '共振柱', key: '共振柱', width: 110 },
{ title: '静单剪', key: '静单剪', width: 110 },
{
title: '实验室微型十字板剪切-重塑',
key: '实验室微型十字板剪切-重塑',
width: 200
},
{ title: '蠕变', key: '蠕变', width: 110 },
{ title: '应变控制加荷固结', key: '应变控制加荷固结', width: 180 },
{
title: '实验室微型十字板剪切',
key: '实验室微型十字板剪切',
width: 180
},
{ title: '含水率', key: '含水率', width: 110 },
{ title: '颗粒分析-200', key: '颗粒分析-200', width: 150 },
{ title: '无侧限抗压强度-重塑', key: '无侧限抗压强度-重塑', width: 180 }
], ],
groupData: [], groupData: [],
getPage: {}, getPage: {},
...@@ -122,7 +166,7 @@ export default { ...@@ -122,7 +166,7 @@ export default {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
const str = this.tempData.endDate const str = this.tempData.endDate
const arr = str.split('-') const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1 const lastday = this.mGetDate(arr[0], arr[1], arr[2]).getTime() - 1
this.formObj.entrustDateBeg = this.tempData.beginDate this.formObj.entrustDateBeg = this.tempData.beginDate
this.formObj.entrustDateEnd = this.$dateformat( this.formObj.entrustDateEnd = this.$dateformat(
lastday, lastday,
...@@ -149,7 +193,7 @@ export default { ...@@ -149,7 +193,7 @@ export default {
this.formObj.entrustDateBeg = data[0] this.formObj.entrustDateBeg = data[0]
const str = data[1] const str = data[1]
const arr = str.split('-') const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1 const lastday = this.mGetDate(arr[0], arr[1], arr[2]).getTime() - 1
this.formObj.entrustDateEnd = this.$dateformat( this.formObj.entrustDateEnd = this.$dateformat(
lastday, lastday,
'yyyy-mm-dd HH:MM:ss' 'yyyy-mm-dd HH:MM:ss'
...@@ -161,8 +205,8 @@ export default { ...@@ -161,8 +205,8 @@ export default {
this.formObj.entrustDateEnd = undefined this.formObj.entrustDateEnd = undefined
} }
}, },
mGetDate(year, month) { mGetDate(year, month, day) {
const d = new Date(year, month, 1) const d = new Date(year, month - 1, day, 24)
return d return d
}, },
// 服务类型 // 服务类型
...@@ -172,6 +216,14 @@ export default { ...@@ -172,6 +216,14 @@ export default {
this.$serializeFormSearch(this.formObj) this.$serializeFormSearch(this.formObj)
) )
if (result) { if (result) {
for (let i = 0; i < result.records.length; i++) {
for (let j = 0; j < result.records[i].experimentVOList.length; j++) {
const listName = result.records[i].experimentVOList[j].name
const listNum = result.records[i].experimentVOList[j].itemCount
result.records[i][listName] = listNum
}
}
console.log('result', result)
this.getPage = result this.getPage = result
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
} }
......
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
<el-date-picker <el-date-picker
v-model="queryDate" v-model="queryDate"
@change="_dateChange" @change="_dateChange"
type="monthrange" type="daterange"
range-separator="-" range-separator="-"
start-placeholder="开始月份" start-placeholder="开始月份"
end-placeholder="结束月份" end-placeholder="结束月份"
size="small" size="small"
value-format="yyyy-MM" value-format="yyyy-MM-dd"
> >
</el-date-picker> </el-date-picker>
</Form-item> </Form-item>
...@@ -69,10 +69,10 @@ import { soilStatistics } from '../../../api' ...@@ -69,10 +69,10 @@ import { soilStatistics } from '../../../api'
export default { export default {
components: {}, components: {},
data() { data() {
const date = this.$dateformat(new Date(), 'yyyy-mm') const date = this.$dateformat(new Date(), 'yyyy-mm-dd')
const nextMonth = this.$dateformat( const nextMonth = this.$dateformat(
new Date().setMonth(new Date().getMonth() + 1), new Date().setMonth(new Date().getMonth() + 1),
'yyyy-mm' 'yyyy-mm-dd'
) )
return { return {
formId: 'TestItem', formId: 'TestItem',
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
const str = this.tempData.endDate const str = this.tempData.endDate
const arr = str.split('-') const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1 const lastday = this.mGetDate(arr[0], arr[1], arr[2]).getTime() - 1
this.formObj.checkTimeBeg = this.tempData.beginDate this.formObj.checkTimeBeg = this.tempData.beginDate
this.formObj.checkTimeEnd = this.$dateformat(lastday, 'yyyy-mm-dd HH:MM:ss') this.formObj.checkTimeEnd = this.$dateformat(lastday, 'yyyy-mm-dd HH:MM:ss')
this._getData() this._getData()
...@@ -124,9 +124,10 @@ export default { ...@@ -124,9 +124,10 @@ export default {
this.tempData.beginDate = data[0] this.tempData.beginDate = data[0]
this.tempData.endDate = data[1] this.tempData.endDate = data[1]
this.formObj.checkTimeBeg = data[0] this.formObj.checkTimeBeg = data[0]
// this.formObj.checkTimeEnd = data[1]
const str = data[1] const str = data[1]
const arr = str.split('-') const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1 const lastday = this.mGetDate(arr[0], arr[1], arr[2]).getTime() - 1
this.formObj.checkTimeEnd = this.$dateformat( this.formObj.checkTimeEnd = this.$dateformat(
lastday, lastday,
'yyyy-mm-dd HH:MM:ss' 'yyyy-mm-dd HH:MM:ss'
...@@ -138,8 +139,8 @@ export default { ...@@ -138,8 +139,8 @@ export default {
this.formObj.checkTimeEnd = undefined this.formObj.checkTimeEnd = undefined
} }
}, },
mGetDate(year, month) { mGetDate(year, month, day) {
const d = new Date(year, month, 1) const d = new Date(year, month - 1, day, 24)
return d return d
}, },
// 服务类型 // 服务类型
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<div> <div>
<Modal v-model="showSampleModal" v-drag @on-visible-change="_visibleChange" width="1200" <Modal v-model="showSampleModal" v-drag @on-visible-change="_visibleChange" width="1200"
class="zIndex-900 modal-footer-none"> class="zIndex-900 modal-footer-none">
<p slot="header">数据</p> <p slot="header">数据</p>
<div> <div>
<el-tabs v-model="activeName" @tab-click="_changeTabs"> <el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="按项目核" name="waitReceive"> <el-tab-pane label="按项目核" name="waitReceive">
<WaitReceive ref="waitReceiveModal"></WaitReceive> <WaitReceive ref="waitReceiveModal"></WaitReceive>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="按样品核" name="waitScan"> <el-tab-pane label="按样品核" name="waitScan">
<WaitScan ref="waitScanModal"></WaitScan> <WaitScan ref="waitScanModal"></WaitScan>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="查看项目报告" name="viewReport"> <el-tab-pane label="查看项目报告" name="viewReport">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="layout-content-padding"> <div class="layout-content-padding">
<div class="layout-content-main"> <div class="layout-content-main">
<el-tabs v-model="activeName" @tab-click="_changeTabs"> <el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="数据核" name="check"></el-tab-pane> <el-tab-pane label="数据核" name="check"></el-tab-pane>
<el-tab-pane label="历史任务" name="checkHis"></el-tab-pane> <el-tab-pane label="历史任务" name="checkHis"></el-tab-pane>
</el-tabs> </el-tabs>
<keep-alive> <keep-alive>
......
...@@ -80,7 +80,12 @@ export default { ...@@ -80,7 +80,12 @@ export default {
id: 'audit-report-view', id: 'audit-report-view',
name: '查看项目报告' name: '查看项目报告'
}, },
{ type: 'md-trash', id: 'audit-report-delete', name: '删除' } { type: 'md-trash', id: 'audit-report-delete', name: '删除' },
{
type: 'md-albums',
id: 'audit-report-view-appendix',
name: '查看附录'
}
], ],
pageColumns: [ pageColumns: [
{ title: '项目名称', key: 'expName' }, { title: '项目名称', key: 'expName' },
...@@ -172,6 +177,13 @@ export default { ...@@ -172,6 +177,13 @@ export default {
case '查看试验项目': case '查看试验项目':
this._itemView(data.id) this._itemView(data.id)
break break
case '查看附录':
if (data.appendixKey) {
this._viewAppendix(data)
} else {
this.$Message.warning('未生成附录')
}
break
case '删除': case '删除':
this._deleteByIds([data.id]) this._deleteByIds([data.id])
break break
...@@ -209,6 +221,16 @@ export default { ...@@ -209,6 +221,16 @@ export default {
}) })
} }
}, },
_viewAppendix(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.appendixKey,
idType: 13,
id: data.id,
isReport: 5
})
}
},
// 查看原始记录 // 查看原始记录
_recordView(originalRecordId) { _recordView(originalRecordId) {
let recordUrl = '' let recordUrl = ''
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<div> <div>
<Modal v-model="showSampleModal" v-drag @on-visible-change="_visibleChange" width="1200" <Modal v-model="showSampleModal" v-drag @on-visible-change="_visibleChange" width="1200"
class="zIndex-900 modal-footer-none"> class="zIndex-900 modal-footer-none">
<p slot="header">数据</p> <p slot="header">数据</p>
<div> <div>
<el-tabs v-model="activeName" @tab-click="_changeTabs"> <el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="按项目核" name="waitReceive"> <el-tab-pane label="按项目核" name="waitReceive">
<WaitReceive ref="waitReceiveModal"></WaitReceive> <WaitReceive ref="waitReceiveModal"></WaitReceive>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="按样品核" name="waitScan"> <el-tab-pane label="按样品核" name="waitScan">
<WaitScan ref="waitScanModal"></WaitScan> <WaitScan ref="waitScanModal"></WaitScan>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="查看项目报告" name="viewReport"> <el-tab-pane label="查看项目报告" name="viewReport">
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<!-- </el-tab-pane>--> <!-- </el-tab-pane>-->
<!-- </el-tabs>--> <!-- </el-tabs>-->
<el-tabs v-model="activeName" @tab-click="_changeTabs"> <el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="数据核" name="check"></el-tab-pane> <el-tab-pane label="数据核" name="check"></el-tab-pane>
<el-tab-pane label="历史任务" name="checkHis"></el-tab-pane> <el-tab-pane label="历史任务" name="checkHis"></el-tab-pane>
</el-tabs> </el-tabs>
<keep-alive> <keep-alive>
......
...@@ -80,7 +80,12 @@ export default { ...@@ -80,7 +80,12 @@ export default {
id: 'check-report-view', id: 'check-report-view',
name: '查看项目报告' name: '查看项目报告'
}, },
{ type: 'md-trash', id: 'check-report-delete', name: '删除' } { type: 'md-trash', id: 'check-report-delete', name: '删除' },
{
type: 'md-albums',
id: 'check-report-view-appendix',
name: '查看附录'
}
], ],
pageColumns: [ pageColumns: [
{ title: '项目名称', key: 'expName' }, { title: '项目名称', key: 'expName' },
...@@ -165,6 +170,13 @@ export default { ...@@ -165,6 +170,13 @@ export default {
// ) // )
this._reportMakeLook(data) this._reportMakeLook(data)
break break
case '查看附录':
if (data.appendixKey) {
this._viewAppendix(data)
} else {
this.$Message.warning('未生成附录')
}
break
case '查看项目报告': case '查看项目报告':
this._reportView(data) this._reportView(data)
// this._recordView(data.originalRecordId) // this._recordView(data.originalRecordId)
...@@ -178,6 +190,16 @@ export default { ...@@ -178,6 +190,16 @@ export default {
} }
}) })
}, },
_viewAppendix(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.appendixKey,
idType: 13,
id: data.id,
isReport: 5
})
}
},
// 查看试验项目 // 查看试验项目
_itemView(id) { _itemView(id) {
this.$refs.itemViewModal._open(id) this.$refs.itemViewModal._open(id)
......
...@@ -80,7 +80,16 @@ export default { ...@@ -80,7 +80,16 @@ export default {
id: 'do-test-sample-viewitem-view-report', id: 'do-test-sample-viewitem-view-report',
name: '查看项目报告' name: '查看项目报告'
}, },
{ type: 'md-trash', id: 'do-test-sample-viewitem-delete', name: '删除' } {
type: 'md-trash',
id: 'do-test-sample-viewitem-delete',
name: '删除'
},
{
type: 'md-albums',
id: 'do-test-sample-viewitem-view-appendix',
name: '生成/查看附录'
}
], ],
pageColumns: [ pageColumns: [
{ title: '项目名称', key: 'expName' }, { title: '项目名称', key: 'expName' },
...@@ -168,12 +177,25 @@ export default { ...@@ -168,12 +177,25 @@ export default {
case '查看试验项目': case '查看试验项目':
this._itemView(data.id) this._itemView(data.id)
break break
case '生成/查看附录':
if (data.appendixKey) {
this._viewAppendix(data)
} else {
this._generateAppendix(data.id)
}
break
case '删除': case '删除':
this._deleteByIds([data.id]) this._deleteByIds([data.id])
break break
} }
}) })
}, },
_generateAppendix: async function(id) {
const result = await soilReport.generateAppendix({ id: id })
if (result) {
this._viewAppendix(result)
}
},
// 查看试验项目 // 查看试验项目
_itemView(id) { _itemView(id) {
this.$refs.itemViewModal._open(id) this.$refs.itemViewModal._open(id)
...@@ -193,6 +215,16 @@ export default { ...@@ -193,6 +215,16 @@ export default {
this._viewReport(result) this._viewReport(result)
} }
}, },
_viewAppendix(data) {
if (data) {
this.$openWindowModeless({
objectKey: data.appendixKey,
idType: 13,
id: data.id,
isReport: 5
})
}
},
_viewReport(data) { _viewReport(data) {
if (data) { if (data) {
this.$openWindowModeless({ this.$openWindowModeless({
......
...@@ -7,6 +7,12 @@ ...@@ -7,6 +7,12 @@
<Form-item label="模板名称:" class="search-item"> <Form-item label="模板名称:" class="search-item">
<Input v-model="formObj.alias" @on-enter="_formSearch" placeholder="请输入模板名称" clearable/> <Input v-model="formObj.alias" @on-enter="_formSearch" placeholder="请输入模板名称" clearable/>
</Form-item> </Form-item>
<Form-item label="模板类别:" class="search-item">
<el-select v-model="formObj.classType" placeholder="请选择类别" size="small" clearable>
<el-option :label="item.value" :value="item.value" v-for="(item,index) in typeList"
:key="index"></el-option>
</el-select>
</Form-item>
<Form-item class="search-btn" style="margin-left: -10px"> <Form-item class="search-btn" style="margin-left: -10px">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
</Form-item> </Form-item>
...@@ -60,6 +66,17 @@ export default { ...@@ -60,6 +66,17 @@ export default {
formObj: { formObj: {
name: undefined name: undefined
}, },
typeList: [
{
value: '力学'
},
{
value: '物性'
},
{
value: '高级'
}
],
selectData: [] selectData: []
} }
}, },
......
import Vue from 'vue'
import quillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
export default () => {
Vue.use(quillEditor)
}
...@@ -207,17 +207,17 @@ export default [ ...@@ -207,17 +207,17 @@ export default [
{ {
path: 'do_test', path: 'do_test',
component: TestInputIndex, component: TestInputIndex,
meta: { title: '试样检测' } meta: { title: '数据录入' }
}, },
{ {
path: 'check', path: 'check',
component: CheckIndex, component: CheckIndex,
meta: { title: '数据核' } meta: { title: '数据核' }
}, },
{ {
path: 'audit', path: 'audit',
component: AuditIndex, component: AuditIndex,
meta: { title: '数据核' } meta: { title: '数据核' }
}, },
{ {
path: 'consult', path: 'consult',
...@@ -272,22 +272,22 @@ export default [ ...@@ -272,22 +272,22 @@ export default [
{ {
path: 'make', path: 'make',
component: SoilExpReportMakeIndex, component: SoilExpReportMakeIndex,
meta: { title: '项目报告编制' } meta: { title: '分项报告编制' }
}, },
{ {
path: 'check', path: 'check',
component: SoilExpReportCheckIndex, component: SoilExpReportCheckIndex,
meta: { title: '项目报告审核' } meta: { title: '分项报告审核' }
}, },
{ {
path: 'issue', path: 'issue',
component: SoilExpReportIssueIndex, component: SoilExpReportIssueIndex,
meta: { title: '项目报告签发' } meta: { title: '分项报告复核' }
}, },
{ {
path: 'end', path: 'end',
component: SoilExpReportEndIndex, component: SoilExpReportEndIndex,
meta: { title: '项目报告汇总' } 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