From d9461a1740bbc5d8d03258e4db0722aa9655d712 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期日, 07 四月 2024 08:34:00 +0800
Subject: [PATCH] 修改
---
web/src/views/modules/basicInfo/ProductModelTree.vue | 3
web/src/views/modules/taskReliability/Task-AddOrUpdate.vue | 4
modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml | 31 +++-
web/src/views/modules/taskReliability/OperatCondit.vue | 12 -
web/src/views/modules/basicInfo/ParamData.vue | 18 +-
web/src/views/modules/taskReliability/Task.vue | 8
web/src/views/modules/taskReliability/OperatConditModel.vue | 8 -
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/TyProductModelController.java | 2
modules/mainPart/src/main/resources/mapper/taskReliability/TaskPhaseDao.xml | 9 +
web/packages/views/modules/sys/menu.vue | 6 -
web/src/views/modules/taskReliability/TaskPhaseModel.vue | 7
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/TyProductModelService.java | 8
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java | 2
web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue | 26 +++
web/src/views/modules/basicInfo/TyProductModel-AddOrUpdate.vue | 24 +++
web/src/views/modules/basicInfo/XhProductModel.vue | 20 ++-
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/TaskPhase.java | 3
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/TyProductModelDao.java | 2
web/src/views/modules/taskReliability/TaskPhase-AddOrUpdate.vue | 6
web/src/views/modules/taskReliability/TaskPhase.vue | 29 ++--
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java | 2
modules/mainPart/src/main/resources/mapper/taskReliability/TaskDao.xml | 8 +
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/Task.java | 3
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java | 6
web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue | 11 -
web/src/views/modules/taskReliability/ModelRbd.vue | 8
modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataDao.xml | 21 +--
modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml | 10 +
web/src/assets/css/custom.css | 4
web/packages/assets/css/base.css | 4
30 files changed, 186 insertions(+), 119 deletions(-)
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/TyProductModelController.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/TyProductModelController.java
index 2243a17..e0882fc 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/TyProductModelController.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/TyProductModelController.java
@@ -89,7 +89,7 @@
public Result insert(@RequestBody TyProductModel tyProductModel){
//鏁堥獙鏁版嵁
ValidatorUtils.validateEntity(tyProductModel, AddGroup.class, DefaultGroup.class);
- Integer no = tyProductModelService.getNo(tyProductModel.getPid());
+ Integer no = tyProductModelService.getNo(tyProductModel.getPid(),tyProductModel.getNodeType());
tyProductModel.setSort(no + 1);
tyProductModelService.insert(tyProductModel);
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
index 1edde61..5f5a1ca 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
@@ -103,7 +103,7 @@
//鏁堥獙鏁版嵁
ValidatorUtils.validateEntity(xhProductModel, AddGroup.class, DefaultGroup.class);
- Integer no = xhProductModelService.getNo(xhProductModel.getPid());
+ Integer no = xhProductModelService.getNo(xhProductModel.getPid(),xhProductModel.getProductType());
if (xhProductModel.getSort() < no) {
xhProductModel.setSort(no + 1);
}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/TyProductModelDao.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/TyProductModelDao.java
index 8a530e5..657f5f5 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/TyProductModelDao.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/TyProductModelDao.java
@@ -21,5 +21,5 @@
List<TyProductModel> getProductList();
- Integer getNo(Long pid);
+ Integer getNo(Long pid,String nodeType);
}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java
index 3c327f3..44c197e 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java
@@ -22,7 +22,7 @@
List<XhProductModel> getList(Map<String, Object> params);
- Integer getNo(Long pid);
+ Integer getNo(Long pid, String productType);
List<XhProductModel> getProductList();
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/TyProductModelService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/TyProductModelService.java
index 494118a..76f7555 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/TyProductModelService.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/TyProductModelService.java
@@ -48,14 +48,14 @@
public List<TyProductModel> getAllTree() {
List<TyProductModel> productList = baseDao.selectList(new QueryWrapper<TyProductModel>().eq(Constant.TableColumn.IS_DELETE,
- Constant.Bool.NO).orderByAsc(Constant.TableColumn.SORT));
+ Constant.Bool.NO).orderByAsc("node_type").orderByAsc(Constant.TableColumn.SORT));
return TreeUtils.build(productList);
}
- public Integer getNo(Long pid) {
- if (baseDao.getNo(pid) == null){
+ public Integer getNo(Long pid, String nodeType) {
+ if (baseDao.getNo(pid,nodeType) == null){
return 0;
}
- return baseDao.getNo(pid);
+ return baseDao.getNo(pid,nodeType);
}
}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java
index 911c047..96dd7ce 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java
@@ -55,11 +55,11 @@
return TreeUtils.build(productList);
}
- public Integer getNo(Long pid) {
- if (baseDao.getNo(pid) == null) {
+ public Integer getNo(Long pid, String productType) {
+ if (baseDao.getNo(pid, productType) == null) {
return 0;
}
- return baseDao.getNo(pid);
+ return baseDao.getNo(pid,productType);
}
public List<XhProductModel> getProductList() {
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/Task.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/Task.java
index de9e858..4aa1038 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/Task.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/Task.java
@@ -37,5 +37,8 @@
@TableField(exist = false)
private String name;
+ @TableField(exist = false)
+ private Double phaseDuration;
+
}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/TaskPhase.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/TaskPhase.java
index 8524d50..7ec9ee3 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/TaskPhase.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/TaskPhase.java
@@ -42,4 +42,7 @@
@TableField(exist = false)
private Long productId;
+
+ @TableField(exist = false)
+ private Double operatConditDuration;
}
diff --git a/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataDao.xml b/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataDao.xml
index 2d9c7b9..621053a 100644
--- a/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataDao.xml
+++ b/modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataDao.xml
@@ -13,9 +13,10 @@
END AS productIdInit
FROM
product_model a
- LEFT JOIN param_data b ON b.product_id = a.id and b.page_code = '${pageCode}'
+ LEFT JOIN param_data b ON b.product_id = a.id and b.page_code = '${pageCode}' and b.is_delete = 0
<where>
a.is_delete = 0
+ and a.product_type <> 10
<if test="srcId!=null">
and a.pid =${srcId}
</if>
@@ -26,19 +27,15 @@
and ${whereSql}
</if>
</where>
- <if test="orderBySql!=null">
- ORDER BY ${orderBySql}
- </if>
+ ORDER BY
+ a.product_type,a.sort
</select>
<select id="getParamData" resultType="com.zt.life.modules.mainPart.basicInfo.model.ParamData">
- SELECT
- a.*
- FROM
- param_data a
- WHERE
- a.is_delete = 0
- and a.product_id=#{productId}
- and a.page_code=#{pageCode}
+ SELECT a.*
+ FROM param_data a
+ WHERE a.is_delete = 0
+ and a.product_id = #{productId}
+ and a.page_code = #{pageCode}
limit 1
</select>
diff --git a/modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml b/modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml
index da973e9..988014f 100644
--- a/modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml
+++ b/modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml
@@ -4,20 +4,32 @@
<mapper namespace="com.zt.life.modules.mainPart.basicInfo.dao.TyProductModelDao">
<select id="getList" resultType="com.zt.life.modules.mainPart.basicInfo.model.TyProductModel">
- select a.*
- from product_model_common a
- where a.is_delete = 0
- and a.pid in (select src_id from product_model where id = ${pid})
- and ((a.node_type = 1) or (a.node_type <> 1 and id not in (select src_id from product_model where pid = ${pid})))
- <if test="orderBySql!=null">
- ORDER BY ${orderBySql}
- </if>
+ select *
+ from product_model_common
+ where is_delete = 0
+ AND (
+ -- 濡傛灉瀛愭煡璇㈣繑鍥炵粨鏋滀负绌猴紝鍒欐鏌.pid鏄惁涓虹┖
+ (SELECT src_id FROM product_model WHERE id = ${pid} AND is_delete = 0) IS NULL
+ AND pid IS NULL
+ OR
+ -- 鍚﹀垯锛屾鏌.pid鏄惁鍦ㄥ瓙鏌ヨ缁撴灉涓�
+ pid IN (
+ SELECT src_id
+ FROM product_model
+ WHERE id = ${pid}
+ AND is_delete = 0
+ )
+ )
+ and ((node_type = 1) or (node_type <> 1 and id not in (select src_id from product_model where pid =
+ ${pid} and is_delete=0)))
+ ORDER BY
+ node_type,sort
</select>
<select id="getProductList" resultType="com.zt.life.modules.mainPart.basicInfo.model.TyProductModel">
select a.name, a.id
from product_model_common a
where a.is_delete = 0
- and a.node_type != 1
+ and a.node_type <> 1
</select>
<select id="getNo" resultType="java.lang.Integer">
SELECT COUNT(*)
@@ -30,6 +42,7 @@
<if test="pid==null">
and pid is null
</if>
+ and node_type =${nodeType}
</where>
Group by node_type
</select>
diff --git a/modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml b/modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml
index b4287cb..5bb9c6b 100644
--- a/modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml
+++ b/modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml
@@ -4,10 +4,10 @@
<mapper namespace="com.zt.life.modules.mainPart.basicInfo.dao.XhProductModelDao">
<select id="getList" resultType="com.zt.life.modules.mainPart.basicInfo.model.XhProductModel">
- select a.*
- from product_model a
+ select *
+ from product_model
<where>
- a.is_delete = 0
+ is_delete = 0
<if test="pid!=null">
and pid =${pid}
</if>
@@ -18,7 +18,8 @@
and ${whereSql}
</if>
</where>
- ORDER BY sort
+ ORDER BY
+ product_type,sort
</select>
<select id="getNo" resultType="java.lang.Integer">
SELECT COUNT(*)
@@ -31,6 +32,7 @@
<if test="pid==null">
and pid is null
</if>
+ and product_type =${productType}
</where>
Group by product_type
</select>
diff --git a/modules/mainPart/src/main/resources/mapper/taskReliability/TaskDao.xml b/modules/mainPart/src/main/resources/mapper/taskReliability/TaskDao.xml
index 6ed4005..1b7c0cd 100644
--- a/modules/mainPart/src/main/resources/mapper/taskReliability/TaskDao.xml
+++ b/modules/mainPart/src/main/resources/mapper/taskReliability/TaskDao.xml
@@ -4,8 +4,12 @@
<mapper namespace="com.zt.life.modules.mainPart.taskReliability.dao.TaskDao">
<select id="getList" resultType="com.zt.life.modules.mainPart.taskReliability.model.Task">
- select a.*
- from task a
+ select a.*,
+ b.phaseDuration
+ FROM
+ task a
+ LEFT JOIN (select task_id , SUM(phase_duration_rate) as phaseDuration from task_phase
+ where is_delete =0 group by task_id) b ON a.id = b.task_id
<where>
a.is_delete = 0
and a.product_id=${productId}
diff --git a/modules/mainPart/src/main/resources/mapper/taskReliability/TaskPhaseDao.xml b/modules/mainPart/src/main/resources/mapper/taskReliability/TaskPhaseDao.xml
index 091e73e..7103f5b 100644
--- a/modules/mainPart/src/main/resources/mapper/taskReliability/TaskPhaseDao.xml
+++ b/modules/mainPart/src/main/resources/mapper/taskReliability/TaskPhaseDao.xml
@@ -4,8 +4,13 @@
<mapper namespace="com.zt.life.modules.mainPart.taskReliability.dao.TaskPhaseDao">
<select id="getList" resultType="com.zt.life.modules.mainPart.taskReliability.model.TaskPhase">
- select a.*
- from task_phase a
+ SELECT
+ a.*,
+ b.operatConditDuration
+ FROM
+ task_phase a
+ LEFT JOIN (select phase_id , SUM(operat_condit_duration_rate) as operatConditDuration from task_phase_model
+ where is_delete =0 group by phase_id) b ON a.id = b.phase_id
<where>
a.is_delete = 0
and a.task_id=${taskId}
diff --git a/web/packages/assets/css/base.css b/web/packages/assets/css/base.css
index ee8f06a..bfb267a 100644
--- a/web/packages/assets/css/base.css
+++ b/web/packages/assets/css/base.css
@@ -30,6 +30,10 @@
.zt .el-table th.is-center {
text-align: center;
}
+.zt .el-table td.is-left,
+.zt .el-table th.is-left {
+ text-align: left;
+}
.zt .el-table td.is-right,
.zt .el-table th.is-right {
text-align: right;
diff --git a/web/packages/views/modules/sys/menu.vue b/web/packages/views/modules/sys/menu.vue
index 39c8586..a7fb48f 100644
--- a/web/packages/views/modules/sys/menu.vue
+++ b/web/packages/views/modules/sys/menu.vue
@@ -9,7 +9,6 @@
</el-form>
<el-table v-loading="table.dataLoading" :data="table.dataList" border row-key="id"
class="myTable"
- :cell-style="cellStyle"
v-adaptive="{bottomOffset:30}"
height="100px"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
@@ -53,11 +52,6 @@
AddOrUpdate
},
methods: {
- cellStyle({column}) {
- if (column.label === '鍚嶇О') {
- return 'text-align: left !important;'
- }
- },
isNotPlatform(row) {
return true;
return !this.$equalsIgnoreType(row.type, this.$dict.MenuType.PLATFORM)// 骞冲彴涓嶅厑璁镐慨鏀瑰垹闄�
diff --git a/web/src/assets/css/custom.css b/web/src/assets/css/custom.css
index 517ef4c..cb870e5 100644
--- a/web/src/assets/css/custom.css
+++ b/web/src/assets/css/custom.css
@@ -275,9 +275,9 @@
/*text-align: left !important;*/
/*}*/
/* tree table绗竴鍒楀眳涓� */
-.zt .el-table tbody tr[class*="el-table__row--level-"] td:first-child {
+/*.zt .el-table tbody tr[class*="el-table__row--level-"] td:first-child {
text-align: center;
-}
+}*/
/* 琛ㄦ牸閫変腑棰滆壊 */
.zt .el-table__body tr.current-row>td {
background-color: #bce4e1;
diff --git a/web/src/views/modules/basicInfo/ParamData.vue b/web/src/views/modules/basicInfo/ParamData.vue
index a519745..198edf7 100644
--- a/web/src/views/modules/basicInfo/ParamData.vue
+++ b/web/src/views/modules/basicInfo/ParamData.vue
@@ -27,17 +27,17 @@
<zt-dict v-model="dataForm.repairDistribType" dict="RepairDistribType" placeholder="璇烽�夋嫨缁翠慨鍒嗗竷绫诲瀷" clearable></zt-dict>
</el-form-item>
<el-form-item>
- <zt-button type="warning" @click="handleSaveRows">淇濆瓨</zt-button>
- <zt-button type="query" @click="table.query()"/>
+ <zt-button v-if="dataForm.srcId" type="warning" @click="handleSaveRows">淇濆瓨</zt-button>
+ <zt-button v-if="dataForm.srcId" type="query" @click="table.query()"/>
<zt-button type="add" v-if="dataForm.productType==='3'" @click="add()"/>
- <zt-button type="delete" @click="table.deleteHandle()"/>
+ <zt-button v-if="dataForm.srcId" type="delete" @click="table.deleteHandle()"/>
</el-form-item>
</el-form>
<el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}"
class="paramsDataTable"
@selection-change="table.selectionChangeHandle">
<el-table-column type="selection" :key="1" width="40" align="center"/>
- <el-table-column prop="name" :key="2" label="鍚嶇О" fixed="left"/>
+ <el-table-column prop="name" :key="2" label="鍚嶇О" fixed="left" width="140"/>
<el-table-column v-if="dataForm.productType==='4'" :key="3" prop="baseOperatRatio" label="鍩烘湰鍙潬鎬ц繍琛屾瘮">
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit" v-model="scope.row.baseOperatRatio"></el-input>
@@ -57,7 +57,7 @@
<span v-else v-text="scope.row.actualRunTime"></span>
</template>
</el-table-column>
- <el-table-column v-if="dataForm.productType==='3'" :key="5" label="鍩烘湰鍙潬鎬ц绠�">
+ <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :key="5" label="鍩烘湰鍙潬鎬ц绠�">
<!-- <zt-table-column-dict prop="joinCompute" :keys="6" label="鍙傚姞璁$畻" width="100" dict="is_or_not"/>-->
<el-table-column prop="basicJoinCompute" label="鍙傚姞璁$畻" :key="6" width="100">
<template v-slot="{ row }">
@@ -124,7 +124,7 @@
</el-table-column>
</el-table-column>
- <el-table-column v-if="dataForm.productType==='3'" :key="15" label="浠诲姟鍙潬鎬ц绠�">
+ <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :key="15" label="浠诲姟鍙潬鎬ц绠�">
<el-table-column prop="taskMtbcfRegulate" :key="16" label="瑙勫畾MTBCF" width="120">
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfRegulate"></el-input>
@@ -163,7 +163,7 @@
</el-table-column>
</el-table-column>
- <el-table-column v-if="dataForm.productType==='3'" :key="22" label="缁翠慨鍒嗗竷">
+ <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='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">
<template v-slot="{ row }">
@@ -212,7 +212,7 @@
<!-- <zt-table-column-dict v-if="dataForm.productType==='3'" :key="27" prop="reliabDistribType" label="鍙潬鎬у垎甯冪被鍨�"
width="160"/>-->
- <el-table-column v-if="dataForm.productType==='3'" prop="reliabDistribType" label="鍙潬鎬у垎甯冪被鍨�" :key="27"
+ <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" prop="reliabDistribType" label="鍙潬鎬у垎甯冪被鍨�" :key="27"
width="160">
<template v-slot="{ row }">
<el-select v-if="row.isEdit" v-model="row.reliabDistribType"
@@ -228,7 +228,7 @@
:hit="hit"/>
</template>
</el-table-column>
- <el-table-column v-if="dataForm.productType==='3'" :key="28" prop="runTime" label="杩愯鏃堕棿" width="100">
+ <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :key="28" prop="runTime" label="杩愯鏃堕棿" width="100">
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit" v-model="scope.row.runTime"></el-input>
<span v-else v-text="scope.row.runTime"></span>
diff --git a/web/src/views/modules/basicInfo/ProductModelTree.vue b/web/src/views/modules/basicInfo/ProductModelTree.vue
index a34ee67..a8edb11 100644
--- a/web/src/views/modules/basicInfo/ProductModelTree.vue
+++ b/web/src/views/modules/basicInfo/ProductModelTree.vue
@@ -80,8 +80,7 @@
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
- }
- ,
+ },
handleNodeClick(data) {
this.$emit('on-selected', data)
}
diff --git a/web/src/views/modules/basicInfo/TyProductModel-AddOrUpdate.vue b/web/src/views/modules/basicInfo/TyProductModel-AddOrUpdate.vue
index 6636836..d4136aa 100644
--- a/web/src/views/modules/basicInfo/TyProductModel-AddOrUpdate.vue
+++ b/web/src/views/modules/basicInfo/TyProductModel-AddOrUpdate.vue
@@ -2,7 +2,7 @@
<zt-dialog ref="dialog" @confirm="formSubmit" append-to-body>
<el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px">
<zt-form-item label="涓婄骇绯荤粺" prop="pid">
- <zt-select v-model="dataForm.pid" placeholder=" " :datas="productList"/>
+ <zt-select v-model="dataForm.pid" placeholder=" " :datas="productList" @input="selectDefaultProduct"/>
</zt-form-item>
<zt-form-item label="鍚嶇О" prop="name" rules="required">
<el-input v-model="dataForm.name"></el-input>
@@ -68,6 +68,9 @@
init() {
this.getProductList()
},
+ selectDefaultProduct() {
+ this.dataForm.nodeType = 1
+ },
// 鑾峰彇绯荤粺鍒楄〃
async getProductList() {
let res = await this.$http.get('/basicInfo/TyProductModel/getProductList')
@@ -87,7 +90,7 @@
let params = {
productType: selected
}
- let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params:params})
+ let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params: params})
this.dataForm.operatImgName = res.data.name
this.dataForm.operatImg = res.data.id
},
@@ -98,7 +101,22 @@
...this.dataForm,
...res.data
}
- console.log(this.map, 'getInfo')
+ if (this.dataForm.pid == null) {
+ this.dataForm.pid = ''
+ }
+ if (this.dataForm.baseCompute == null) {
+ this.dataForm.baseCompute = ''
+ }
+ if (this.dataForm.taskCompute == null) {
+ this.dataForm.taskCompute = ''
+ }
+ if (this.dataForm.reliabDistrib == null) {
+ this.dataForm.reliabDistrib = ''
+ }
+ if (this.dataForm.repairDistrib == null) {
+ this.dataForm.repairDistrib = ''
+ }
+ console.log(this.dataForm, 'this.dataForm')
},
// 琛ㄥ崟鎻愪氦
async formSubmit() {
diff --git a/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue b/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
index 65addad..6a7cc85 100644
--- a/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
+++ b/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
@@ -42,7 +42,7 @@
name: '',
productType: '',
operatImg: '',
- operatImgName:'',
+ operatImgName: '',
sort: '',
status: ''
}
@@ -52,7 +52,7 @@
PictureSelect
},
methods: {
- init(id,params) {
+ init(id, params) {
if (params.type === 'tree') {
this.isTree = true
this.isShow = false
@@ -61,7 +61,11 @@
this.dataForm.pid = params.pid
this.dataForm.productType = params.type
}
+ if (this.dataForm.productType==='10'){
+
+ }
},
+
// 鑾峰彇绯荤粺鍒楄〃
async getProductList() {
let res = await this.$http.get('/basicInfo/XhProductModel/getProductList')
@@ -73,7 +77,7 @@
let params = {
productType: selected
}
- let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params:params})
+ let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params: params})
this.dataForm.operatImgName = res.data.name
this.dataForm.operatImg = res.data.id
},
@@ -95,6 +99,22 @@
},
// 琛ㄥ崟鎻愪氦
async formSubmit() {
+ let flag = true
+ if (this.isTree){
+ if (this.dataForm.productType !== '5' || this.dataForm.productType !== '4') {
+ this.$alert("涓嶆敮鎸佹柊澧炴鑺傜偣")
+ flag =false
+ }
+ }else{
+ if (this.dataForm.productType === '5' || this.dataForm.productType === '4') {
+ this.$alert("涓嶆敮鎸佹柊澧炴鑺傜偣")
+ flag =false
+ }
+ }
+
+ if (!flag){
+ return
+ }
let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/XhProductModel/', this.dataForm)
if (res.success) {
await this.$tip.success()
diff --git a/web/src/views/modules/basicInfo/XhProductModel.vue b/web/src/views/modules/basicInfo/XhProductModel.vue
index a0fd1f3..21e8f90 100644
--- a/web/src/views/modules/basicInfo/XhProductModel.vue
+++ b/web/src/views/modules/basicInfo/XhProductModel.vue
@@ -3,7 +3,7 @@
<el-row :gutter="5">
<el-col :span="5">
<div class="fa-card-a" style="margin-right: 5px;height: calc(100vh - 123px)">
- <product-model-tree @on-selected="onProductSelected" showXdy="true"/>
+ <product-model-tree @on-selected="onProductSelected" showXdy="true" ref="ProductModelTree"/>
</div>
</el-col>
<el-col :span="19">
@@ -17,10 +17,10 @@
<el-input v-model="dataForm.name" placeholder="璇疯緭鍏ュ悕绉�" clearable></el-input>
</el-form-item>
<el-form-item>
- <zt-button type="query" @click="table.query()"/>
- <zt-button type="add" @click="add()"/>
+ <zt-button v-if="productType && productType!=='10'" type="query" @click="table.query()"/>
+ <zt-button v-if="productType && productType!=='10'" type="add" @click="add()"/>
<zt-button v-if="productType==='3'" type="primary" @click="addCell()">鏂板铏氬崟鍏�</zt-button>
- <zt-button type="delete" @click="table.deleteHandle()"/>
+ <zt-button v-if="productType && productType!=='10'" type="delete" @click="table.deleteHandle()"/>
</el-form-item>
</el-form>
<el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}"
@@ -38,8 +38,8 @@
<zt-table-column-handle :table="table" width="150px"/>
</el-table>
<!-- 寮圭獥, 鏂板 / 淇敼 -->
- <add-or-update @refreshDataList="table.query" ref="AddOrUpdate"/>
- <select-ty-model @refreshDataList="table.query" ref="SelectTyModel"/>
+ <add-or-update @refreshDataList="refreshData" ref="AddOrUpdate"/>
+ <select-ty-model @refreshDataList="refreshData" ref="SelectTyModel"/>
</zt-table-wraper>
</div>
</el-col>
@@ -99,12 +99,18 @@
return 'text-align: left !important;'
}
},
+ refreshData(){
+ this.$refs.tableObj.query()
+ this.$refs.ProductModelTree.getProductList()
+ },
onProductSelected(data) {
console.log(data)
this.dataForm.pid = data.id
this.dataForm.type = data.productType
this.productType = data.productType
- this.$refs.tableObj.query()
+ if(data.productType!=='10'){
+ this.$refs.tableObj.query()
+ }
}
}
}
diff --git a/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue b/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue
index e19b826..27716e4 100644
--- a/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue
+++ b/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue
@@ -14,16 +14,12 @@
<zt-form-item label="妫�绱㈠叧閿瓧" prop="contentType">
<el-input v-model="dataForm.contentType"></el-input>
</zt-form-item>
- <div class="el-flex img-src" style="height: 20px">
- <el-form-item class="marginTopAndMarginBottom" style="width: 100%">
- <!--<config-uploader :lineHeight="true" busi-type="sys_picture" model-name="dataForm" :dataForm="dataForm"
- v-model="dataForm.files"/>-->
+ <zt-form-item>
<el-upload :limit="1" :http-request="httpRequest" :before-upload="beforeUpload" :on-exceed="handleExceed">
<el-button slot="trigger" size="small" type="primary">閫夊彇鏂囦欢</el-button>
</el-upload>
<el-image v-if="dataForm.id" :src="url+dataForm.id" style="height: 50px;width: 50px"></el-image>
- </el-form-item>
- </div>
+ </zt-form-item>
</el-form>
</zt-dialog>
</template>
@@ -121,4 +117,7 @@
margin-top: 10px !important;
margin-bottom: 0 !important;
}
+ /*.zt .el-dialog .el-dialog__body .el-form {
+ min-height: 310px !important;
+ }*/
</style>
diff --git a/web/src/views/modules/taskReliability/ModelRbd.vue b/web/src/views/modules/taskReliability/ModelRbd.vue
index 7ef3205..c085529 100644
--- a/web/src/views/modules/taskReliability/ModelRbd.vue
+++ b/web/src/views/modules/taskReliability/ModelRbd.vue
@@ -20,9 +20,9 @@
<el-input v-model="dataForm.modelTag" placeholder="璇疯緭鍏ユā鍨嬫爣璇�" clearable></el-input>
</el-form-item>
<el-form-item>
- <zt-button type="query" @click="table.query()"/>
- <zt-button type="add" @click="add()"/>
- <zt-button type="delete" @click="table.deleteHandle()"/>
+ <zt-button v-if="dataForm.productId" type="query" @click="table.query()"/>
+ <zt-button v-if="dataForm.productId" type="add" @click="add()"/>
+ <zt-button v-if="dataForm.productId" type="delete" @click="table.deleteHandle()"/>
</el-form-item>
</el-form>
<el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}"
@@ -30,7 +30,7 @@
<el-table-column type="selection" width="40" align="center"/>
<el-table-column prop="modelName" label="妯″瀷鍚嶇О"/>
<el-table-column prop="modelTag" label="妯″瀷鏍囪瘑"/>
- <el-table-column prop="quoteNum" label="琚紩鐢ㄦ暟"/>
+ <el-table-column prop="quoteNum" label="琚紩鐢ㄦ暟" align="center"/>
<el-table-column prop="modelState" label="妯″瀷鐘舵��" align="center"/>
<el-table-column prop="modelDataState" label="妯″瀷鏁版嵁鐘舵��" align="center"/>
<el-table-column prop="remark" label="澶囨敞"/>
diff --git a/web/src/views/modules/taskReliability/OperatCondit.vue b/web/src/views/modules/taskReliability/OperatCondit.vue
index e776ece..73f3ee5 100644
--- a/web/src/views/modules/taskReliability/OperatCondit.vue
+++ b/web/src/views/modules/taskReliability/OperatCondit.vue
@@ -4,17 +4,16 @@
<el-col :span="14">
<div class="mod-taskReliability-operatCondit}">
<div class="fa-card-a">
- <div>
- 浜у搧鑺傜偣锛�
- <zt-select v-model="dataForm.productId" :datas="productList" @change="onProductSelected"/>
+ <div style="margin-top: 10px">
+ <zt-select v-model="dataForm.productId" placeholder="璇烽�夋嫨浜у搧鑺傜偣" :datas="productList" @change="onProductSelected"/>
</div>
<zt-table-wraper ref="tableObj" query-url="/taskReliability/OperatCondit/page" defaultNotQuery="true" delete-url="/taskReliability/OperatCondit"
v-slot="{ table }" :paging='false'>
<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" @click="add()"/>
- <zt-button type="delete" @click="table.deleteHandle()"/>
+ <zt-button v-if="dataForm.productId" type="query" @click="table.query()"/>
+ <zt-button v-if="dataForm.productId" type="add" @click="add()"/>
+ <zt-button v-if="dataForm.productId" type="delete" @click="table.deleteHandle()"/>
</el-form-item>
</el-form>
<el-table v-loading="table.dataLoading" :data="table.dataList" height="100px"
@@ -67,7 +66,6 @@
this.$refs.AddOrUpdate.$refs.dialog.init(null,{productId: this.dataForm.productId})
},
onProductSelected(data) {
- console.log(data, ' onProductSelected(data)')
this.dataForm.productId = data.id
this.$refs.tableObj.query()
},
diff --git a/web/src/views/modules/taskReliability/OperatConditModel.vue b/web/src/views/modules/taskReliability/OperatConditModel.vue
index d7bce69..7966756 100644
--- a/web/src/views/modules/taskReliability/OperatConditModel.vue
+++ b/web/src/views/modules/taskReliability/OperatConditModel.vue
@@ -8,10 +8,9 @@
<el-table v-loading="table.dataLoading" :data="table.dataList" height="100px"
v-adaptive="{bottomOffset:70}" border @selection-change="table.selectionChangeHandle"
row-key="id"
- :cell-style="cellStyle"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
:default-expand-all="true">
- <el-table-column prop="product" label="浜у搧鑺傜偣" width="160"/>
+ <el-table-column prop="product" label="浜у搧鑺傜偣1" width="160"/>
<el-table-column prop="modelName" label="浜у搧妯″瀷"/>
<zt-table-column-handle :table="table" edit-perm="taskReliability:update"
delete-perm="taskReliability::delete" :has-view="false">
@@ -46,11 +45,6 @@
this.dataForm.operatConditId = param.row.id
this.dataForm.productId = param.productId
this.$refs.tableObj.query()
- },
- cellStyle({column}) {
- if (column.label === '绯荤粺') {
- return 'text-align: left !important;'
- }
},
openSelectModel(row) {
console.log(row, 'selectModel');
diff --git a/web/src/views/modules/taskReliability/Task-AddOrUpdate.vue b/web/src/views/modules/taskReliability/Task-AddOrUpdate.vue
index c0b04d5..4e58ebc 100644
--- a/web/src/views/modules/taskReliability/Task-AddOrUpdate.vue
+++ b/web/src/views/modules/taskReliability/Task-AddOrUpdate.vue
@@ -4,9 +4,9 @@
<zt-form-item label="浠诲姟鍚嶇О" prop="taskName" rules="required">
<el-input v-model="dataForm.taskName"></el-input>
</zt-form-item>
- <zt-form-item label="浠诲姟椤哄簭" prop="taskSort" rules="required">
+<!-- <zt-form-item label="浠诲姟椤哄簭" prop="taskSort" rules="required">
<el-input v-model="dataForm.taskSort"></el-input>
- </zt-form-item>
+ </zt-form-item>-->
</el-form>
</zt-dialog>
</template>
diff --git a/web/src/views/modules/taskReliability/Task.vue b/web/src/views/modules/taskReliability/Task.vue
index 4ded84a..74465c8 100644
--- a/web/src/views/modules/taskReliability/Task.vue
+++ b/web/src/views/modules/taskReliability/Task.vue
@@ -7,8 +7,8 @@
v-slot="{ table }">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
<el-form-item>
- <zt-button type="add" @click="add()" />
- <zt-button type="delete" @click="table.deleteHandle()"/>
+ <zt-button v-if="dataForm.productId" type="add" @click="add()" />
+ <zt-button v-if="dataForm.productId" type="delete" @click="table.deleteHandle()"/>
</el-form-item>
</el-form>
<el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}"
@@ -16,7 +16,8 @@
@selection-change="table.selectionChangeHandle">
<el-table-column type="selection" width="40" align="center"/>
<el-table-column prop="taskName" label="浠诲姟鍚嶇О"/>
- <el-table-column prop="taskSort" label="浠诲姟椤哄簭"/>
+ <!--<el-table-column prop="taskSort" label="浠诲姟椤哄簭" align="center"/>-->
+ <el-table-column prop="phaseDuration" label="浠诲姟鏃堕暱鍒嗛厤" align="right"/>
<zt-table-column-handle :table="table"
delete-perm="taskReliability::delete"/>
</el-table>
@@ -35,6 +36,7 @@
return {
productList: [],
dataForm: {
+ id:'',
productId: ''
}
}
diff --git a/web/src/views/modules/taskReliability/TaskPhase-AddOrUpdate.vue b/web/src/views/modules/taskReliability/TaskPhase-AddOrUpdate.vue
index dfcd968..079ed20 100644
--- a/web/src/views/modules/taskReliability/TaskPhase-AddOrUpdate.vue
+++ b/web/src/views/modules/taskReliability/TaskPhase-AddOrUpdate.vue
@@ -10,9 +10,9 @@
<zt-form-item label="闃舵鏃堕��" prop="phaseSpeed">
<el-input v-model="dataForm.phaseSpeed"></el-input>
</zt-form-item>
- <zt-form-item label="闃舵椤哄簭" prop="phaseSort">
+<!-- <zt-form-item label="闃舵椤哄簭" prop="phaseSort">
<el-input v-model="dataForm.phaseSort"></el-input>
- </zt-form-item>
+ </zt-form-item>-->
<zt-form-item label="澶囨敞" prop="remark">
<el-input v-model="dataForm.remark"></el-input>
</zt-form-item>
@@ -54,7 +54,7 @@
// 琛ㄥ崟鎻愪氦
async formSubmit() {
console.log(this.time,'dataLoaded')
- if (this.time + Number(this.dataForm.phaseDurationRate > 1)) {
+ if (this.time + Number(this.dataForm.phaseDurationRate )> 1) {
this.$alert("璇烽噸鏂拌缃綋鍓嶆椂闀挎瘮鍒嗛厤")
}else{
let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/taskReliability/TaskPhase/', this.dataForm)
diff --git a/web/src/views/modules/taskReliability/TaskPhase.vue b/web/src/views/modules/taskReliability/TaskPhase.vue
index 38904fd..3886fa4 100644
--- a/web/src/views/modules/taskReliability/TaskPhase.vue
+++ b/web/src/views/modules/taskReliability/TaskPhase.vue
@@ -1,9 +1,9 @@
<template>
<div>
<el-row :gutter="5">
- <el-col :span="6">
+ <el-col :span="7">
<div class="fa-card-a" style="margin-right: 5px;">
- <task @onTaskSelected="onTaskSelected"/>
+ <task @onTaskSelected="onTaskSelected" ref="task"/>
</div>
</el-col>
<el-col :span="11">
@@ -14,28 +14,29 @@
:paging='false' v-slot="{ table }">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
<el-form-item>
- <zt-button type="add" @click="add()"/>
- <zt-button type="delete" @click="table.deleteHandle()"/>
+ <zt-button v-if="dataForm.taskId" type="add" @click="add()"/>
+ <zt-button v-if="dataForm.taskId" type="delete" @click="table.deleteHandle()"/>
</el-form-item>
</el-form>
<el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}"
@row-click="selectPhase" @selection-change="table.selectionChangeHandle">
<el-table-column type="selection" width="40" align="center"/>
- <el-table-column prop="phaseName" label="浠诲姟闃舵鍚嶇О"/>
- <el-table-column prop="phaseDurationRate" label="闃舵鏃堕暱姣�"/>
- <el-table-column prop="phaseSpeed" label="闃舵鏃堕��"/>
- <el-table-column prop="phaseSort" label="闃舵椤哄簭"/>
+ <el-table-column prop="phaseName" label="闃舵鍚嶇О" align="center"/>
+ <el-table-column prop="phaseDurationRate" label="闃舵鏃堕暱姣�" align="right"/>
+ <el-table-column prop="phaseSpeed" label="闃舵鏃堕��" align="right"/>
+ <!--<el-table-column prop="phaseSort" label="闃舵椤哄簭" align="center"/>-->
+ <el-table-column prop="operatConditDuration" label="宸ュ喌鏃堕暱鍒嗛厤" align="center"/>
<zt-table-column-handle :table="table"
delete-perm="taskReliability::delete"/>
</el-table>
<!-- 寮圭獥, 鏂板 / 淇敼 -->
- <add-or-update @refreshDataList="table.query" ref="AddOrUpdate"/>
+ <add-or-update @refreshDataList="refreshData" ref="AddOrUpdate"/>
</zt-table-wraper>
</div>
</el-col>
- <el-col :span="7">
- <task-phase-model ref="model"/>
+ <el-col :span="6">
+ <task-phase-model @getList="refreshData" ref="model"/>
</el-col>
</el-row>
</div>
@@ -50,6 +51,7 @@
data() {
return {
dataForm: {
+ id:'',
taskId: '',
productId: ''
},
@@ -63,13 +65,16 @@
AddOrUpdate
},
methods: {
+ refreshData(){
+ this.$refs.tableObj.query()
+ this.$refs.task.$refs.tableObj.query()
+ },
dataLoaded(data) {
this.time = null
this.dataList = data
for (let i = 0; i < this.dataList.length; i++) {
this.time = this.time + Number(this.dataList[i].phaseDurationRate)
}
- console.log( this.time,'dataLoaded')
if (this.time>1){
this.$alert("褰撳墠杩愯鏃堕暱姣斿凡瓒呭嚭锛岃閲嶆柊璁剧疆")
}
diff --git a/web/src/views/modules/taskReliability/TaskPhaseModel.vue b/web/src/views/modules/taskReliability/TaskPhaseModel.vue
index 7218eab..2b9b5a8 100644
--- a/web/src/views/modules/taskReliability/TaskPhaseModel.vue
+++ b/web/src/views/modules/taskReliability/TaskPhaseModel.vue
@@ -6,7 +6,7 @@
delete-url="/taskReliability/TaskPhaseModel/" v-slot="{ table }">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
<el-form-item>
- <zt-button type="warning" @click="handleSaveRows">淇濆瓨</zt-button>
+ <zt-button v-if="dataForm.phaseId" type="warning" @click="handleSaveRows">淇濆瓨</zt-button>
</el-form-item>
</el-form>
<el-table v-loading="table.dataLoading" :data="table.dataList" height="100px"
@@ -14,7 +14,7 @@
@cell-click="handleCellClick"
@selection-change="table.selectionChangeHandle">
<el-table-column prop="operatConditName" label="宸ュ喌鍚嶇О" width="160"/>
- <el-table-column prop="operatConditDurationRate" label="宸ュ喌鏃堕暱姣�">
+ <el-table-column prop="operatConditDurationRate" label="鏃堕暱姣�" align="right" width="100">
<template slot-scope="scope">
<span
v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property">
@@ -86,7 +86,7 @@
}
this.dataForm.dataThreeList = list
console.log(time, 'async handleSaveRows')
- if (time!== 1) {
+ if (time> 1) {
this.$alert("璇烽噸鏂拌缃綋鍓嶆椂闀挎瘮鍒嗛厤")
return
}
@@ -100,6 +100,7 @@
this.originalData = null
this.dataForm.dataThreeList = null
this.$refs.tableObj.query()
+ this.$emit('getList')
this.originalTableData = JSON.parse(JSON.stringify(this.dataList)); // 鏇存柊鍒濆鏁版嵁涓哄綋鍓嶆暟鎹�
console.log(this.originalTableData, 'this.originalTableData 褰撳墠琛ㄦ牸json鏁版嵁')
}
--
Gitblit v1.9.1