From 6d41203724ed358d0a4a356a393ab673a82c6df6 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期五, 08 三月 2024 11:43:33 +0800
Subject: [PATCH] 修改
---
modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataAssignDao.xml | 6
/dev/null | 145 -----------------------------
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataAssignController.java | 28 +++--
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataAssign.java | 4
web/src/views/modules/basicInfo/SelectTyModel.vue | 8
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataExpectController.java | 8 -
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataExpect.java | 1
web/src/views/modules/basicInfo/ParamData.vue | 54 ++++++----
8 files changed, 62 insertions(+), 192 deletions(-)
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataAssignController.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataAssignController.java
index b5ae346..e8a2496 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataAssignController.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataAssignController.java
@@ -43,17 +43,15 @@
@GetMapping("page")
@ApiOperation("鍒嗛〉")
@ApiImplicitParams({
- @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT),
- @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT),
@ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING),
@ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING),
@ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = Constant.QT.STRING, format = "NAME^LK"),
@ApiImplicitParam(name = "nodeType", value = "绫诲瀷", dataType = Constant.QT.STRING),
- @ApiImplicitParam(name = "id", value = "涓婄骇ID", dataType = Constant.QT.STRING)
+ @ApiImplicitParam(name = "srcId", value = "ID", dataType = Constant.QT.STRING)
})
- public PageResult<ParamDataAssign> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
+ public Result<List<ParamDataAssign>> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
- return PageResult.ok(paramDataAssignService.page(queryFilter));
+ return Result.ok(paramDataAssignService.page(queryFilter));
}
@PostMapping("get")
@@ -61,7 +59,7 @@
for(ParamDataAssign assign:list){
assign.setProductId(assign.getId());
assign.setId(null);
- this.insert(assign);
+ paramDataAssignService.insert(assign);
}
return Result.ok();
}
@@ -74,14 +72,18 @@
return Result.ok(data);
}
- @PostMapping
- @ApiOperation("鏂板")
- @LogOperation("鏂板")
- public Result insert(@RequestBody ParamDataAssign paramDataAssign){
+ @PostMapping("save")
+ public Result save(@RequestBody ParamDataAssign paramDataAssign) {
//鏁堥獙鏁版嵁
- ValidatorUtils.validateEntity(paramDataAssign, AddGroup.class, DefaultGroup.class);
- paramDataAssignService.insert(paramDataAssign);
-
+ for (ParamDataAssign assign : paramDataAssign.getDataThreeList()) {
+ if (assign.getId()!=null){
+ ValidatorUtils.validateEntity(assign, UpdateGroup.class, DefaultGroup.class);
+ paramDataAssignService.update(assign);
+ }else{
+ ValidatorUtils.validateEntity(assign, AddGroup.class, DefaultGroup.class);
+ paramDataAssignService.insert(assign);
+ }
+ }
return Result.ok();
}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataExpectController.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataExpectController.java
index c5059f5..4681765 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataExpectController.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataExpectController.java
@@ -43,16 +43,14 @@
@GetMapping("page")
@ApiOperation("鍒嗛〉")
@ApiImplicitParams({
- @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT),
- @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT),
- @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING),
+ @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING),
@ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING),
@ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = Constant.QT.STRING, format = "NAME^LK"),
@ApiImplicitParam(name = "nodeType", value = "绫诲瀷", dataType = Constant.QT.STRING),
@ApiImplicitParam(name = "srcId", value = "涓婄骇ID", dataType = Constant.QT.STRING)})
- public PageResult<ParamDataExpect> page(@ApiIgnore @QueryParam QueryFilter queryFilter) {
+ public Result<List<ParamDataExpect>> page(@ApiIgnore @QueryParam QueryFilter queryFilter) {
- return PageResult.ok(paramDataExpectService.page(queryFilter));
+ return Result.ok(paramDataExpectService.page(queryFilter));
}
@PostMapping("get")
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataAssign.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataAssign.java
index 9281fcf..82df497 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataAssign.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataAssign.java
@@ -9,6 +9,7 @@
import lombok.EqualsAndHashCode;
import java.util.Date;
+import java.util.List;
/**
* param_data_assign
@@ -99,4 +100,7 @@
@TableField(exist = false)
private Long productIdInit;
+
+ @TableField(exist = false)
+ private List<ParamDataAssign> dataThreeList;
}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataExpect.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataExpect.java
index 178e1c4..df14fda 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataExpect.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataExpect.java
@@ -101,7 +101,6 @@
@TableField(exist = false)
private Long productIdInit;
- @lombok.Getter
@TableField(exist = false)
private List<ParamDataExpect> dataThreeList;
diff --git a/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataAssignDao.xml b/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataAssignDao.xml
index 8e0ba60..35e09c5 100644
--- a/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataAssignDao.xml
+++ b/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataAssignDao.xml
@@ -16,10 +16,10 @@
LEFT JOIN param_data_assign b ON b.product_id = a.id
<where>
a.is_delete = 0
- <if test="id!=null">
- and a.pid =${id}
+ <if test="srcId!=null">
+ and a.pid =${srcId}
</if>
- <if test="id==null">
+ <if test="srcId==null">
and a.pid is null
</if>
<if test="whereSql!=null">
diff --git a/web/src/views/modules/basicInfo/ParamDataExpect.vue b/web/src/views/modules/basicInfo/ParamData.vue
similarity index 91%
rename from web/src/views/modules/basicInfo/ParamDataExpect.vue
rename to web/src/views/modules/basicInfo/ParamData.vue
index 371f0a8..0f5bdd5 100644
--- a/web/src/views/modules/basicInfo/ParamDataExpect.vue
+++ b/web/src/views/modules/basicInfo/ParamData.vue
@@ -8,10 +8,11 @@
</el-col>
<el-col :span="19">
<div class="mod-basicInfo-paramDataExpect}">
- <zt-table-wraper ref="tableObj" query-url="/basicInfo/ParamDataExpect/page"
- delete-url="/basicInfo/ParamDataExpect/"
+ <zt-table-wraper ref="tableObj" :query-url=queryUrl
+ :delete-url=deleteUrl
@dataLoaded="dataLoaded"
- v-slot="{ table }">
+ v-slot="{ table }"
+ :paging='false'>
<el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
<el-form-item>
<el-input v-model="dataForm.name" placeholder="璇疯緭鍏ュ悕绉�" clearable></el-input>
@@ -50,7 +51,7 @@
</el-table-column>
<el-table-column v-if="dataForm.nodeType==='2'" :key="5" label="鍩烘湰鍙潬鎬ц绠�">
<!-- <zt-table-column-dict prop="joinCompute" :keys="6" label="鍙傚姞璁$畻" width="100" dict="is_or_not"/>-->
- <el-table-column prop="joinCompute" label="鍙傚姞璁$畻" :key="6" width="100">
+ <el-table-column prop="joinCompute" label="鍙傚姞璁$畻" :key="6" width="100">
<template v-slot="{ row }">
<el-select v-if="row.isEdit" v-model="row.joinCompute"
placeholder="鍙傚姞璁$畻">
@@ -60,7 +61,8 @@
:value="item.value">
</el-option>
</el-select>
- <zt-dict-tag dict="is_or_not" :value="row.joinCompute" :typeS="typeS" :typeI="typeI" :typeD="typeD"
+ <zt-dict-tag v-else dict="is_or_not" :value="row.joinCompute" :typeS="typeS" :typeI="typeI"
+ :typeD="typeD"
:typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/>
</template>
</el-table-column>
@@ -165,7 +167,8 @@
:value="item.value">
</el-option>
</el-select>
- <zt-dict-tag dict="is_or_not" :value="row.repairable" :typeS="typeS" :typeI="typeI" :typeD="typeD"
+ <zt-dict-tag v-else dict="is_or_not" :value="row.repairable" :typeS="typeS" :typeI="typeI"
+ :typeD="typeD"
:typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/>
</template>
</el-table-column>
@@ -180,7 +183,8 @@
:value="item.value">
</el-option>
</el-select>
- <zt-dict-tag dict="RepairDistribType" :value="row.repairDistribType" :typeS="typeS" :typeI="typeI"
+ <zt-dict-tag v-else dict="RepairDistribType" :value="row.repairDistribType" :typeS="typeS"
+ :typeI="typeI"
:typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/>
</template>
</el-table-column>
@@ -200,7 +204,8 @@
<!-- <zt-table-column-dict v-if="dataForm.nodeType==='2'" :key="27" prop="reliabDistribType" label="鍙潬鎬у垎甯冪被鍨�"
width="160"/>-->
- <el-table-column v-if="dataForm.nodeType==='2'" prop="reliabDistribType" label="鍙潬鎬у垎甯冪被鍨�" :key="27" width="160">
+ <el-table-column v-if="dataForm.nodeType==='2'" prop="reliabDistribType" label="鍙潬鎬у垎甯冪被鍨�" :key="27"
+ width="160">
<template v-slot="{ row }">
<el-select v-if="row.isEdit" v-model="row.reliabDistribType"
placeholder="褰撳墠鐘舵��">
@@ -232,7 +237,6 @@
</el-table>
<!-- 寮圭獥, 鏂板 / 淇敼 -->
- <add-or-update ref="AddOrUpdate" @refreshDataList="table.query"/>
<select-ty-model @refreshDataList="table.query" ref="SelectTyModel"/>
</zt-table-wraper>
</div>
@@ -242,13 +246,15 @@
</template>
<script>
- import AddOrUpdate from './ParamDataExpect-AddOrUpdate'
import ProductModelTree from "./ProductModelTree";
import SelectTyModel from "./SelectTyModel";
export default {
data() {
return {
+ queryUrl: '/basicInfo/ParamDataExpect/page',
+ deleteUrl: '/basicInfo/ParamDataExpect',
+ pageCode: '',
key: '',
typeS: '',
typeI: '',
@@ -259,6 +265,7 @@
effect: '',
hit: false,
dataForm: {
+ pageCode: this.$route.query.pageCode,
id: '',
pid: '',
srcId: '',
@@ -298,23 +305,36 @@
}
},
components: {
- AddOrUpdate,
ProductModelTree,
SelectTyModel
+ },
+ mounted() {
+ this.pageCode = this.$route.query.pageCode
+ this.dataForm.pageCode = this.$route.query.pageCode
+ if (this.pageCode === 'assign') {
+ this.queryUrl = '/basicInfo/ParamDataAssign/page'
+ this.deleteUrl = '/basicInfo/ParamDataAssign'
+ }
+ console.log(this.pageCode, 'this.pageCode this.pageCode')
},
methods: {
add() {
this.$refs.SelectTyModel.$refs.dialog.init(null, {
type: this.dataForm.nodeType - 1,
id: this.dataForm.id,
- data: 'expect'
+ pageCode: this.pageCode
})
},
//鎵归噺淇濆瓨
async handleSaveRows() {
this.dataForm.dataThreeList = this.$refs.tableObj.dataList
console.log(this.dataForm, 'this.dataForm this.dataForm')
- let res = await this.$http.post('/basicInfo/ParamDataExpect/save', this.dataForm)
+ let res
+ if (this.pageCode === 'Expect') {
+ res = await this.$http.post('/basicInfo/ParamDataExpect/save', this.dataForm)
+ } else {
+ res = await this.$http.post('/basicInfo/ParamDataAssign/save', this.dataForm)
+ }
if (res.success) {
console.log(res.data)
await this.$tip.success()
@@ -351,14 +371,6 @@
// })
// console.log(this.editingCell, 'this.editingCell')
// },
- update(row) {
- console.log(row, 'update')
- this.$refs.AddOrUpdate.$refs.dialog.init(row.id, {
- type: this.dataForm.nodeType,
- name: row.name,
- productId: row.productId
- })
- },
onProductSelected(data) {
this.dataForm.srcId = data.id
this.dataForm.nodeType = data.nodeType
diff --git a/web/src/views/modules/basicInfo/ParamDataAssign-AddOrUpdate.vue b/web/src/views/modules/basicInfo/ParamDataAssign-AddOrUpdate.vue
deleted file mode 100644
index 9713088..0000000
--- a/web/src/views/modules/basicInfo/ParamDataAssign-AddOrUpdate.vue
+++ /dev/null
@@ -1,144 +0,0 @@
-<template>
- <zt-dialog ref="dialog" @confirm="formSubmit">
- <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px">
- <zt-form-item label="鍚嶇О" prop="name" rules="required">
- <el-input v-model="dataForm.name"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='4'" label="鍩烘湰鍙潬鎬ц繍琛屾瘮" prop="baseOperatRatio" >
- <el-input v-model="dataForm.baseOperatRatio"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='4'||type==='5'" label="瀹為檯杩愯鏃堕棿" prop="actualRunTime" >
- <el-input v-model="dataForm.actualRunTime"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍙傚姞璁$畻" prop="joinCompute" >
- <zt-dict v-model="dataForm.joinCompute" dict="is_or_not"></zt-dict>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="瑙勫畾MTBF" prop="regulateMtbf" >
- <el-input v-model="dataForm.regulateMtbf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍙帴鍙楃殑MTBF" prop="acceptMtbf" >
- <el-input v-model="dataForm.acceptMtbf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBF瑙勫畾鎴愬姛鐜�" prop="regulSuccRateMtbf" >
- <el-input v-model="dataForm.regulSuccRateMtbf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBF鍙帴鍙楁垚鍔熺巼" prop="acceptSuccRateMtbf" >
- <el-input v-model="dataForm.acceptSuccRateMtbf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍗曞厓鏁伴噺" prop="unitNum" >
- <el-input v-model="dataForm.unitNum"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="杩愯娆℃暟" prop="runsNum" >
- <el-input v-model="dataForm.runsNum"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBF杩愯姣�" prop="operatingRatioMtbf" >
- <el-input v-model="dataForm.operatingRatioMtbf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍗曟杩愯鏃堕棿" prop="singleRunTime" >
- <el-input v-model="dataForm.singleRunTime"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="瑙勫畾MTBCF" prop="regulateMtbcf" >
- <el-input v-model="dataForm.regulateMtbcf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍙帴鍙楃殑MTBCF" prop="acceptMtbcf" >
- <el-input v-model="dataForm.acceptMtbcf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBCF瑙勫畾鎴愬姛鐜�" prop="regulSuccRateMtbcf" >
- <el-input v-model="dataForm.regulSuccRateMtbcf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBCF鍙帴鍙楁垚鍔熺巼" prop="acceptSuccRateMtbcf" >
- <el-input v-model="dataForm.acceptSuccRateMtbcf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBCF杩愯姣�" prop="operatingRatioMtbcf" >
- <el-input v-model="dataForm.operatingRatioMtbcf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBCF鍏朵粬鍙傛暟" prop="otherParamsMtbcf" >
- <el-input v-model="dataForm.otherParamsMtbcf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍙淮淇�" prop="repairable" >
- <zt-dict v-model="dataForm.repairable" dict="is_or_not"></zt-dict>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="缁翠慨鍒嗗竷绫诲瀷" prop="repairDistribType" >
- <zt-dict v-model="dataForm.repairDistribType" dict="RepairDistribType"></zt-dict>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTTCR" prop="mttcr" >
- <el-input v-model="dataForm.mttcr"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTTCR鍏朵粬鍙傛暟" prop="otherParamsMttcr" >
- <el-input v-model="dataForm.otherParamsMttcr"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍙潬鎬у垎甯冪被鍨�" prop="reliabDistribType" >
- <zt-dict v-model="dataForm.reliabDistribType" dict="ReliabDistribType"></zt-dict>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="杩愯鏃堕棿" prop="runTime" >
- <el-input v-model="dataForm.runTime"></el-input>
- </zt-form-item>
- </el-form>
- </zt-dialog>
-</template>
-
-<script>
- export default {
- data() {
- return {
- type:'',
- dataForm: {
- id: '',
- pid: '',
- name: '',
- baseOperatRatio: '',
- actualRunTime: '',
- joinCompute: '',
- regulateMtbf: '',
- acceptMtbf: '',
- regulSuccRateMtbf: '',
- acceptSuccRateMtbf: '',
- unitNum: '',
- runsNum: '',
- operatingRatioMtbf: '',
-
- singleRunTime: '',
- regulateMtbcf: '',
- acceptMtbcf: '',
- regulSuccRateMtbcf: '',
- acceptSuccRateMtbcf: '',
- operatingRatioMtbcf: '',
- otherParamsMtbcf: '',
- repairable: '',
- repairDistribType: '',
- mttcr: '',
- otherParamsMttcr: '',
- reliabDistribType: '',
- runTime: '',
- productId: ''
- }
- }
- },
- methods: {
- init(id,params){
- this.dataForm.id =id
- this.type =params.type
- this.dataForm.name =params.name
- this.dataForm.productId =params.productId
- console.log(this.type,'init')
- },
- // 鑾峰彇淇℃伅
- async getInfo() {
- let res = await this.$http.get(`/basicInfo/ParamDataAssign/${this.dataForm.id}`)
- this.dataForm = {
- ...this.dataForm,
- ...res.data
- }
- },
- // 琛ㄥ崟鎻愪氦
- async formSubmit() {
- let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/ParamDataAssign/', this.dataForm)
- if (res.success) {
- await this.$tip.success()
- this.$refs.dialog.close()
- this.$emit('refreshDataList')
- }
- }
- }
- }
-</script>
diff --git a/web/src/views/modules/basicInfo/ParamDataAssign.vue b/web/src/views/modules/basicInfo/ParamDataAssign.vue
deleted file mode 100644
index fd18827..0000000
--- a/web/src/views/modules/basicInfo/ParamDataAssign.vue
+++ /dev/null
@@ -1,138 +0,0 @@
-<template>
- <div>
- <el-row :gutter="20">
- <el-col :span="5">
- <div class="fa-card-a">
- <product-model-tree @on-selected="onProductSelected"/>
- </div>
- </el-col>
- <el-col :span="19">
- <div class="mod-basicInfo-paramDataAssign}">
- <zt-table-wraper query-url="/basicInfo/ParamDataAssign/page" delete-url="/basicInfo/ParamDataAssign"
- v-slot="{ table }">
- <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
- <el-form-item>
- <zt-button type="query" @click="table.query()"/>
- <zt-button type="add" v-if="dataForm.nodeType==='2'" @click="add()"/>
- <zt-button type="delete" perm="basicInfo:delete" @click="table.deleteHandle()"/>
- </el-form-item>
- </el-form>
- <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px"
- class="paramsDataTable"
- v-adaptive="{bottomOffset:70}" border @selection-change="table.selectionChangeHandle">
- <el-table-column type="selection" :key="1" width="40" align="center"/>
- <el-table-column prop="name" :key="2" label="鍚嶇О"/>
- <el-table-column v-if="dataForm.nodeType==='4'" :key="3" prop="baseOperatRatio" label="鍩烘湰鍙潬鎬ц繍琛屾瘮"/>
- <el-table-column v-if="dataForm.nodeType==='5'||dataForm.nodeType==='4'" :key="4" prop="actualRunTime"
- label="瀹為檯杩愯鏃堕棿"/>
- <el-table-column v-if="dataForm.nodeType==='2'" :key="5" label="鍩烘湰鍙潬鎬ц绠�">
- <!-- <zt-table-column-dict prop="joinCompute" :keys="6" label="鍙傚姞璁$畻" width="100" dict="is_or_not"/>-->
- <el-table-column prop="joinCompute" label="鍙傚姞璁$畻" :key="6" v-slot="{ row }" width="100">
- <zt-dict-tag dict="is_or_not" :value="row.joinCompute" :typeS="typeS" :typeI="typeI" :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/>
- </el-table-column>
- <el-table-column prop="regulateMtbf" :key="7" label="瑙勫畾MTBF" width="120"/>
- <el-table-column prop="acceptMtbf" :key="8" label="鍙帴鍙楃殑MTBF" width="160"/>
- <el-table-column prop="regulSuccRateMtbf" :key="9" label="MTBF瑙勫畾鎴愬姛鐜�" width="180"/>
- <el-table-column prop="acceptSuccRateMtbf" :key="10" label="MTBF鍙帴鍙楁垚鍔熺巼" width="180"/>
- <el-table-column prop="unitNum" label="鍗曞厓鏁伴噺" :key="11" width="100"/>
- <el-table-column prop="runsNum" label="杩愯娆℃暟" :key="12" width="100"/>
- <el-table-column prop="operatingRatioMtbf" :key="13" label="MTBF杩愯姣�" width="140"/>
- <el-table-column prop="singleRunTime" :key="14" label="鍗曟杩愯鏃堕棿" width="140"/>
- </el-table-column>
-
- <el-table-column v-if="dataForm.nodeType==='2'" :key="15" label="浠诲姟鍙潬鎬ц绠�">
- <el-table-column prop="regulateMtbcf" :key="16" label="瑙勫畾MTBCF" width="120"/>
- <el-table-column prop="acceptMtbcf" :key="17" label="鍙帴鍙楃殑MTBCF" width="160"/>
- <el-table-column prop="regulSuccRateMtbcf" :key="18" label="MTBCF瑙勫畾鎴愬姛鐜�" width="180"/>
- <el-table-column prop="acceptSuccRateMtbcf" :key="19" label="MTBCF鍙帴鍙楁垚鍔熺巼" width="200"/>
- <el-table-column prop="operatingRatioMtbcf" :key="20" label="MTBCF杩愯姣�" width="140"/>
- <el-table-column prop="otherParamsMtbcf" :key="21" label="MTBCF鍏朵粬鍙傛暟" width="160"/>
- </el-table-column>
-
- <el-table-column v-if="dataForm.nodeType==='2'" :key="22" label="缁翠慨鍒嗗竷">
- <!-- <zt-table-column-dict prop="repairable" :keys="23" label="鍙淮淇�" dict="is_or_not"/>-->
- <el-table-column prop="repairable" label="鍙淮淇�" :key="23" v-slot="{ row }">
- <zt-dict-tag dict="is_or_not" :value="row.repairable" :typeS="typeS" :typeI="typeI" :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/>
- </el-table-column>
- <!-- <zt-table-column-dict prop="repairDistribType" :keys="24" label="缁翠慨鍒嗗竷绫诲瀷" width="140" dict="RepairDistribType"/>-->
- <el-table-column prop="repairDistribType" label="缁翠慨鍒嗗竷绫诲瀷" :key="24" v-slot="{ row }" width="140">
- <zt-dict-tag dict="RepairDistribType" :value="row.repairDistribType" :typeS="typeS" :typeI="typeI" :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/>
- </el-table-column>
- <el-table-column prop="mttcr" label="MTTCR" :key="25" width="100"/>
- <el-table-column prop="otherParamsMttcr" :key="26" label="MTTCR鍏朵粬鍙傛暟" width="180"/>
- </el-table-column>
-
- <!-- <zt-table-column-dict v-if="dataForm.nodeType==='2'" :key="27" prop="reliabDistribType" label="鍙潬鎬у垎甯冪被鍨�"
- width="160"/>-->
- <el-table-column prop="reliabDistribType" label="鍙潬鎬у垎甯冪被鍨�" :key="27" v-slot="{ row }" width="160">
- <zt-dict-tag dict="ReliabDistribType" :value="row.repairDistribType" :typeS="typeS" :typeI="typeI" :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/>
- </el-table-column>
- <el-table-column v-if="dataForm.nodeType==='2'" :key="28" prop="runTime" label="杩愯鏃堕棿" width="100"
- dict="ReliabDistribType"/>
- <zt-table-column-handle :table="table" delete-perm="basicInfo::delete" edit-perm="basicInfo::update">
- <template v-slot="{ row }">
- <zt-table-button @click="update(row)">淇敼</zt-table-button>
- </template>
- </zt-table-column-handle>
- </el-table>
- <!-- 寮圭獥, 鏂板 / 淇敼 -->
- <add-or-update ref="AddOrUpdate" @refreshDataList="table.query"/>
- <select-ty-model @refreshDataList="table.query" ref="SelectTyModel"/>
- </zt-table-wraper>
- </div>
- </el-col>
- </el-row>
- </div>
-</template>
-
-<script>
- import AddOrUpdate from './ParamDataAssign-AddOrUpdate'
- import ProductModelTree from "./ProductModelTree";
- import SelectTyModel from "./SelectTyModel";
-
- export default {
- data() {
- return {
- key:'',
- typeS: '',
- typeI: '',
- typeW: '',
- typeD: '',
- typeColor: {},
- size: '',
- effect: '',
- hit: false,
- dataForm: {
- name: '',
- id: '',
- nodeType: '5'
- }
- }
- },
- components: {
- AddOrUpdate,
- ProductModelTree,
- SelectTyModel
- },
- methods: {
- add() {
- this.$refs.SelectTyModel.$refs.dialog.init(null,{type: this.dataForm.nodeType - 1, id: this.dataForm.id,data:'assign'})
- },
- update(row){
- console.log(row,'update')
- this.$refs.AddOrUpdate.$refs.dialog.init(row.id,{type: this.dataForm.nodeType,name:row.name,productId:row.productId})
- },
- onProductSelected(data) {
- this.dataForm.id = data.id
- this.dataForm.nodeType = data.nodeType
- console.log(data, 'onProductSelected(data)')
- this.$refs.tableObj.query()
- }
- }
- }
-</script>
-<style>
- .paramsDataTable.el-table thead.is-group th {
- background: #edf6ff;
- }
-</style>
diff --git a/web/src/views/modules/basicInfo/ParamDataExpect-AddOrUpdate.vue b/web/src/views/modules/basicInfo/ParamDataExpect-AddOrUpdate.vue
deleted file mode 100644
index fb6f074..0000000
--- a/web/src/views/modules/basicInfo/ParamDataExpect-AddOrUpdate.vue
+++ /dev/null
@@ -1,145 +0,0 @@
-<template>
- <zt-dialog ref="dialog" @confirm="formSubmit">
- <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px">
- <zt-form-item label="鍚嶇О" prop="name" rules="required">
- <el-input v-model="dataForm.name"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='4'" label="鍩烘湰鍙潬鎬ц繍琛屾瘮" prop="baseOperatRatio" >
- <el-input v-model="dataForm.baseOperatRatio"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='4'||type==='5'" label="瀹為檯杩愯鏃堕棿" prop="actualRunTime" >
- <el-input v-model="dataForm.actualRunTime"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍙傚姞璁$畻" prop="joinCompute" >
- <zt-dict v-model="dataForm.joinCompute" dict="is_or_not"></zt-dict>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="瑙勫畾MTBF" prop="regulateMtbf" >
- <el-input v-model="dataForm.regulateMtbf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍙帴鍙楃殑MTBF" prop="acceptMtbf" >
- <el-input v-model="dataForm.acceptMtbf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBF瑙勫畾鎴愬姛鐜�" prop="regulSuccRateMtbf" >
- <el-input v-model="dataForm.regulSuccRateMtbf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBF鍙帴鍙楁垚鍔熺巼" prop="acceptSuccRateMtbf" >
- <el-input v-model="dataForm.acceptSuccRateMtbf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍗曞厓鏁伴噺" prop="unitNum" >
- <el-input v-model="dataForm.unitNum"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="杩愯娆℃暟" prop="runsNum" >
- <el-input v-model="dataForm.runsNum"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBF杩愯姣�" prop="operatingRatioMtbf" >
- <el-input v-model="dataForm.operatingRatioMtbf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍗曟杩愯鏃堕棿" prop="singleRunTime" >
- <el-input v-model="dataForm.singleRunTime"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="瑙勫畾MTBCF" prop="regulateMtbcf" >
- <el-input v-model="dataForm.regulateMtbcf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍙帴鍙楃殑MTBCF" prop="acceptMtbcf" >
- <el-input v-model="dataForm.acceptMtbcf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBCF瑙勫畾鎴愬姛鐜�" prop="regulSuccRateMtbcf" >
- <el-input v-model="dataForm.regulSuccRateMtbcf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBCF鍙帴鍙楁垚鍔熺巼" prop="acceptSuccRateMtbcf" >
- <el-input v-model="dataForm.acceptSuccRateMtbcf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBCF杩愯姣�" prop="operatingRatioMtbcf" >
- <el-input v-model="dataForm.operatingRatioMtbcf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTBCF鍏朵粬鍙傛暟" prop="otherParamsMtbcf" >
- <el-input v-model="dataForm.otherParamsMtbcf"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍙淮淇�" prop="repairable" >
- <zt-dict v-model="dataForm.repairable" dict="is_or_not"></zt-dict>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="缁翠慨鍒嗗竷绫诲瀷" prop="repairDistribType" >
- <zt-dict v-model="dataForm.repairDistribType" dict="RepairDistribType"></zt-dict>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTTCR" prop="mttcr" >
- <el-input v-model="dataForm.mttcr"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="MTTCR鍏朵粬鍙傛暟" prop="otherParamsMttcr" >
- <el-input v-model="dataForm.otherParamsMttcr"></el-input>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="鍙潬鎬у垎甯冪被鍨�" prop="reliabDistribType" >
- <zt-dict v-model="dataForm.reliabDistribType" dict="ReliabDistribType"></zt-dict>
- </zt-form-item>
- <zt-form-item v-if="type==='2'" label="杩愯鏃堕棿" prop="runTime" >
- <el-input v-model="dataForm.runTime"></el-input>
- </zt-form-item>
- </el-form>
- </zt-dialog>
-</template>
-
-<script>
- export default {
- data() {
- return {
- type:'',
- dataForm: {
- id: '',
- pid: '',
- srcId: '',
- name: '',
- baseOperatRatio: '',
- actualRunTime: '',
- joinCompute: '',
- regulateMtbf: '',
- acceptMtbf: '',
- regulSuccRateMtbf: '',
- acceptSuccRateMtbf: '',
- unitNum: '',
- runsNum: '',
- operatingRatioMtbf: '',
-
- singleRunTime: '',
- regulateMtbcf: '',
- acceptMtbcf: '',
- regulSuccRateMtbcf: '',
- acceptSuccRateMtbcf: '',
- operatingRatioMtbcf: '',
- otherParamsMtbcf: '',
- repairable: '',
- repairDistribType: '',
- mttcr: '',
- otherParamsMttcr: '',
- reliabDistribType: '',
- runTime: '',
- productId: ''
- }
- }
- },
- methods: {
- init(id,params){
- this.dataForm.id =id
- this.type =params.type
- this.dataForm.name =params.name
- this.dataForm.productId =params.productId
- console.log(this.type,'init')
- },
- // 鑾峰彇淇℃伅
- async getInfo() {
- let res = await this.$http.get(`/basicInfo/ParamDataExpect/${this.dataForm.id}`)
- this.dataForm = {
- ...this.dataForm,
- ...res.data
- }
- },
- // 琛ㄥ崟鎻愪氦
- async formSubmit() {
- let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/ParamDataExpect/', this.dataForm)
- if (res.success) {
- await this.$tip.success()
- this.$refs.dialog.close()
- this.$emit('refreshDataList')
- }
- }
- }
- }
-</script>
diff --git a/web/src/views/modules/basicInfo/SelectTyModel.vue b/web/src/views/modules/basicInfo/SelectTyModel.vue
index f290609..adb7a5f 100644
--- a/web/src/views/modules/basicInfo/SelectTyModel.vue
+++ b/web/src/views/modules/basicInfo/SelectTyModel.vue
@@ -45,8 +45,8 @@
init(id,params) {
this.dataForm.nodeType = params.type
this.dataForm.pid = params.id
- this.data = params.data
- if (this.data ==='expect'||this.data==='assign'){
+ this.pageCode = params.pageCode
+ if (this.pageCode ==='expect'||this.pageCode==='assign'){
this.url='/basicInfo/XhProductModel/page'
}
console.log(this.dataForm.pid, 'init()')
@@ -62,9 +62,9 @@
},
async formSubmit() {
let res
- if (this.data && this.data === 'expect'){
+ if (this.pageCode && this.pageCode === 'expect'){
res = await this.$http.post('/basicInfo/ParamDataExpect/get', this.selectList)
- }else if(this.data && this.data === 'assign') {
+ }else if(this.pageCode && this.pageCode === 'assign') {
res = await this.$http.post('/basicInfo/ParamDataAssign/get', this.selectList)
}else
{
--
Gitblit v1.9.1