Przeglądaj źródła

GY02/GY06/ZL1定制表单组件布局

GYH 1 rok temu
rodzic
commit
bc19df8594

+ 203 - 0
zkqy-ui/src/views/bussiness/dialogCompments/GongYi/GY02.vue

@@ -0,0 +1,203 @@
+<template>
+  <div class="add-table">
+    <div class="leftMessage">
+      <div class="list" v-for="(item, index) in baseMessage" :key="index">
+        <span class="titile" style="background:rgb(52,191,163); color:white;"> {{ item.title}} </span>
+        <span class="content" style="background:rgb(235,237,242); color:rgb(232,83,152);"> {{ item.content}} </span>
+      </div>
+      <div class="content"></div>
+    </div>
+    <div class="rightMessage">
+      <div class="top">       
+        <div class="state">
+          <div class="list">
+            <span>工序状态:</span>
+            <p>初始</p>
+          </div>
+          <div class="list">
+            <span>是否外协:</span>
+            <p>初始</p>
+          </div>
+        </div>    
+      </div>
+      <div class="button">
+        <el-button-group>
+          <el-button type="primary" icon="el-icon-video-play" plain round>开始</el-button>
+          <el-button type="danger" icon="el-icon-video-pause" plain>暂停</el-button> 
+          <el-button type="success" icon="el-icon-circle-check" plain>完成</el-button> 
+          <el-button type="info" icon="el-icon-refresh" plain round>重置</el-button>       
+ 
+        </el-button-group>
+
+      </div>
+      <div class="middle">
+        <el-table :data="tableData2" border >
+          <el-table-column>
+            
+          </el-table-column>
+        </el-table>
+        <div class="name">人员及工时分配</div>       
+        <el-table :data="tableData1" border ref="addTableRowRef">
+          <el-table-column label="人员姓名">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.name"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column label="分配工时">
+            <template slot-scope="scope">
+              <el-input-number v-model="scope.row.time" controls-position="right" @change="handleChange" :min="0.25" :max="8" :step="0.25"></el-input-number>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" width="120" align="center">
+            <template slot-scope="scope">
+              <el-button
+              icon="el-icon-delete"
+              size="mini"
+              @click="deleteTableRow(scope.row)"
+              >删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="block">
+          <el-pagination
+            layout="prev, pager, next"
+            :total="50">
+          </el-pagination>
+        </div>
+        <el-button size="mini" icon="el-icon-plus" type="primary" @click="addTableRow">新 增</el-button>
+        <el-button size="mini" icon="el-icon-check" type="success" @click="saveTableRow(newRow)">保 存</el-button>
+      </div>
+      <div class="footer">
+       <div class="total">
+        <span>当前工序总工时: 10</span>
+        <span>当前已分配工时: 10</span>
+        <span>当前剩余工时: 10</span>
+       </div>
+      </div>
+    </div>
+    
+  </div>
+</template>
+<script>
+export default {
+  name: 'GY02',
+  data() {
+    return {
+      tableData1: [],
+      tableData2: [],
+      newRow: {},
+      baseMessage: [
+        { title:'任务', content:'47as04-51-1238'},
+        { title:'图号', content:'1CG12-38'},
+        { title:'名称', content:'支架'},
+        { title:'数量', content:'1'},
+        { title:'工艺', content:'1'},
+        { title:'质控', content:'1'},
+      ]
+    }
+  },
+  methods: {
+    addTableRow() {
+      const newRow = {
+          name: '',
+          time: 0.25,
+      };  
+      this.tableData1.push(newRow);       
+    },
+    deleteTableRow(row) {
+      const index = this.tableData1.indexOf(row);
+      if (index !== -1) {
+        this.tableData1.splice(index, 1);
+      }
+    },
+    saveTableRow(tableData1) {
+      let item = '';
+      for(let i = 0; i < this.tableData1.length; i++) {
+        item += tableData1[i]
+      }
+      this.tableData2 = this.item;
+      this.tableData1 = [];
+    },
+    handleChange(value) {
+      console.log(value);
+    }
+
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.add-table {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  .leftMessage {
+    display: flex;
+    flex-direction: column;
+    width: 180px;
+    .list {
+      padding: 10px 0px ;
+      span {  
+        border-radius: 10px;
+        padding: 5px;
+        margin-right: 10px;
+      }
+    }
+    
+  }
+  .rightMessage {
+    display: flex;
+    width: 500px;
+    flex-direction: column;
+    .top {
+      background: #53B0F8;
+      color: white;
+      height: 60px;
+      .state {
+        display: flex;
+        flex-direction: row;
+        padding: 10px 20px;
+        span {
+          padding-right: 150px;
+        }
+        p {
+          padding-top: 5px;
+          font-size: 10px;
+        }
+      }
+    }
+    .button {
+      width: 100%;
+      padding: 20px 0px;
+      .el-button {
+        width: 140px;
+        background: none;
+
+      }
+      .el-button--info {
+        width: 80px;
+      }
+    }
+    .middle {
+      .name {
+        color: black;
+        font-weight: bold;
+        text-align: center;
+        padding: 10px 0px;
+      }
+      .block {
+        text-align: center;
+      }
+    }
+    .footer {
+      display: inline-block;
+      flex-direction: row;
+      margin-top: 10px;
+      span {
+        font-weight: bold;
+        color: black;
+      }
+    }
+  }
+}
+</style>

+ 2 - 2
zkqy-ui/src/views/bussiness/dialogCompments/GongYi/GY06.vue

@@ -166,10 +166,10 @@ export default {
           margin-right: 5px;
         }
         .title {
-          // color: #ececee34;
+          /* // color: #ececee34; */
           font-size: 14px;
           flex: 1;
-          // ma
+          /* // ma */
         }
         .time {
           font-size: 12px;

+ 0 - 47
zkqy-ui/src/views/bussiness/dialogCompments/ZL/ZL2.vue

@@ -1,47 +0,0 @@
-<template>
-    <div class="add-table">
-        <el-button size="mini" type="primary" @click="addTableRow">新 增</el-button>
-        <el-button size="mini" type="success" @click="saveTableRow">保 存</el-button>
-        <el-table :data="tableData" border ref="addTableRowRef">
-          <el-table-column label="人员姓名">
-            <template slot-scope="scope">
-              <el-input v-model="scope.name"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column label="分配工时">
-            <template slot-scope="scope">
-              <el-input v-model="scope.time"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column label="操作" width="120" align="center">
-            <template slot-scope="scope">
-                <el-input v-model="scope.do"></el-input>
-              </template>
-          </el-table-column>
-        </el-table>
-      </div>
-</template>
-<script>
-export default {
-    name: 'ZL2',
-    data() {
-        return {
-        tableData: [],
-        }
-    },
-    methods: {
-    addTableRow() {
-        let addObj = {
-            name: '',
-            time: '',
-            do: ''
-        };
-        
-    },
-  },
-}
-</script>
-
-<style lang="scss" scoped>
-
-</style>

+ 0 - 0
zkqy-ui/src/views/bussiness/dialogCompments/ZL/ZL1.vue → zkqy-ui/src/views/bussiness/dialogCompments/ZhiLiang/ZL1.vue


+ 5 - 5
zkqy-ui/src/views/bussiness/processMange.vue

@@ -163,6 +163,7 @@
         <!-- 运行节点弹窗 -->
 
         <el-dialog :title="nodeTitle" :visible.sync="open" width="50%">
+          <GY02></GY02>
           <!-- <el-form label-width="100px" :model="commonData">
             <h1>这里会引入当前节点需要处理的表单</h1>
           </el-form> -->
@@ -213,9 +214,8 @@ import {
 import { triggerExceptionNode } from "@/api/bpmprocess/process";
 
 import getNodeSequence from "@/utils/bpmn/getNodeSequence";
-import GY2 from "./dialogCompments/GY2.vue";
-import ZL1 from "./dialogCompments/ZL/ZL1.vue";
-import ZL2 from "./dialogCompments/ZL/ZL2.vue";
+import GY02 from "./dialogCompments/GongYi/GY02.vue";
+import ZL1 from "./dialogCompments/ZhiLiang/ZL1.vue";
 import { getForm } from "@/api/dragform/form";
 import DialogTemplate from "@/views/dialogTemplate/components/index.vue";
 
@@ -228,7 +228,7 @@ import GY06 from "./dialogCompments/GongYi/GY06.vue";
 export default {
   name: "processMange",
   props: [],
-  components: { GY01, DialogTemplate, CG1, KC1, GY06 },
+  components: { GY01, DialogTemplate, CG1, KC1, GY06,GY02},
   dicts: ["bpm_type", "task_process_state"],
   data() {
     return {
@@ -236,7 +236,7 @@ export default {
       myForm: "", //自定义表单组件名
       // 节点弹窗title
       nodeTitle: "节点弹窗",
-      open: false,
+      open: true,
       // 节点弹窗对应的formData
       commonData: {},
       taskType: 1,