|
@@ -53,6 +53,7 @@
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <template v-if="toggleSearchStatus">
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
<a-form-item label="试验类型">
|
|
|
<!-- <j-dict-select-tag placeholder="请选择试验类型" v-model="queryParam.shiyanType" dictCode="shiiyan_type"/> -->
|
|
@@ -61,18 +62,18 @@
|
|
|
placeholder="请选择实验类型"
|
|
|
show-search
|
|
|
allowClear
|
|
|
- :options="shiyanTypeOption">
|
|
|
+ :options="shiyanTypeOption"
|
|
|
+ @change="getSj">
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <template v-if="toggleSearchStatus">
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
<a-form-item label="试验开始时间">
|
|
|
<a-time-picker
|
|
|
style="width: 100%"
|
|
|
format="HH:mm"
|
|
|
:valueFormat="'HH:mm'"
|
|
|
- v-model="shiyanKaishitime"
|
|
|
+ v-model="queryParam2.shiyanKaishitime"
|
|
|
placeholder="请选择试验开始时间"
|
|
|
/>
|
|
|
</a-form-item>
|
|
@@ -83,14 +84,14 @@
|
|
|
style="width: 100%"
|
|
|
format="HH:mm"
|
|
|
:valueFormat="'HH:mm'"
|
|
|
- v-model="shiyanJieshutime"
|
|
|
+ v-model="queryParam2.shiyanJieshutime"
|
|
|
placeholder="请选择结束时间"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
<a-form-item label="频次">
|
|
|
- <a-input placeholder="请输入频次(分钟)" v-model="pinci"></a-input>
|
|
|
+ <a-input placeholder="请输入频次(分钟)" v-model="queryParam2.pinci"></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
@@ -204,6 +205,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { httpAction, getAction } from '@/api/manage'
|
|
|
import { mixinDevice } from '@/utils/mixin'
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
// import {initDictOptions, filterDictText} from '@/components/dict/JDictSelectUtil'
|
|
@@ -229,9 +231,8 @@ export default {
|
|
|
weituoGdOptions: [],
|
|
|
// 实验类型下拉列表
|
|
|
shiyanTypeOption: [],
|
|
|
- shiyanKaishitime: '',
|
|
|
- shiyanJieshutime: '',
|
|
|
- pinci: '',
|
|
|
+ // 新增默认的试验类型
|
|
|
+ shiyanType: '',
|
|
|
// url: {
|
|
|
// list: '/itdmgomgongdanshuju/ItdmGongdanshuju/list',
|
|
|
// },
|
|
@@ -316,6 +317,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
+ this.toggleSearchStatus = true;
|
|
|
},
|
|
|
// // 获取字典数据-试验类型
|
|
|
// initDictConfig() {
|
|
@@ -337,8 +339,9 @@ export default {
|
|
|
// 获取试验类型
|
|
|
getWoId(value){
|
|
|
// this.queryParam = {...this.queryParam}
|
|
|
- const query ={}
|
|
|
this.shiyanTypeOption = []
|
|
|
+ this.queryParam2.shiyanType = ''
|
|
|
+ const query ={}
|
|
|
query.riqi = this.queryParam2.riqi
|
|
|
query.woId = this.queryParam.woId
|
|
|
console.log(query,this.queryParam,this.queryParam2)
|
|
@@ -352,12 +355,31 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ // 获取实绩开始时间结束时间
|
|
|
+ getSj(){
|
|
|
+ this.queryParam2 = {...this.queryParam2}
|
|
|
+ // this.queryParam2.shiyanKaishitime = ''
|
|
|
+ // this.queryParam2.shiyanJieshutime = ''
|
|
|
+ const query ={}
|
|
|
+ query.riqi = this.queryParam2.riqi
|
|
|
+ query.woId = this.queryParam.woId
|
|
|
+ query.shiyanType = this.queryParam2.shiyanType
|
|
|
+ console.log(query)
|
|
|
+ getWeiSj(query).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ this.queryParam2.shiyanKaishitime = res.result.shiyanKaishitime
|
|
|
+ this.queryParam2.shiyanJieshutime = res.result.shiyanJieshutime
|
|
|
+ this.queryParam2 = {...this.queryParam2}
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取已生成的数据列表
|
|
|
getList(){
|
|
|
this.loading = true
|
|
|
console.log(2222,this.queryParam)
|
|
|
listSj(this.queryParam).then((res) => {
|
|
|
console.log(res)
|
|
|
this.dataSource = res.result
|
|
|
+ this.shiyanType = res.result[0].shiyanType
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
@@ -370,6 +392,7 @@ export default {
|
|
|
async insertEvent () {
|
|
|
const $table = this.$refs.xTable
|
|
|
const record = {
|
|
|
+ // shiyanType: this.shiyanType,
|
|
|
shiyanType: '',
|
|
|
shiyanTime: '',
|
|
|
shiyanWendu: '',
|
|
@@ -392,10 +415,21 @@ export default {
|
|
|
|
|
|
// 提交
|
|
|
submitSJ(){
|
|
|
- this.dataSource = this.$refs.xTable.afterFullData
|
|
|
- // console.log(this.dataSource)
|
|
|
- saveSj(this.dataSource).then((res) => {
|
|
|
+ const querySubmit = {}
|
|
|
+ querySubmit.woId = this.queryParam.woId
|
|
|
+ querySubmit.shiyanDateTime = this.queryParam2.riqi
|
|
|
+ querySubmit.list = this.$refs.xTable.afterFullData
|
|
|
+ console.log(777,querySubmit)
|
|
|
+ saveSj(querySubmit).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success("提交成功")
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
})
|
|
|
+ // this.dataSource = this.$refs.xTable.afterFullData
|
|
|
+ // console.log(this.dataSource)
|
|
|
+ // saveSj(this.dataSource).then((res) => {
|
|
|
+ // })
|
|
|
},
|
|
|
// 上传附件打开
|
|
|
submitFJ(){
|
|
@@ -424,9 +458,11 @@ export default {
|
|
|
create() {
|
|
|
|
|
|
var select = this.queryParam
|
|
|
- select.shiyanKaishitime = this.shiyanKaishitime
|
|
|
- select.shiyanJieshutime = this.shiyanJieshutime
|
|
|
- select.pinci = this.pinci
|
|
|
+ select.riqi = this.queryParam2.riqi
|
|
|
+ select.shiyanType = this.queryParam2.shiyanType
|
|
|
+ select.shiyanKaishitime = this.queryParam2.shiyanKaishitime
|
|
|
+ select.shiyanJieshutime = this.queryParam2.shiyanJieshutime
|
|
|
+ select.pinci = this.queryParam2.pinci
|
|
|
|
|
|
httpAction('/itdmgomgongdanshuju/ItdmGongdanshuju/create',select, 'post').then((res) => {
|
|
|
if (res.success) {
|