Commit 77724e73 by zhangmengqi

Merge branch 'dev'

parents 7bbfb031 a80c2c04
......@@ -266,6 +266,10 @@ export default {
.then(res => res),
aloneSampleDelete: data =>
http.delete('soil/v1/alone_sample/?ids=' + data).then(res => res),
pageWarehouseLocationSample: data =>
http
.post('soil/v1/sample/page_warehouse_location_sample', data)
.then(res => res),
storageSampleSubmit: data =>
http
.post('soil/v1/alone_sample/storage_sample_submit', data)
......
......@@ -9,7 +9,7 @@
</div>
<div v-if="item.type === 'rect'" class="flow-start" style="position: absolute;right: -10px;bottom:-60px">
<PtArrow :isRote="true" :value="item.value"/>
<PtRect :name="item.name" :value="item.value" style="margin-top: 60px;"/>
<PtRect :name="item.name" :num="item.num?item.num:''" :value="item.value" style="margin-top: 60px;"/>
</div>
<!--最后的连接线-->
<div style="position: absolute;left: 81px;top: 30px">
......@@ -74,8 +74,6 @@ export default {
// 右侧的连接线
endValue() {
// 最后一个节点数据
console.log('右侧连接线', this.list)
console.log('右侧连接线', this.endList)
// const current_value = this.list[2].value
const currentValue = this.list[2].value
const endValue = this.endList[0].value
......
<template>
<div :class="classObj(value)" class="rect">{{name}}</div>
<div :class="classObj(value)" class="rect">
<p :class="style(name)">{{name}}<br>{{num}}</p>
</div>
</template>
<script>
......@@ -12,7 +14,8 @@ export default {
// 显示的内容
name: null,
// 节点变色的依据(存在的变色)
value: null
value: null,
num: null
},
methods: {
// 颜色
......@@ -25,6 +28,13 @@ export default {
default:
break
}
},
style(name) {
if (name === '自校版' && this.num !== '') {
return 'haveNum'
} else {
return 'noNum'
}
}
}
}
......@@ -32,7 +42,6 @@ export default {
<style scoped>
.rect {
padding: 10px;
border: 1px solid #999;
background: #999;
color: #fff;
......@@ -40,7 +49,12 @@ export default {
width: 80px;
text-align: center;
}
.haveNum {
}
.noNum {
margin-top: 10px;
margin-bottom: 10px;
}
.blue-color {
border-color: #00a0e9;
background-color: #00a0e9;
......
......@@ -51,6 +51,13 @@ export default {
storageSelect
},
data() {
const valistorehouse = (rule, value, callback) => {
if (this.formObj.storehouse === '') {
callback(new Error('内容不能为空'))
} else {
callback()
}
}
return {
formId: '',
id: '',
......@@ -99,7 +106,12 @@ export default {
],
ruleValidate: {
storehouse: [
{ required: true, message: '库房号不能为空', trigger: 'blur' }
{
required: true,
message: '库房号不能为空',
trigger: 'blur',
validator: valistorehouse
}
]
},
showEditModal: false,
......@@ -183,6 +195,7 @@ export default {
console.log(data)
data.ids = this.id
this._instockSubmit(data)
this._hideLoading()
} else {
this.$Message.error('表单验证失败!')
this._hideLoading()
......
......@@ -146,9 +146,6 @@ export default {
}
}
},
mounted() {
this._page()
},
methods: {
// 操作按钮
_btnClick(msg, currentComponent) {
......
<template>
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="收样样品查询" name="wait"></el-tab-pane>
<el-tab-pane label="检测样品查询" name="his"></el-tab-pane>
</el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div>
</div>
</div>
</template>
<script>
import MeterSendEntrust from './AddressManage'
import MeterSendEntrustHis from './AddressManageHis'
export default {
name: 'MeterSendEntrustIndex',
components: {
// eslint-disable-next-line vue/no-unused-components
MeterSendEntrust,
// eslint-disable-next-line vue/no-unused-components
MeterSendEntrustHis
},
data() {
return {
activeName: 'wait',
currentComponent: ''
}
},
mounted() {
this.activeName = 'wait'
this.currentComponent = 'MeterSendEntrust'
this.$nextTick(() => {
this.$refs.refModal._page()
})
},
methods: {
_changeTabs(tab, event) {
if (tab.name === 'wait') {
this.currentComponent = 'MeterSendEntrust'
this.$nextTick(() => {
this.$refs.refModal._page()
})
} else {
this.currentComponent = 'MeterSendEntrustHis'
this.$nextTick(() => {
this.$refs.refModal._page()
})
}
}
}
}
</script>
<style scoped>
</style>
......@@ -5,16 +5,16 @@
<Row style="margin-top: 10px;">
<Form id="search-form-sample-progress" :label-width="80" inline onsubmit="return false">
<Form-item label="试验名称:" class="search-item">
<Input v-model="formObj.name" name="name" placeholder="请输入试验名称" style="width:100%" clearable @on-enter="_search"></Input>
<Input v-model="formObj.name" @on-enter="_search" name="name" placeholder="请输入试验名称" style="width:100%" clearable></Input>
</Form-item>
<Form-item label="钻孔名称:" class="search-item">
<Input v-model="formObj.boreholeName" name="boreholeName" placeholder="请输入钻孔名称" style="width:100%" clearable @on-enter="_search"></Input>
<Input v-model="formObj.boreholeName" @on-enter="_search" name="boreholeName" placeholder="请输入钻孔名称" style="width:100%" clearable></Input>
</Form-item>
<Form-item class="search-item">
<Button type="primary" class="width-80" @click="_search">搜索</Button>
<Button @click="_search" type="primary" class="width-80">搜索</Button>
</Form-item>
</Form>
<Col style="height: 100%;" span="24">
<Col style="height: 400px;" span="24">
<VScrollFull ref="myscrollfull" :page-size="rows" @load="_loadData">
<div slot="empty" style="text-align:center" class="gray-color">暂无数据</div>
<SampleSteps ref="stepsModal" :info="sampleInfo"></SampleSteps>
......@@ -36,11 +36,6 @@ export default {
SampleSteps,
VScrollFull
},
computed: {
tableHeight: function() {
return this.$tableHeight('noSearch')
}
},
data() {
return {
dateList: [],
......@@ -60,6 +55,11 @@ export default {
typeList: [{ name: '企业', value: 0 }, { name: '政府', value: 1 }]
}
},
computed: {
tableHeight: function() {
return this.$tableHeight('noBtn') - 200
}
},
mounted() {
// this._initData()
},
......
......@@ -28,9 +28,9 @@
</div>
</Col>
<Col span="24">
<BtnList :msg="btn" :open="searchOpen" :showSearchBtn="true" @on-result-change="_btnClick"
<btn-list :msg="btn" :open="searchOpen" :showSearchBtn="true" @on-result-change="_btnClick"
class="contHide">
</BtnList>
</btn-list>
</Col>
<Col span="24">
<PTVXETable ref="pageTable" :pageColumns="pageColumns" :table-name="tableName"
......@@ -84,10 +84,7 @@ export default {
projectName: undefined,
siteNo: undefined
},
btn: [
{ type: 'primary', id: '', name: '导出' },
{ type: 'primary', id: '', name: '催单' }
],
btn: [],
getPage: {},
pageColumns: [
{ title: '委托编号', key: 'entrustCode', width: 130 },
......
<template>
<div>
<Form id="search-form-sample-progress" :label-width="80" inline onsubmit="return false">
<Form-item label="委托编号:" class="search-item">
<Input v-model="formObj.entrustCode" @on-enter="_search" name="entrustCode" placeholder="请输入委托编号" style="width:100%" clearable></Input>
</Form-item>
<Form-item label="钻孔名称:" class="search-item">
<Input v-model="formObj.boreholeName" @on-enter="_search" name="boreholeName" placeholder="请输入钻孔名称" style="width:100%" clearable></Input>
</Form-item>
<Form-item class="search-item">
<Button @click="_search" type="primary" class="width-80">搜索</Button>
</Form-item>
</Form>
<div v-for="(itemInfo, index) in entrustList" :key="index" class="contract-box">
<Row>
<!--样品信息-->
......@@ -34,7 +45,7 @@
<li>
<div class="title">委托日期</div>
<div class="cont">
{{$dateformat(itemInfo.entrustVO.entrustDate)}}
{{$dateformat(itemInfo.entrustVO.entrustDate,'yyyy-mm-dd HH:MM:ss')}}
</div>
</li>
<li>
......@@ -65,7 +76,7 @@
</Col>
<!--样品进度信息-->
<Col span="18">
<flowIndex></flowIndex>
<flowIndex :listInfo = itemInfo.data></flowIndex>
</Col>
</Row>
</div>
......@@ -82,7 +93,11 @@ export default {
data() {
return {
progressList: [],
entrustList: []
entrustList: [],
formObj: {
client: undefined,
boreholeName: undefined
}
}
},
watch: {
......@@ -94,8 +109,13 @@ export default {
this._getData()
},
methods: {
_search() {
this._getData()
},
_getData: async function() {
const result = await soilEntrust.listSummaryQuery()
const result = await soilEntrust.listSummaryQuery(
this.$serializeForm(this.formObj)
)
if (result) {
this.entrustList = result
console.log('this.entrustList', this.entrustList)
......
......@@ -68,40 +68,45 @@ export default {
FlowBranch,
Legend
},
props: {
// 数据源
listInfo: null
},
data() {
return {
list: {
start: [
{ name: '收样', key: 'key1' },
{ name: '任务评审', key: 'key2' },
{ name: '开土', key: 'key3' }
{ name: '收样', key: 'receiveSample' },
{ name: '任务评审', key: 'review' },
{ name: '开土', key: 'openSoil' }
],
branch: [
[
{ name: '物性试验', key: 'key4' },
{ name: '完成率', key: 'key5', line: true },
{ name: '自校版1', key: 'key6', type: 'rect' }
{ name: '物性试验', key: 'wuxing' },
{ name: '完成率', key: 'wuxingEnd', line: true },
{ name: '自校版', key: 'wuxingZiJiaoCheck', type: 'rect' }
],
[
{ name: '力学试验', key: 'key7' },
{ name: '完成率', key: 'key8', line: true },
{ name: '自校版2', key: 'key9', type: 'rect' }
{ name: '力学试验', key: 'lixue' },
{ name: '完成率', key: 'lixueEnd', line: true },
{ name: '自校版', key: 'lixueZiJiaoCheck', type: 'rect' }
],
[
{ name: '高级试验', key: 'key10' },
{ name: '完成率', key: 'key11', line: true },
{ name: '自校版1', key: 'key12', type: 'rect' }
{ name: '高级试验', key: 'gaoji' },
{ name: '完成率', key: 'gaojiEnd', line: true },
{ name: '自校版', key: 'gaojiZiJiaoCheck', type: 'rect' }
]
],
end: [
{ name: '报告编制', key: 'key13' },
{ name: '报告审核', key: 'key14' },
{ name: '报告批准', key: 'key15' },
{ name: '报告签发', key: 'key16' }
{ name: '报告编制', key: 'reportMake' },
{ name: '报告审核', key: 'reportCheck' },
{ name: '报告批准', key: 'reportIssue' },
{ name: '报告签发', key: 'reportEnd' }
]
},
// 构造数据源
obj: {}
obj: [],
nodeObj: {}
}
},
mounted() {
......@@ -109,27 +114,33 @@ export default {
},
methods: {
getData() {
if (this.listInfo) {
this.obj = this.listInfo
}
for (let j = 0; j < this.obj.length; j++) {
Object.assign(this.nodeObj, this.obj[j])
}
// 1.后台返回的数据,需要流转的全部节点数据(前后盾自己定义,对应上即可)
// key:bool (已经流转的节点为true,待流转的节点为false)
this.obj = {
key1: true,
key2: true,
key3: true,
key4: true,
key5: true,
key6: undefined,
// key7: true,
// key8: true,
// key9: true,
// key10: false,
// key11: false,
// key12: false,
key13: true,
key14: false,
key15: false,
key16: false,
key20: '20%'
}
// this.obj = {
// key1: true,
// key2: true,
// key3: true,
// key4: true,
// key5: true,
// key6: undefined,
// key7: true,
// key8: true,
// key9: true,
// key10: false,
// key11: false,
// key12: false,
// key13: true,
// key14: false,
// key15: false,
// key16: false,
// key20: '20%'
// }
// 2.前端进行过组合数据
const startArray = this.list.start
const branchArray = this.list.branch.flat() // 将一个二维数组拉平
......@@ -137,17 +148,44 @@ export default {
const allArray = startArray.concat(branchArray, endArray)
for (let i = 0; i < allArray.length; i++) {
const key = allArray[i].key
this.$set(allArray[i], 'value', this.obj[key])
if (allArray[i].key === 'key8') {
this.$set(allArray[i], 'per', this.obj.key20)
this.$set(allArray[i], 'value', this.nodeObj[key])
switch (allArray[i].key) {
case 'wuxingEnd':
this.$set(allArray[i], 'per', this.nodeObj.wuxingEndRate)
break
case 'lixueEnd':
this.$set(allArray[i], 'per', this.nodeObj.lixueEndRate)
break
case 'gaojiEnd':
this.$set(allArray[i], 'per', this.nodeObj.gaojiEndRate)
break
case 'wuxingZiJiaoCheck':
this.$set(allArray[i], 'num', this.nodeObj.wuxingZiJiao)
break
case 'lixueZiJiaoCheck':
this.$set(allArray[i], 'num', this.nodeObj.lixueZiJiao)
break
case 'gaojiZiJiaoCheck':
this.$set(allArray[i], 'num', this.nodeObj.gaojiZiJiao)
break
}
// if (allArray[i].key === 'wuxingEnd') {
// this.$set(allArray[i], 'per', this.nodeObj.wuxingEndRate)
// } else if (allArray[i].key === 'lixueEnd') {
// this.$set(allArray[i], 'per', this.nodeObj.lixueEndRate)
// } else if (allArray[i].key === 'gaojiEnd') {
// this.$set(allArray[i], 'per', this.nodeObj.gaojiEndRate)
// } else if (allArray[i].key === 'wuxingZiJiao') {
// if (this.nodeObj.wuxingZiJiao) {
// this.list.branch[0][2].name = this.nodeObj.wuxingZiJiao
// } else {
// this.list.branch[0][2].name = '自校'
// }
// }
}
console.log('allArray', allArray)
console.log('this.list', this.list)
},
// 上面连接线颜色
upLineClassObj() {
console.log('右侧线')
const valueZero = this.list.end[0].value
const upValue = this.list.branch[0][2].value
const upValueZero = this.list.branch[0][0].value
......
......@@ -56,9 +56,9 @@
<!-- <Col span="12">-->
<!-- <CustomerContract></CustomerContract>-->
<!-- </Col>-->
<!-- <Col span="24">-->
<!-- <ItemFlow></ItemFlow>-->
<!-- </Col>-->
<Col span="24">
<ItemFlow></ItemFlow>
</Col>
<div :style="{height}" v-if="moduleList.length" class="config_home">
<Row :gutter="10">
<Col
......
......@@ -10,7 +10,7 @@ import ReceiveSampleIndex from '../pages/soil-alone-sample/EntrustIndex'
import InstockIndex from '../pages/soil-alone-sample-instock/EntrustIndex'
import OutstockIndex from '../pages/soil-alone-sample-manage/soil-alone-sample-outstock/EntrustIndex'
import StorehousePlace from '../pages/soil-alone-sample-manage/storehouse-place-manage/AddressManage'
import StorehouseSample from '../pages/soil-alone-sample-manage/storehouse-sample-manage/AddressManage'
import StorehouseSample from '../pages/soil-alone-sample-manage/storehouse-sample-manage/storehouseSampleIndex'
import ReviewEntrust from '../pages/meter-entrust/entrust-review/ReviewEntrust'
import SampleReceiveIndex from '../pages/soil-sample-manage/sample-receive/SampleReceiveIndex'
import AloneKeepIndex from '../pages/soil-sample-manage/sample-alone-keep/SampleReceiveIndex'
......
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