Bläddra i källkod

Merge branch 'ssotest' of https://git.steerinfo.com/XTEMS/xt-ems-front into ssotest

lirl 3 år sedan
förälder
incheckning
c9e715fbb7

+ 2 - 1
src/views/basicInformation/components/configurationRelationship/planProcessAndProduct.vue

@@ -328,7 +328,8 @@
                                 :show-overflow-tooltip="true"
                             ></el-table-column>
                             <el-table-column
-                                sortable
+                                sortable
+                                v-if="false"
                                 prop="mes_materialcode"
                                 label="MES物料编码"
                                 min-width="100px"

+ 5 - 3
src/views/basicInformation/components/configurationRelationship/processAndMaterial.vue

@@ -307,7 +307,8 @@
                                 sortable
                                 prop="mes_materialcode"
                                 label="NC物料编码"
-                                min-width="100px"
+                                min-width="100px"
+                                v-if="activeMenu + 'NC'"
                                 :show-overflow-tooltip="true"
                             ></el-table-column>
                             <el-table-column
@@ -358,7 +359,8 @@
                                 sortable
                                 prop="mes_prodline"
                                 label="MES产线"
-                                min-width="100px"
+                                min-width="100px"
+                                v-if="activeMenu + 'MES'"
                                 :show-overflow-tooltip="true"
                             > <template slot-scope="scope">
                                     <el-form-item
@@ -627,7 +629,7 @@
                                 </el-select>
                             </el-form-item>
                         </el-col>
-                        <el-col :span="12">
+                        <el-col v-if="activeMenu + 'MES'" :span="12">
                             <el-form-item
                                 label="MES产线"
                                 prop="mes_prodline"

+ 5 - 3
src/views/basicInformation/components/configurationRelationship/processAndProduct.vue

@@ -370,7 +370,8 @@
                                 </template>
                             </el-table-column>
                             <el-table-column
-                                sortable
+                                sortable
+                                v-if="activeMenu + 'NC'"
                                 prop="mes_materialcode"
                                 label="NC物料编码"
                                 min-width="100px"
@@ -421,7 +422,8 @@
                                 </template>
                             </el-table-column>
                             <el-table-column
-                                sortable
+                                sortable
+                                v-if="activeMenu + 'MES'"
                                 prop="mes_prodline"
                                 label="MES产线"
                                 min-width="100px"
@@ -718,7 +720,7 @@
                         </el-col>
                     </el-row>
                     <el-row>
-                        <el-col :span="12">
+                        <el-col v-if="activeMenu + 'NC'" :span="12">
                             <el-form-item
                                 label="NC产线"
                                 prop="mes_prodline"

+ 1 - 1
src/views/energyAnalysis/components/indexManagement/indexMaintain.vue

@@ -920,7 +920,7 @@
                             </el-form-item>
                         </el-col>
                         <el-col :span="12"  v-if="dialog.editorBox.type !== 'add'">
-                            <el-form-item label="序号" prop="itemdesc" :rules="dialog.editorBox.form2.rules.seqno">
+                            <el-form-item label="序号" prop="seqno" :rules="dialog.editorBox.form1.rules.seqno">
                                 <el-input clearable
                                     style="width: 100%;"
                                     v-model="dialog.editorBox.form1.data.seqno"

+ 120 - 0
src/views/energyScheduling/components/measuringLocationData/measuringLocationEntry.vue

@@ -279,6 +279,14 @@
                         @click="but_redata()"
                         :loading="loading"
                     >重新生成数据</el-button>
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        v-privilege="activeMenu + 'BQ'"
+                        @click="but_resData()"
+                        :loading="loading"
+                    >数据补全</el-button>
                     <div style="float:right; text-align: right;">
                         <el-button
                             class="button"
@@ -632,6 +640,31 @@
                             </div>
                         </template>
                     </el-table-column> -->
+                    <el-table-column
+                        sortable
+                        class-name="gn-TableDownloadExcel-none"
+                        label="操作"
+                        align="center"
+                        width="86px"
+                        fixed="right"
+                    >
+                        <template slot-scope="scope">
+                            <div>
+                                <!-- <el-button
+                                    type="primary"
+                                    size="mini"
+                                    v-privilege="activeMenu + 'PUT'"
+                                    @click="but_edit(scope.row)"
+                                >修改</el-button> -->
+                                <el-button
+                                    type="primary"
+                                    size="mini"
+                                    v-privilege="activeMenu + 'QUERY'"
+                                    @click="but_sdata(scope.row)"
+                                >计算过程</el-button>
+                            </div>
+                        </template>
+                    </el-table-column>
                     </el-table>
                 </el-form>
                 <el-pagination
@@ -1632,6 +1665,93 @@ export default {
                     });
             }).catch(() => {
             });
+        },
+        // 计算过程
+        but_sdata (row) {
+            let that = this;
+            let params = {
+                timegranid: row.timegranid,
+                clock: row.clock, // 开始时间
+                itemid: row.itemid // 项目编号
+            };
+            that.axios.get('pass/ems/v1/formulas/getAnaByVal/', {
+                params: params
+            }).then(function (res) {
+                if (res.code === '0') {
+                    that.$message({
+                        dangerouslyUseHTMLString: true,
+                        message: res.data,
+                        type: 'success'
+                    });
+                } else {
+                    that.$message.error(res.message);
+                }
+            }).catch(function () {});
+        },
+        // 补全数据
+        but_resData () {
+            let that = this;
+            if (!that.filterForm.data.clock || that.filterForm.data.clock.length === 0) {
+                that.$message.warning('请选择日期范围');
+                return true;
+            }
+            if (!that.filterForm.data.clock[0] || !that.filterForm.data.clock[1]) {
+                that.$message.warning('请选择开始日期与结束日期');
+                return true;
+            }
+            if (!that.filterForm.data.timegranid) {
+                that.$message.warning('请选择时间粒度');
+                return true;
+            }
+            if (that.multipleSelection.length > 0) {
+              that.$confirm('是否补全日数据?数据不益多选!否则运行时间较长', '提示', {
+                  confirmButtonText: '确定',
+                  cancelButtonText: '取消',
+                  state: 'warning'
+              }).then(() => {
+                        let SubmitData = {};
+                        for (let key in that.tableFormDataObj) {
+                            SubmitData = {
+                                clock: that.filterForm.data.clock[0],
+                                clocke: that.filterForm.data.clock[1],
+                                itemid: that.tableFormDataObj[key].itemid
+                            }
+                            // SubmitData.push({
+
+                            //     clock: that.tableFormDataObj[key].clock,
+                            //     timegranid: that.tableFormDataObj[key].timegranid,
+                            //     itemid: that.tableFormDataObj[key].itemid
+                            // });
+                        }
+                that.loading = true;
+                let url = 'pass/ems/v1/trmcalpointvalues/resData'
+                that.axios.get(url, {
+                    params: SubmitData
+                })
+                    .then(function (res) {
+                        if (res.code === '0') {
+                            if (res.message && res.message !== '操作成功') {
+                                that.$message.warning('重新生成数据成功, 其中【' + res.message + '】');
+                            } else {
+                                that.$message({
+                                    message: '重新生成数据成功',
+                                    type: 'success'
+                                });
+                            }
+                            that.getTableData();
+                        } else {
+                            that.$message.error(res.message);
+                        }
+                        that.loading = false;
+                    }).catch(function () {
+                        that.loading = false;
+                    });
+                }).catch(() => {
+                  this.$message.warning('用户取消操作');
+                });
+            } else {
+                this.$message.error('至少要选择一条数据');
+            }
         }
     }
 }