|
@@ -8,6 +8,10 @@
|
|
|
</div>
|
|
|
<div class="info">
|
|
|
<div class="item">
|
|
|
+ <el-button type="primary" size="small" v-if="startWork===0" @click="pauseChange">暂停</el-button>
|
|
|
+ <el-button type="success" size="small" v-if="startWork===1" @click="pauseChange">开工</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
当前工序:
|
|
|
{{
|
|
|
store.scanInfo.operationName ? store.scanInfo.operationName : "-"
|
|
@@ -38,7 +42,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="mainContentBox">
|
|
|
+ <div class="mainContentBox" :style="{ pointerEvents: startWork===1 ? 'none' : 'auto' }">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="4" class="boxStyle">
|
|
|
<!-- 侧边栏盒子 -->
|
|
@@ -91,6 +95,7 @@
|
|
|
import OperationBar from "@/views/pro-steps/operationBar.vue";
|
|
|
import { useProcessStore } from "@/store";
|
|
|
import { getOpCompent } from "@/api/prosteps";
|
|
|
+import {updatePause} from "@/api/process";
|
|
|
defineOptions({ name: "ProSteps" });
|
|
|
const store = useProcessStore();
|
|
|
const key = ref(false);
|
|
@@ -101,6 +106,8 @@ const recondOPId = ref(null);
|
|
|
const qrCode = ref(null);
|
|
|
//配置标签信息Data
|
|
|
const stepComponents = ref([]);
|
|
|
+const startWork =ref(store.scanInfo.isPause);
|
|
|
+
|
|
|
const defaultComponents = [
|
|
|
{
|
|
|
compentName: "物料采集",
|
|
@@ -212,6 +219,16 @@ const getOpCompentArray = async () => {
|
|
|
const setSelectIndex = (index) => {
|
|
|
selectIndex.value = index;
|
|
|
};
|
|
|
+
|
|
|
+const pauseChange=()=>{
|
|
|
+ updatePause({id:store.scanInfo.id}).then(
|
|
|
+ (res)=>{
|
|
|
+ if(res.code==='200'){
|
|
|
+ startWork.value=res.data.isPause
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+}
|
|
|
// const setSelectTag = () => {
|
|
|
// const nowRouteName = route.name;
|
|
|
// stepComponents.value.forEach((item, index) => {
|