|
@@ -141,7 +141,7 @@
|
|
|
type="primary"
|
|
type="primary"
|
|
|
style="margin-left: 140px"
|
|
style="margin-left: 140px"
|
|
|
@click="handelChange('third')"
|
|
@click="handelChange('third')"
|
|
|
- >开始执行
|
|
|
|
|
|
|
+ >开始执行
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
@@ -157,7 +157,7 @@
|
|
|
<div slot="header" class="clearfix">
|
|
<div slot="header" class="clearfix">
|
|
|
<span>工艺/设备 工艺图</span>
|
|
<span>工艺/设备 工艺图</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <img style="margin-left: 25%" :src="this.machineryImg" alt="" />
|
|
|
|
|
|
|
+ <img style="margin-left: 25%" :src="this.machineryImg" alt=""/>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="left-bottom">
|
|
<div class="left-bottom">
|
|
@@ -191,7 +191,7 @@
|
|
|
v-if="!tableVisible"
|
|
v-if="!tableVisible"
|
|
|
style="color: #53a3ef; cursor: pointer"
|
|
style="color: #53a3ef; cursor: pointer"
|
|
|
@click="handleChangeTable"
|
|
@click="handleChangeTable"
|
|
|
- >锁定站</span
|
|
|
|
|
|
|
+ >锁定站</span
|
|
|
>
|
|
>
|
|
|
<img
|
|
<img
|
|
|
src="@/assets/images/sopbgimg.png"
|
|
src="@/assets/images/sopbgimg.png"
|
|
@@ -243,8 +243,8 @@
|
|
|
</span>
|
|
</span>
|
|
|
<span v-if="scope.row.conflictJobNum !== null">
|
|
<span v-if="scope.row.conflictJobNum !== null">
|
|
|
<i class="el-icon-s-claim">{{
|
|
<i class="el-icon-s-claim">{{
|
|
|
- scope.row.conflictJobNum
|
|
|
|
|
- }}</i>
|
|
|
|
|
|
|
+ scope.row.conflictJobNum
|
|
|
|
|
+ }}</i>
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -342,7 +342,7 @@
|
|
|
type="text"
|
|
type="text"
|
|
|
size="small"
|
|
size="small"
|
|
|
@click="checkDetail(scope.row)"
|
|
@click="checkDetail(scope.row)"
|
|
|
- >查看</el-button
|
|
|
|
|
|
|
+ >查看</el-button
|
|
|
>
|
|
>
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
@@ -353,13 +353,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<el-button style="float: right" type="primary" @click="finshJobticket"
|
|
<el-button style="float: right" type="primary" @click="finshJobticket"
|
|
|
- >结束作业
|
|
|
|
|
|
|
+ >结束作业
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
style="float: right; margin-right: 10px"
|
|
style="float: right; margin-right: 10px"
|
|
|
type="danger"
|
|
type="danger"
|
|
|
@click="cancelJobticket"
|
|
@click="cancelJobticket"
|
|
|
- >取消作业
|
|
|
|
|
|
|
+ >取消作业
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</div>
|
|
</div>
|
|
@@ -411,8 +411,8 @@
|
|
|
<el-table-column prop="userType" label="来源">
|
|
<el-table-column prop="userType" label="来源">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span style="color: #2a87ff">{{
|
|
<span style="color: #2a87ff">{{
|
|
|
- scope.row.userType == "0" ? "内部" : "外部"
|
|
|
|
|
- }}</span>
|
|
|
|
|
|
|
+ scope.row.userType == '0' ? '内部' : '外部'
|
|
|
|
|
+ }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<!-- <el-table-column label="操作" width="80">-->
|
|
<!-- <el-table-column label="操作" width="80">-->
|
|
@@ -445,7 +445,7 @@
|
|
|
color: 'white',
|
|
color: 'white',
|
|
|
}"
|
|
}"
|
|
|
>
|
|
>
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
prop="userId"
|
|
prop="userId"
|
|
|
label="内部人员Id"
|
|
label="内部人员Id"
|
|
@@ -483,7 +483,7 @@
|
|
|
color: 'white',
|
|
color: 'white',
|
|
|
}"
|
|
}"
|
|
|
>
|
|
>
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
prop="userId"
|
|
prop="userId"
|
|
|
label="外部人员Id"
|
|
label="外部人员Id"
|
|
@@ -511,7 +511,7 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button v-no-more-click type="primary" @click="confirmAddUser"
|
|
<el-button v-no-more-click type="primary" @click="confirmAddUser"
|
|
|
- >确认
|
|
|
|
|
|
|
+ >确认
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button v-no-more-click @click="cancel">取 消</el-button>
|
|
<el-button v-no-more-click @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
</div>
|
|
@@ -580,13 +580,13 @@
|
|
|
<span
|
|
<span
|
|
|
v-else-if="scope.row.jobStatus == 4"
|
|
v-else-if="scope.row.jobStatus == 4"
|
|
|
style="font-size: 20px; line-height: 30px"
|
|
style="font-size: 20px; line-height: 30px"
|
|
|
- >🔒</span
|
|
|
|
|
|
|
+ >🔒</span
|
|
|
>
|
|
>
|
|
|
<!-- 显示对号 -->
|
|
<!-- 显示对号 -->
|
|
|
<span
|
|
<span
|
|
|
v-else-if="scope.row.jobStatus == 5"
|
|
v-else-if="scope.row.jobStatus == 5"
|
|
|
style="font-size: 20px; line-height: 30px"
|
|
style="font-size: 20px; line-height: 30px"
|
|
|
- >✓</span
|
|
|
|
|
|
|
+ >✓</span
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -620,13 +620,13 @@
|
|
|
<span
|
|
<span
|
|
|
v-else-if="scope.row.jobStatus == 4"
|
|
v-else-if="scope.row.jobStatus == 4"
|
|
|
style="font-size: 20px; line-height: 30px"
|
|
style="font-size: 20px; line-height: 30px"
|
|
|
- >🔒</span
|
|
|
|
|
|
|
+ >🔒</span
|
|
|
>
|
|
>
|
|
|
<!-- 显示对号 -->
|
|
<!-- 显示对号 -->
|
|
|
<span
|
|
<span
|
|
|
v-else-if="scope.row.jobStatus == 5"
|
|
v-else-if="scope.row.jobStatus == 5"
|
|
|
style="font-size: 20px; line-height: 30px"
|
|
style="font-size: 20px; line-height: 30px"
|
|
|
- >✓</span
|
|
|
|
|
|
|
+ >✓</span
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -660,13 +660,13 @@
|
|
|
<span
|
|
<span
|
|
|
v-else-if="scope.row.pointStatus == 1"
|
|
v-else-if="scope.row.pointStatus == 1"
|
|
|
style="font-size: 20px; line-height: 30px"
|
|
style="font-size: 20px; line-height: 30px"
|
|
|
- >🔒</span
|
|
|
|
|
|
|
+ >🔒</span
|
|
|
>
|
|
>
|
|
|
<!-- 显示对号 -->
|
|
<!-- 显示对号 -->
|
|
|
<span
|
|
<span
|
|
|
v-else-if="scope.row.pointStatus == 2"
|
|
v-else-if="scope.row.pointStatus == 2"
|
|
|
style="font-size: 20px; line-height: 30px"
|
|
style="font-size: 20px; line-height: 30px"
|
|
|
- >✓</span
|
|
|
|
|
|
|
+ >✓</span
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -694,7 +694,7 @@
|
|
|
append-to-body
|
|
append-to-body
|
|
|
>
|
|
>
|
|
|
<el-table :data="AffectedTickets">
|
|
<el-table :data="AffectedTickets">
|
|
|
- <el-table-column label="作业票编号" prop="ticketId"> </el-table-column>
|
|
|
|
|
|
|
+ <el-table-column label="作业票编号" prop="ticketId"></el-table-column>
|
|
|
<el-table-column label="作业票名称" prop="ticketName" width="220">
|
|
<el-table-column label="作业票名称" prop="ticketName" width="220">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
@@ -783,10 +783,10 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { listMarsDept } from "@/api/system/marsdept";
|
|
|
|
|
-import { getTechnologyInfo, listTechnology } from "@/api/system/machinery";
|
|
|
|
|
-import Template from "@/views/print/printtemplate/list.vue";
|
|
|
|
|
-import { getIsMarsSopPage } from "@/api/mes/sop/sopindex";
|
|
|
|
|
|
|
+import { listMarsDept } from '@/api/system/marsdept'
|
|
|
|
|
+import { getTechnologyInfo, listTechnology } from '@/api/system/machinery'
|
|
|
|
|
+import Template from '@/views/print/printtemplate/list.vue'
|
|
|
|
|
+import { getIsMarsSopPage } from '@/api/mes/sop/sopindex'
|
|
|
import {
|
|
import {
|
|
|
addJobTicket,
|
|
addJobTicket,
|
|
|
addJobUsers,
|
|
addJobUsers,
|
|
@@ -798,33 +798,33 @@ import {
|
|
|
selectSopTypeByMachineryId,
|
|
selectSopTypeByMachineryId,
|
|
|
updateJobStep,
|
|
updateJobStep,
|
|
|
updateJobToCancel,
|
|
updateJobToCancel,
|
|
|
- updateJobToFinish,
|
|
|
|
|
-} from "@/api/mes/job/job";
|
|
|
|
|
-import MapData from "@/views/mes/job/jobm/Mapdata.vue";
|
|
|
|
|
-import { getUserList } from "@/api/mes/workCard";
|
|
|
|
|
-import { getJobPlayTicketInfo } from "@/api/mes/jobplay/jobplay";
|
|
|
|
|
-import { getLotoInfo, getLotoMapInfo } from "@/api/mes/lotoStation/lotoStation";
|
|
|
|
|
-import LockDetail from "@/views/mes/job/jobm/LockDetail.vue";
|
|
|
|
|
|
|
+ updateJobToFinish
|
|
|
|
|
+} from '@/api/mes/job/job'
|
|
|
|
|
+import MapData from '@/views/mes/job/jobm/Mapdata.vue'
|
|
|
|
|
+import { getUserList } from '@/api/mes/workCard'
|
|
|
|
|
+import { getJobPlayTicketInfo } from '@/api/mes/jobplay/jobplay'
|
|
|
|
|
+import { getLotoInfo, getLotoMapInfo } from '@/api/mes/lotoStation/lotoStation'
|
|
|
|
|
+import LockDetail from '@/views/mes/job/jobm/LockDetail.vue'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
- name: "NewSop",
|
|
|
|
|
|
|
+ name: 'NewSop',
|
|
|
components: { Template, MapData, LockDetail },
|
|
components: { Template, MapData, LockDetail },
|
|
|
- dicts: ["sop_type", "ticket_status", "ticket_user_type"],
|
|
|
|
|
|
|
+ dicts: ['sop_type', 'ticket_status', 'ticket_user_type'],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
imageMap: {
|
|
imageMap: {
|
|
|
- 0: "ticketType0", //维修
|
|
|
|
|
- 1: "ticketType1", //Pm
|
|
|
|
|
- 2: "ticketType2", //开收班
|
|
|
|
|
- 3: "ticketType3", //清洁
|
|
|
|
|
- 4: "ticketType4", //换产
|
|
|
|
|
|
|
+ 0: 'ticketType0', //维修
|
|
|
|
|
+ 1: 'ticketType1', //Pm
|
|
|
|
|
+ 2: 'ticketType2', //开收班
|
|
|
|
|
+ 3: 'ticketType3', //清洁
|
|
|
|
|
+ 4: 'ticketType4' //换产
|
|
|
},
|
|
},
|
|
|
- tabPosition: "first",
|
|
|
|
|
- selectedOption: "",
|
|
|
|
|
|
|
+ tabPosition: 'first',
|
|
|
|
|
+ selectedOption: '',
|
|
|
selectedRow: null, //设备工艺 单选表格
|
|
selectedRow: null, //设备工艺 单选表格
|
|
|
marsSopPage: [], //岗位对应sop列表--现在准备存放设备工艺 而不是选设备工艺的sop
|
|
marsSopPage: [], //岗位对应sop列表--现在准备存放设备工艺 而不是选设备工艺的sop
|
|
|
technologyList: [], //设备工艺表格数据
|
|
technologyList: [], //设备工艺表格数据
|
|
|
- marsSopTitle: "", //岗位后 对应展示sop
|
|
|
|
|
|
|
+ marsSopTitle: '', //岗位后 对应展示sop
|
|
|
marsDeptList: [],
|
|
marsDeptList: [],
|
|
|
listLockerOption: [], //上锁人下拉数据
|
|
listLockerOption: [], //上锁人下拉数据
|
|
|
form: null, //存储选中的设备工艺sop列表数据
|
|
form: null, //存储选中的设备工艺sop列表数据
|
|
@@ -840,15 +840,15 @@ export default {
|
|
|
outsideTableDataOrign: [], //外部原始数据
|
|
outsideTableDataOrign: [], //外部原始数据
|
|
|
selectedInsideRows: [], // 存储选中的内部人员的 userId
|
|
selectedInsideRows: [], // 存储选中的内部人员的 userId
|
|
|
selectedOutsideRows: [], // 存储选中的外部人员的 userId
|
|
selectedOutsideRows: [], // 存储选中的外部人员的 userId
|
|
|
- insideSearchQuery: "", // 内部搜索条件
|
|
|
|
|
- outsideSearchQuery: "", // 外部搜索条件
|
|
|
|
|
|
|
+ insideSearchQuery: '', // 内部搜索条件
|
|
|
|
|
+ outsideSearchQuery: '', // 外部搜索条件
|
|
|
AllUserTable: [], //所有选中人员列表
|
|
AllUserTable: [], //所有选中人员列表
|
|
|
dialogForm: {
|
|
dialogForm: {
|
|
|
- nickName: "",
|
|
|
|
|
- username: "",
|
|
|
|
|
|
|
+ nickName: '',
|
|
|
|
|
+ username: ''
|
|
|
},
|
|
},
|
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
|
- title: "",
|
|
|
|
|
|
|
+ title: '',
|
|
|
// 弹框中显示的form表单内容
|
|
// 弹框中显示的form表单内容
|
|
|
newticketUserDTOList: [], //为了上锁人单独传递数据
|
|
newticketUserDTOList: [], //为了上锁人单独传递数据
|
|
|
FiveDetailvisible: false, //第五步详情弹窗
|
|
FiveDetailvisible: false, //第五步详情弹窗
|
|
@@ -867,8 +867,8 @@ export default {
|
|
|
workstationId: null, //岗位Id
|
|
workstationId: null, //岗位Id
|
|
|
rules: {
|
|
rules: {
|
|
|
locker: [
|
|
locker: [
|
|
|
- { required: true, message: "上锁人不能为空", trigger: "change" },
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ { required: true, message: '上锁人不能为空', trigger: 'change' }
|
|
|
|
|
+ ]
|
|
|
},
|
|
},
|
|
|
tableVisible: true, //表格显示
|
|
tableVisible: true, //表格显示
|
|
|
LockDetailvisible: false, //锁定站详情'
|
|
LockDetailvisible: false, //锁定站详情'
|
|
@@ -876,15 +876,15 @@ export default {
|
|
|
left: 500,
|
|
left: 500,
|
|
|
top: 260,
|
|
top: 260,
|
|
|
width: 65,
|
|
width: 65,
|
|
|
- height: 25,
|
|
|
|
|
|
|
+ height: 25
|
|
|
},
|
|
},
|
|
|
deptCCOPosition: {
|
|
deptCCOPosition: {
|
|
|
left: 670,
|
|
left: 670,
|
|
|
top: 480,
|
|
top: 480,
|
|
|
width: 65,
|
|
width: 65,
|
|
|
- height: 25,
|
|
|
|
|
- },
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ height: 25
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
// filteredSopTypes() {
|
|
// filteredSopTypes() {
|
|
@@ -896,58 +896,58 @@ export default {
|
|
|
// )
|
|
// )
|
|
|
// },
|
|
// },
|
|
|
isStepFourExecuted() {
|
|
isStepFourExecuted() {
|
|
|
- const stepFour = this.EightStepForm.find((step) => step.stepIndex == "4");
|
|
|
|
|
- return stepFour && stepFour.stepStatus === "1";
|
|
|
|
|
|
|
+ const stepFour = this.EightStepForm.find((step) => step.stepIndex == '4')
|
|
|
|
|
+ return stepFour && stepFour.stepStatus === '1'
|
|
|
},
|
|
},
|
|
|
deptXLGCenter() {
|
|
deptXLGCenter() {
|
|
|
return {
|
|
return {
|
|
|
left: this.deptXLGPosition.left + this.deptXLGPosition.width / 2,
|
|
left: this.deptXLGPosition.left + this.deptXLGPosition.width / 2,
|
|
|
- top: this.deptXLGPosition.top + this.deptXLGPosition.height / 2,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ top: this.deptXLGPosition.top + this.deptXLGPosition.height / 2
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
deptCCOCenter() {
|
|
deptCCOCenter() {
|
|
|
return {
|
|
return {
|
|
|
left: this.deptCCOPosition.left + this.deptCCOPosition.width / 2,
|
|
left: this.deptCCOPosition.left + this.deptCCOPosition.width / 2,
|
|
|
- top: this.deptCCOPosition.top + this.deptCCOPosition.height / 2,
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ top: this.deptCCOPosition.top + this.deptCCOPosition.height / 2
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
- tabPosition: function (val, oldVal) {
|
|
|
|
|
- if (val == "first") {
|
|
|
|
|
- this.getList();
|
|
|
|
|
|
|
+ tabPosition: function(val, oldVal) {
|
|
|
|
|
+ if (val == 'first') {
|
|
|
|
|
+ this.getList()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- "dialogForm.locker": function (val) {
|
|
|
|
|
|
|
+ 'dialogForm.locker': function(val) {
|
|
|
if (val) {
|
|
if (val) {
|
|
|
- this.handlelockerChage(val);
|
|
|
|
|
- console.log("我制定了");
|
|
|
|
|
|
|
+ this.handlelockerChage(val)
|
|
|
|
|
+ console.log('我制定了')
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- this.getList();
|
|
|
|
|
|
|
+ this.getList()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
// 锁定站信息部分表格收缩
|
|
// 锁定站信息部分表格收缩
|
|
|
handleChangeTable() {
|
|
handleChangeTable() {
|
|
|
- this.tableVisible = !this.tableVisible;
|
|
|
|
|
|
|
+ this.tableVisible = !this.tableVisible
|
|
|
},
|
|
},
|
|
|
// 锁定站进入详细页面
|
|
// 锁定站进入详细页面
|
|
|
goLockDetail() {
|
|
goLockDetail() {
|
|
|
// this.$router.push({
|
|
// this.$router.push({
|
|
|
// name:'LockDetail',params: { machineryId: this.machineryId }
|
|
// name:'LockDetail',params: { machineryId: this.machineryId }
|
|
|
// },)
|
|
// },)
|
|
|
- this.LockDetailvisible = true;
|
|
|
|
|
|
|
+ this.LockDetailvisible = true
|
|
|
},
|
|
},
|
|
|
// 内部人员搜索
|
|
// 内部人员搜索
|
|
|
filterInsideTable() {
|
|
filterInsideTable() {
|
|
|
- const query = this.insideSearchQuery.trim().toLowerCase();
|
|
|
|
|
|
|
+ const query = this.insideSearchQuery.trim().toLowerCase()
|
|
|
const filteredData = this.insideTableDataOrign.filter((item) =>
|
|
const filteredData = this.insideTableDataOrign.filter((item) =>
|
|
|
item.nickName.toLowerCase().includes(query)
|
|
item.nickName.toLowerCase().includes(query)
|
|
|
- );
|
|
|
|
|
- this.insideTableData = filteredData;
|
|
|
|
|
|
|
+ )
|
|
|
|
|
+ this.insideTableData = filteredData
|
|
|
|
|
|
|
|
// 如果输入框为空或null,回显选中状态
|
|
// 如果输入框为空或null,回显选中状态
|
|
|
if (!this.insideSearchQuery) {
|
|
if (!this.insideSearchQuery) {
|
|
@@ -955,31 +955,31 @@ export default {
|
|
|
this.insideTableData.forEach((user) => {
|
|
this.insideTableData.forEach((user) => {
|
|
|
const matchingUser = this.AllUserTable.find(
|
|
const matchingUser = this.AllUserTable.find(
|
|
|
(u) => u.userId == user.userId
|
|
(u) => u.userId == user.userId
|
|
|
- );
|
|
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
- console.log("Matching User:", matchingUser); // 输出匹配结果
|
|
|
|
|
|
|
+ console.log('Matching User:', matchingUser) // 输出匹配结果
|
|
|
if (matchingUser) {
|
|
if (matchingUser) {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
- console.log(`Selecting user: ${user.nickName}`);
|
|
|
|
|
- this.$refs.insideTable.toggleRowSelection(user, true);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.log(`Selecting user: ${user.nickName}`)
|
|
|
|
|
+ this.$refs.insideTable.toggleRowSelection(user, true)
|
|
|
|
|
+ })
|
|
|
} else {
|
|
} else {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
- console.log(`Deselecting user: ${user.nickName}`);
|
|
|
|
|
- this.$refs.insideTable.toggleRowSelection(user, false);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.log(`Deselecting user: ${user.nickName}`)
|
|
|
|
|
+ this.$refs.insideTable.toggleRowSelection(user, false)
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 外部人员搜索
|
|
// 外部人员搜索
|
|
|
filterOutsideTable() {
|
|
filterOutsideTable() {
|
|
|
- const query = this.outsideSearchQuery.trim().toLowerCase();
|
|
|
|
|
|
|
+ const query = this.outsideSearchQuery.trim().toLowerCase()
|
|
|
const filteredData = this.outsideTableDataOrign.filter((item) =>
|
|
const filteredData = this.outsideTableDataOrign.filter((item) =>
|
|
|
item.nickName.toLowerCase().includes(query)
|
|
item.nickName.toLowerCase().includes(query)
|
|
|
- );
|
|
|
|
|
- this.outsideTableData = filteredData;
|
|
|
|
|
|
|
+ )
|
|
|
|
|
+ this.outsideTableData = filteredData
|
|
|
|
|
|
|
|
// 如果输入框为空或null,回显选中状态
|
|
// 如果输入框为空或null,回显选中状态
|
|
|
if (!this.outsideSearchQuery) {
|
|
if (!this.outsideSearchQuery) {
|
|
@@ -987,229 +987,234 @@ export default {
|
|
|
this.outsideTableData.forEach((user) => {
|
|
this.outsideTableData.forEach((user) => {
|
|
|
const matchingUser = this.AllUserTable.find(
|
|
const matchingUser = this.AllUserTable.find(
|
|
|
(u) => u.userId == user.userId
|
|
(u) => u.userId == user.userId
|
|
|
- );
|
|
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
- console.log("Matching User:", matchingUser); // 输出匹配结果
|
|
|
|
|
|
|
+ console.log('Matching User:', matchingUser) // 输出匹配结果
|
|
|
if (matchingUser) {
|
|
if (matchingUser) {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
- console.log(`Selecting user: ${user.nickName}`);
|
|
|
|
|
- this.$refs.outsideTable.toggleRowSelection(user, true);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.log(`Selecting user: ${user.nickName}`)
|
|
|
|
|
+ this.$refs.outsideTable.toggleRowSelection(user, true)
|
|
|
|
|
+ })
|
|
|
} else {
|
|
} else {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
- console.log(`Deselecting user: ${user.nickName}`);
|
|
|
|
|
- this.$refs.outsideTable.toggleRowSelection(user, false);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.log(`Deselecting user: ${user.nickName}`)
|
|
|
|
|
+ this.$refs.outsideTable.toggleRowSelection(user, false)
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
handleTicketClick(data) {
|
|
handleTicketClick(data) {
|
|
|
- console.log(data, "查看作业票详情");
|
|
|
|
|
- this.ticketId = data.ticketId;
|
|
|
|
|
- this.tabPosition = "third";
|
|
|
|
|
- this.workstationId = data.workstationId;
|
|
|
|
|
|
|
+ console.log(data, '查看作业票详情')
|
|
|
|
|
+ this.ticketId = data.ticketId
|
|
|
|
|
+ this.tabPosition = 'third'
|
|
|
|
|
+ this.workstationId = data.workstationId
|
|
|
|
|
|
|
|
getStepInfo(this.ticketId).then((res) => {
|
|
getStepInfo(this.ticketId).then((res) => {
|
|
|
- this.EightStepForm = res.data;
|
|
|
|
|
- console.log(res, "作业票-详细信息");
|
|
|
|
|
- });
|
|
|
|
|
- this.machineryId = data.machineryId;
|
|
|
|
|
|
|
+ this.EightStepForm = res.data
|
|
|
|
|
+ console.log(res, '作业票-详细信息')
|
|
|
|
|
+ })
|
|
|
|
|
+ this.machineryId = data.machineryId
|
|
|
// 获取设备工艺图
|
|
// 获取设备工艺图
|
|
|
getTechnologyInfo(data.machineryId).then((res) => {
|
|
getTechnologyInfo(data.machineryId).then((res) => {
|
|
|
- this.machineryImg = res.data.machineryImg;
|
|
|
|
|
|
|
+ this.machineryImg = res.data.machineryImg
|
|
|
// 获取电柜选中隔离点
|
|
// 获取电柜选中隔离点
|
|
|
- const lotoId = res.data.lotoId;
|
|
|
|
|
- const selectPointsIds = res.data.pointIdList;
|
|
|
|
|
|
|
+ const lotoId = res.data.lotoId
|
|
|
|
|
+ const selectPointsIds = res.data.pointIdList
|
|
|
|
|
|
|
|
getLotoMapInfo(lotoId).then((response) => {
|
|
getLotoMapInfo(lotoId).then((response) => {
|
|
|
- console.log(response, "电柜信息--NewMarsJob");
|
|
|
|
|
|
|
+ console.log(response, '电柜信息--NewMarsJob')
|
|
|
this.selectPointList = response.data.filter((item) =>
|
|
this.selectPointList = response.data.filter((item) =>
|
|
|
selectPointsIds.includes(item.pointId)
|
|
selectPointsIds.includes(item.pointId)
|
|
|
- );
|
|
|
|
|
- console.log(this.selectPointList, "拿到的选中隔离点数据");
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ )
|
|
|
|
|
+ console.log(this.selectPointList, '拿到的选中隔离点数据')
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
getList() {
|
|
getList() {
|
|
|
const data = {
|
|
const data = {
|
|
|
pages: 1,
|
|
pages: 1,
|
|
|
- size: -1,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ size: -1
|
|
|
|
|
+ }
|
|
|
getWorkstationTicketList(data).then((res) => {
|
|
getWorkstationTicketList(data).then((res) => {
|
|
|
- console.log(res, "查看-正在进行中作业票列表");
|
|
|
|
|
|
|
+ console.log(res, '查看-正在进行中作业票列表')
|
|
|
|
|
|
|
|
this.TicketListPage = res.data.filter(
|
|
this.TicketListPage = res.data.filter(
|
|
|
- (item) => item.workstationId == "8"
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ (item) => item.workstationId == '8'
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
this.COCOTicketListPage = res.data.filter(
|
|
this.COCOTicketListPage = res.data.filter(
|
|
|
- (item) => item.workstationId == "7"
|
|
|
|
|
- );
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ (item) => item.workstationId == '7'
|
|
|
|
|
+ )
|
|
|
|
|
+ })
|
|
|
const data1 = {
|
|
const data1 = {
|
|
|
pages: 1,
|
|
pages: 1,
|
|
|
size: -1,
|
|
size: -1,
|
|
|
- machineryType: "工艺",
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ machineryType: '工艺'
|
|
|
|
|
+ }
|
|
|
listTechnology(data1).then((res) => {
|
|
listTechnology(data1).then((res) => {
|
|
|
- console.log(res, "technologyList");
|
|
|
|
|
- this.technologyList = res.data.records;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.log(res, 'technologyList')
|
|
|
|
|
+ this.technologyList = res.data.records
|
|
|
|
|
+ })
|
|
|
listMarsDept(data).then((res) => {
|
|
listMarsDept(data).then((res) => {
|
|
|
- console.log(res, "marsDeptList");
|
|
|
|
|
- this.marsDeptList = res.data.records;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.log(res, 'marsDeptList')
|
|
|
|
|
+ this.marsDeptList = res.data.records
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
// sop类型 el-radio
|
|
// sop类型 el-radio
|
|
|
handleSopchange(data) {
|
|
handleSopchange(data) {
|
|
|
- const sopType = this.sopTypeOption.find((item) => item.label == data);
|
|
|
|
|
|
|
+ const sopType = this.sopTypeOption.find((item) => item.label == data)
|
|
|
const data1 = {
|
|
const data1 = {
|
|
|
pages: 1,
|
|
pages: 1,
|
|
|
size: -1,
|
|
size: -1,
|
|
|
machineryId: this.machineryId,
|
|
machineryId: this.machineryId,
|
|
|
- sopType: sopType.value,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ sopType: sopType.value
|
|
|
|
|
+ }
|
|
|
getIsMarsSopPage(data1).then((res) => {
|
|
getIsMarsSopPage(data1).then((res) => {
|
|
|
- console.log(res, "SopPage");
|
|
|
|
|
- this.sopId = res.data.records[0].sopId;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.log(res, 'SopPage')
|
|
|
|
|
+ this.sopId = res.data.records[0].sopId
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 作业票切换
|
|
// 作业票切换
|
|
|
handelChange(val, workstationId, workstationName) {
|
|
handelChange(val, workstationId, workstationName) {
|
|
|
- console.log(val);
|
|
|
|
|
- this.tabPosition = val;
|
|
|
|
|
- this.marsSopTitle = workstationName;
|
|
|
|
|
- this.workstationId = workstationId;
|
|
|
|
|
|
|
+ console.log(val)
|
|
|
|
|
+
|
|
|
|
|
+ this.marsSopTitle = workstationName
|
|
|
|
|
+ this.workstationId = workstationId
|
|
|
if (workstationId) {
|
|
if (workstationId) {
|
|
|
const data = {
|
|
const data = {
|
|
|
pages: 1,
|
|
pages: 1,
|
|
|
size: -1,
|
|
size: -1,
|
|
|
workstationId: workstationId,
|
|
workstationId: workstationId,
|
|
|
- machineryType: "工艺",
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ machineryType: '工艺'
|
|
|
|
|
+ }
|
|
|
listTechnology(data).then((res) => {
|
|
listTechnology(data).then((res) => {
|
|
|
- console.log(res, "设备工艺---列表");
|
|
|
|
|
- this.technologyList = res.data.records;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.log(res, '设备工艺---列表')
|
|
|
|
|
+ this.technologyList = res.data.records
|
|
|
|
|
+ })
|
|
|
// getIsMarsSopPage(data).then((res) => {
|
|
// getIsMarsSopPage(data).then((res) => {
|
|
|
// console.log(res, 'SopPage')
|
|
// console.log(res, 'SopPage')
|
|
|
// this.marsSopPage = res.data.records
|
|
// this.marsSopPage = res.data.records
|
|
|
// })
|
|
// })
|
|
|
}
|
|
}
|
|
|
- if (val == "third") {
|
|
|
|
|
- this.selectedOption = "";
|
|
|
|
|
- this.sopTypeOption = [];
|
|
|
|
|
- console.log(this.sopId, "this.sopId");
|
|
|
|
|
|
|
+ if (!this.sopId&&val == 'third') {
|
|
|
|
|
+ this.$message.error('请先选择对应设备工艺或sop类型')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.tabPosition = val
|
|
|
|
|
+ if (val == 'third') {
|
|
|
|
|
+ this.selectedOption = ''
|
|
|
|
|
+ this.sopTypeOption = []
|
|
|
|
|
+ console.log(this.sopId, 'this.sopId')
|
|
|
if (this.sopId) {
|
|
if (this.sopId) {
|
|
|
const data = {
|
|
const data = {
|
|
|
- sopId: this.sopId,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ sopId: this.sopId
|
|
|
|
|
+ }
|
|
|
addJobTicket(data).then((res) => {
|
|
addJobTicket(data).then((res) => {
|
|
|
- console.log(res, "作业票新增");
|
|
|
|
|
- this.$message.success("作业开始执行");
|
|
|
|
|
- this.ticketId = res.data;
|
|
|
|
|
|
|
+ console.log(res, '作业票新增')
|
|
|
|
|
+ this.$message.success('作业开始执行')
|
|
|
|
|
+ this.ticketId = res.data
|
|
|
getStepInfo(this.ticketId).then((res) => {
|
|
getStepInfo(this.ticketId).then((res) => {
|
|
|
- this.EightStepForm = res.data;
|
|
|
|
|
- console.log(res, "作业票-详细信息");
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.EightStepForm = res.data
|
|
|
|
|
+ console.log(res, '作业票-详细信息')
|
|
|
|
|
+ })
|
|
|
// 获取设备工艺图
|
|
// 获取设备工艺图
|
|
|
getTechnologyInfo(this.machineryId).then((res) => {
|
|
getTechnologyInfo(this.machineryId).then((res) => {
|
|
|
- this.machineryImg = res.data.machineryImg;
|
|
|
|
|
|
|
+ this.machineryImg = res.data.machineryImg
|
|
|
// 获取电柜选中隔离点
|
|
// 获取电柜选中隔离点
|
|
|
- const lotoId = res.data.lotoId;
|
|
|
|
|
- const selectPointsIds = res.data.pointIdList;
|
|
|
|
|
|
|
+ const lotoId = res.data.lotoId
|
|
|
|
|
+ const selectPointsIds = res.data.pointIdList
|
|
|
|
|
|
|
|
getLotoMapInfo(lotoId).then((response) => {
|
|
getLotoMapInfo(lotoId).then((response) => {
|
|
|
- console.log(response, "电柜信息--NewMarsJob");
|
|
|
|
|
|
|
+ console.log(response, '电柜信息--NewMarsJob')
|
|
|
this.selectPointList = response.data.filter((item) =>
|
|
this.selectPointList = response.data.filter((item) =>
|
|
|
selectPointsIds.includes(item.pointId)
|
|
selectPointsIds.includes(item.pointId)
|
|
|
- );
|
|
|
|
|
- console.log(this.selectPointList, "拿到的选中隔离点数据");
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ )
|
|
|
|
|
+ console.log(this.selectPointList, '拿到的选中隔离点数据')
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 单选选中数据
|
|
// 单选选中数据
|
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
|
- console.log(selection, "mars设备工艺表格多选拿到的数据");
|
|
|
|
|
|
|
+ console.log(selection, 'mars设备工艺表格多选拿到的数据')
|
|
|
|
|
|
|
|
- this.form = selection;
|
|
|
|
|
- this.machineryId = selection.machineryId;
|
|
|
|
|
|
|
+ this.form = selection
|
|
|
|
|
+ this.machineryId = selection.machineryId
|
|
|
getTechnologyInfo(selection.machineryId).then((res) => {
|
|
getTechnologyInfo(selection.machineryId).then((res) => {
|
|
|
- this.machineryImg = res.data.machineryImg;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.machineryImg = res.data.machineryImg
|
|
|
|
|
+ })
|
|
|
selectSopTypeByMachineryId(selection.machineryId).then((res) => {
|
|
selectSopTypeByMachineryId(selection.machineryId).then((res) => {
|
|
|
- console.log(res, "SopTypeByMachineryId");
|
|
|
|
|
|
|
+ console.log(res, 'SopTypeByMachineryId')
|
|
|
this.sopTypeOption = res.data.map((item) => {
|
|
this.sopTypeOption = res.data.map((item) => {
|
|
|
return {
|
|
return {
|
|
|
label: item.dictLabel,
|
|
label: item.dictLabel,
|
|
|
- value: item.dictValue,
|
|
|
|
|
- };
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ value: item.dictValue
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
// 添加内部人员
|
|
// 添加内部人员
|
|
|
addInside(row) {
|
|
addInside(row) {
|
|
|
- if (row.stepIndex == "3") {
|
|
|
|
|
- this.dialogForm.locker = "";
|
|
|
|
|
- this.AllUserTable = [];
|
|
|
|
|
- this.newticketUserDTOList = [];
|
|
|
|
|
|
|
+ if (row.stepIndex == '3') {
|
|
|
|
|
+ this.dialogForm.locker = ''
|
|
|
|
|
+ this.AllUserTable = []
|
|
|
|
|
+ this.newticketUserDTOList = []
|
|
|
|
|
|
|
|
const roleId = this.dict.type.ticket_user_type.find(
|
|
const roleId = this.dict.type.ticket_user_type.find(
|
|
|
- (item) => item.label == "jtlocker"
|
|
|
|
|
- ); //利用字典值来记录上锁人 共锁人 方便如果修改了值 直接系统更改
|
|
|
|
|
|
|
+ (item) => item.label == 'jtlocker'
|
|
|
|
|
+ ) //利用字典值来记录上锁人 共锁人 方便如果修改了值 直接系统更改
|
|
|
const query1 = {
|
|
const query1 = {
|
|
|
pageSize: 10000,
|
|
pageSize: 10000,
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
workstationId: this.workstationId,
|
|
workstationId: this.workstationId,
|
|
|
roleId: roleId.value,
|
|
roleId: roleId.value,
|
|
|
- unitId: 9,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ unitId: 9
|
|
|
|
|
+ }
|
|
|
// 上锁人赋值 上锁人 共锁人都要遵循 属于当前工艺 当前作业负责人或者执行人的角色属性
|
|
// 上锁人赋值 上锁人 共锁人都要遵循 属于当前工艺 当前作业负责人或者执行人的角色属性
|
|
|
getUserList(query1).then((res) => {
|
|
getUserList(query1).then((res) => {
|
|
|
// 上锁人下拉数据
|
|
// 上锁人下拉数据
|
|
|
this.listLockerOption = res.rows.map((item) => ({
|
|
this.listLockerOption = res.rows.map((item) => ({
|
|
|
label: item.nickName,
|
|
label: item.nickName,
|
|
|
- value: item.userId,
|
|
|
|
|
- }));
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ value: item.userId
|
|
|
|
|
+ }))
|
|
|
|
|
+ })
|
|
|
const roleIdColocker = this.dict.type.ticket_user_type.find(
|
|
const roleIdColocker = this.dict.type.ticket_user_type.find(
|
|
|
- (item) => item.label == "jtcolocker"
|
|
|
|
|
- ); //利用字典值来记录上锁人 共锁人 方便如果修改了值 直接系统更改
|
|
|
|
|
|
|
+ (item) => item.label == 'jtcolocker'
|
|
|
|
|
+ ) //利用字典值来记录上锁人 共锁人 方便如果修改了值 直接系统更改
|
|
|
const query = {
|
|
const query = {
|
|
|
pageSize: 10000,
|
|
pageSize: 10000,
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
workstationId: this.workstationId,
|
|
workstationId: this.workstationId,
|
|
|
- roleId: roleIdColocker.value,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ roleId: roleIdColocker.value
|
|
|
|
|
+ }
|
|
|
// 共锁人赋值
|
|
// 共锁人赋值
|
|
|
getUserList(query).then((res) => {
|
|
getUserList(query).then((res) => {
|
|
|
// 内部共锁人
|
|
// 内部共锁人
|
|
|
- this.insideTableData = res.rows.filter((item) => item.unitId == 9);
|
|
|
|
|
|
|
+ this.insideTableData = res.rows.filter((item) => item.unitId == 9)
|
|
|
// 外部共锁人
|
|
// 外部共锁人
|
|
|
- this.outsideTableData = res.rows.filter((item) => item.unitId != "9");
|
|
|
|
|
|
|
+ this.outsideTableData = res.rows.filter((item) => item.unitId != '9')
|
|
|
|
|
|
|
|
// 获取已分配人员数据
|
|
// 获取已分配人员数据
|
|
|
getJobTicketInfo(this.ticketId).then((res) => {
|
|
getJobTicketInfo(this.ticketId).then((res) => {
|
|
|
- const assignedUsers = res.data.jobTicketUserList || [];
|
|
|
|
|
- console.log(assignedUsers, "已分配人员");
|
|
|
|
|
|
|
+ const assignedUsers = res.data.jobTicketUserList || []
|
|
|
|
|
+ console.log(assignedUsers, '已分配人员')
|
|
|
|
|
|
|
|
this.dialogForm.locker = assignedUsers
|
|
this.dialogForm.locker = assignedUsers
|
|
|
- .filter((item) => item.userRole == "jtlocker")
|
|
|
|
|
- .map((item) => item.userName);
|
|
|
|
|
|
|
+ .filter((item) => item.userRole == 'jtlocker')
|
|
|
|
|
+ .map((item) => item.userName)
|
|
|
|
|
|
|
|
const newUser = res.data.jobTicketUserList.filter(
|
|
const newUser = res.data.jobTicketUserList.filter(
|
|
|
- (item) => item.userRole == "jtlocker"
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ (item) => item.userRole == 'jtlocker'
|
|
|
|
|
+ )
|
|
|
this.newticketUserDTOList = [
|
|
this.newticketUserDTOList = [
|
|
|
...this.newticketUserDTOList,
|
|
...this.newticketUserDTOList,
|
|
|
- ...newUser,
|
|
|
|
|
- ];
|
|
|
|
|
|
|
+ ...newUser
|
|
|
|
|
+ ]
|
|
|
// 更新内部和外部用户的选中状态
|
|
// 更新内部和外部用户的选中状态
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
// 手动选中内部人员
|
|
// 手动选中内部人员
|
|
@@ -1217,82 +1222,82 @@ export default {
|
|
|
const isAssigned = assignedUsers.some(
|
|
const isAssigned = assignedUsers.some(
|
|
|
(assigned) =>
|
|
(assigned) =>
|
|
|
assigned.userId == user.userId &&
|
|
assigned.userId == user.userId &&
|
|
|
- assigned.userType == "0" &&
|
|
|
|
|
- assigned.userRole !== "jtlocker"
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ assigned.userType == '0' &&
|
|
|
|
|
+ assigned.userRole !== 'jtlocker'
|
|
|
|
|
+ )
|
|
|
if (isAssigned) {
|
|
if (isAssigned) {
|
|
|
- this.$refs.insideTable.toggleRowSelection(user, true);
|
|
|
|
|
|
|
+ this.$refs.insideTable.toggleRowSelection(user, true)
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
// 手动选中外部人员
|
|
// 手动选中外部人员
|
|
|
this.outsideTableData.forEach((user) => {
|
|
this.outsideTableData.forEach((user) => {
|
|
|
const isAssigned = assignedUsers.some(
|
|
const isAssigned = assignedUsers.some(
|
|
|
(assigned) =>
|
|
(assigned) =>
|
|
|
assigned.userId == user.userId &&
|
|
assigned.userId == user.userId &&
|
|
|
- assigned.userType == "1" &&
|
|
|
|
|
- assigned.userRole !== "jtlocker"
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ assigned.userType == '1' &&
|
|
|
|
|
+ assigned.userRole !== 'jtlocker'
|
|
|
|
|
+ )
|
|
|
if (isAssigned) {
|
|
if (isAssigned) {
|
|
|
- this.$refs.outsideTable.toggleRowSelection(user, true);
|
|
|
|
|
|
|
+ this.$refs.outsideTable.toggleRowSelection(user, true)
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
- this.insideTableDataOrign = [...this.insideTableData];
|
|
|
|
|
- this.outsideTableDataOrign = [...this.outsideTableData];
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ this.insideTableDataOrign = [...this.insideTableData]
|
|
|
|
|
+ this.outsideTableDataOrign = [...this.outsideTableData]
|
|
|
|
|
|
|
|
- this.open = true;
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.open = true
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
} else {
|
|
} else {
|
|
|
const data = {
|
|
const data = {
|
|
|
stepId: row.stepId,
|
|
stepId: row.stepId,
|
|
|
- stepStatus: "1",
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ stepStatus: '1'
|
|
|
|
|
+ }
|
|
|
updateJobStep(data).then((res) => {
|
|
updateJobStep(data).then((res) => {
|
|
|
- this.$message.success("执行成功");
|
|
|
|
|
|
|
+ this.$message.success('执行成功')
|
|
|
getStepInfo(this.ticketId).then((res) => {
|
|
getStepInfo(this.ticketId).then((res) => {
|
|
|
- this.EightStepForm = res.data;
|
|
|
|
|
- console.log(res, "作业票-详细信息");
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.EightStepForm = res.data
|
|
|
|
|
+ console.log(res, '作业票-详细信息')
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 上锁人下拉选择change事件
|
|
// 上锁人下拉选择change事件
|
|
|
handlelockerChage(val) {
|
|
handlelockerChage(val) {
|
|
|
- console.log(val, "上锁人chage");
|
|
|
|
|
|
|
+ console.log(val, '上锁人chage')
|
|
|
if (val) {
|
|
if (val) {
|
|
|
// 操作选中角色发生变化
|
|
// 操作选中角色发生变化
|
|
|
- this.newticketUserDTOList = [];
|
|
|
|
|
- this.$set(this.dialogForm, this.dialogForm.locker, val);
|
|
|
|
|
|
|
+ this.newticketUserDTOList = []
|
|
|
|
|
+ this.$set(this.dialogForm, this.dialogForm.locker, val)
|
|
|
} else {
|
|
} else {
|
|
|
- this.$set(this.dialogForm, this.dialogForm.locker, val);
|
|
|
|
|
|
|
+ this.$set(this.dialogForm, this.dialogForm.locker, val)
|
|
|
}
|
|
}
|
|
|
- this.$forceUpdate();
|
|
|
|
|
- const user = this.listLockerOption.find((item) => item.value == val);
|
|
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+ const user = this.listLockerOption.find((item) => item.value == val)
|
|
|
|
|
|
|
|
- if (user && this.dialogForm.locker !== "") {
|
|
|
|
|
|
|
+ if (user && this.dialogForm.locker !== '') {
|
|
|
const existingUser = this.listLockerOption.find(
|
|
const existingUser = this.listLockerOption.find(
|
|
|
(u) => u.userName === user.label
|
|
(u) => u.userName === user.label
|
|
|
- );
|
|
|
|
|
|
|
+ )
|
|
|
if (!existingUser) {
|
|
if (!existingUser) {
|
|
|
this.newticketUserDTOList.push({
|
|
this.newticketUserDTOList.push({
|
|
|
userName: user.label,
|
|
userName: user.label,
|
|
|
userId: user.value,
|
|
userId: user.value,
|
|
|
userType: 0,
|
|
userType: 0,
|
|
|
- userRole: "jtlocker",
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ userRole: 'jtlocker'
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
- console.log(this.newticketUserDTOList, "用户");
|
|
|
|
|
|
|
+ console.log(this.newticketUserDTOList, '用户')
|
|
|
} else {
|
|
} else {
|
|
|
// console.log('用户已存在', user.label)
|
|
// console.log('用户已存在', user.label)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
handlelockerClear() {
|
|
handlelockerClear() {
|
|
|
- this.newticketUserDTOList = [];
|
|
|
|
|
- console.log(this.newticketUserDTOList, "清除后的用户");
|
|
|
|
|
|
|
+ this.newticketUserDTOList = []
|
|
|
|
|
+ console.log(this.newticketUserDTOList, '清除后的用户')
|
|
|
},
|
|
},
|
|
|
InSelectionChange(selection) {
|
|
InSelectionChange(selection) {
|
|
|
// 移除未选中的内部用户
|
|
// 移除未选中的内部用户
|
|
@@ -1300,7 +1305,7 @@ export default {
|
|
|
(user) =>
|
|
(user) =>
|
|
|
user.userType !== 0 ||
|
|
user.userType !== 0 ||
|
|
|
selection.some((item) => item.userId === user.userId)
|
|
selection.some((item) => item.userId === user.userId)
|
|
|
- );
|
|
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
// 添加新的内部用户
|
|
// 添加新的内部用户
|
|
|
selection.forEach((item) => {
|
|
selection.forEach((item) => {
|
|
@@ -1313,12 +1318,12 @@ export default {
|
|
|
userName: item.nickName,
|
|
userName: item.nickName,
|
|
|
userId: item.userId,
|
|
userId: item.userId,
|
|
|
userType: 0,
|
|
userType: 0,
|
|
|
- userRole: "jtcolocker",
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ userRole: 'jtcolocker'
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
- console.log(this.AllUserTable, "内部人员");
|
|
|
|
|
|
|
+ console.log(this.AllUserTable, '内部人员')
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
OutSelectionChange(selection) {
|
|
OutSelectionChange(selection) {
|
|
@@ -1327,7 +1332,7 @@ export default {
|
|
|
(user) =>
|
|
(user) =>
|
|
|
user.userType !== 1 ||
|
|
user.userType !== 1 ||
|
|
|
selection.some((item) => item.userId === user.userId)
|
|
selection.some((item) => item.userId === user.userId)
|
|
|
- );
|
|
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
// 添加新的外部用户
|
|
// 添加新的外部用户
|
|
|
selection.forEach((item) => {
|
|
selection.forEach((item) => {
|
|
@@ -1340,111 +1345,111 @@ export default {
|
|
|
userName: item.nickName,
|
|
userName: item.nickName,
|
|
|
userId: item.userId,
|
|
userId: item.userId,
|
|
|
userType: 1,
|
|
userType: 1,
|
|
|
- userRole: "jtcolocker",
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ userRole: 'jtcolocker'
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
- console.log(this.AllUserTable, "外部人员");
|
|
|
|
|
|
|
+ console.log(this.AllUserTable, '外部人员')
|
|
|
},
|
|
},
|
|
|
confirmAddUser() {
|
|
confirmAddUser() {
|
|
|
const data = {
|
|
const data = {
|
|
|
ticketId: this.ticketId,
|
|
ticketId: this.ticketId,
|
|
|
- ticketUserDTOList: [...this.AllUserTable, ...this.newticketUserDTOList],
|
|
|
|
|
- };
|
|
|
|
|
- console.log(data, "添加人员");
|
|
|
|
|
|
|
+ ticketUserDTOList: [...this.AllUserTable, ...this.newticketUserDTOList]
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(data, '添加人员')
|
|
|
this.$refs.dialogForm.validate((valid) => {
|
|
this.$refs.dialogForm.validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
addJobUsers(data).then((res) => {
|
|
addJobUsers(data).then((res) => {
|
|
|
- console.log(res, "添加人员");
|
|
|
|
|
|
|
+ console.log(res, '添加人员')
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
|
- this.$message.success("分配人员成功");
|
|
|
|
|
- this.open = false;
|
|
|
|
|
- this.AllUserTable = [];
|
|
|
|
|
- this.dialogForm.locker = "";
|
|
|
|
|
|
|
+ this.$message.success('分配人员成功')
|
|
|
|
|
+ this.open = false
|
|
|
|
|
+ this.AllUserTable = []
|
|
|
|
|
+ this.dialogForm.locker = ''
|
|
|
getStepInfo(this.ticketId).then((res) => {
|
|
getStepInfo(this.ticketId).then((res) => {
|
|
|
- this.EightStepForm = res.data;
|
|
|
|
|
- console.log(res, "作业票-详细信息");
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.EightStepForm = res.data
|
|
|
|
|
+ console.log(res, '作业票-详细信息')
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
// 人员列表删除
|
|
// 人员列表删除
|
|
|
deleteRow(index, rows) {
|
|
deleteRow(index, rows) {
|
|
|
- console.log(index, rows, "删除的行");
|
|
|
|
|
- const deletedItem = rows[index]; // 获取要删除的项
|
|
|
|
|
- rows.splice(index, 1); // 从显示的列表中删除
|
|
|
|
|
|
|
+ console.log(index, rows, '删除的行')
|
|
|
|
|
+ const deletedItem = rows[index] // 获取要删除的项
|
|
|
|
|
+ rows.splice(index, 1) // 从显示的列表中删除
|
|
|
|
|
|
|
|
const formIndex = this.dialogForm.ticketUserDTOList.findIndex(
|
|
const formIndex = this.dialogForm.ticketUserDTOList.findIndex(
|
|
|
(item) => item.userName == deletedItem.userName
|
|
(item) => item.userName == deletedItem.userName
|
|
|
- );
|
|
|
|
|
|
|
+ )
|
|
|
if (formIndex !== -1) {
|
|
if (formIndex !== -1) {
|
|
|
- this.dialogForm.ticketUserDTOList.splice(formIndex, 1); // 从 form.ticketUserDTOList 中删除
|
|
|
|
|
|
|
+ this.dialogForm.ticketUserDTOList.splice(formIndex, 1) // 从 form.ticketUserDTOList 中删除
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 取消按钮
|
|
// 取消按钮
|
|
|
cancel() {
|
|
cancel() {
|
|
|
- this.open = false;
|
|
|
|
|
- this.FiveDetailvisible = false;
|
|
|
|
|
- this.EightDetailvisible = false;
|
|
|
|
|
|
|
+ this.open = false
|
|
|
|
|
+ this.FiveDetailvisible = false
|
|
|
|
|
+ this.EightDetailvisible = false
|
|
|
},
|
|
},
|
|
|
// 作业票结束
|
|
// 作业票结束
|
|
|
finshJobticket() {
|
|
finshJobticket() {
|
|
|
const data = {
|
|
const data = {
|
|
|
- ticketId: this.ticketId,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ ticketId: this.ticketId
|
|
|
|
|
+ }
|
|
|
updateJobToFinish(data).then((res) => {
|
|
updateJobToFinish(data).then((res) => {
|
|
|
- console.log(res, "结束作业票");
|
|
|
|
|
|
|
+ console.log(res, '结束作业票')
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
|
- this.$message.success("作业票结束");
|
|
|
|
|
- this.tabPosition = "first";
|
|
|
|
|
- this.getList();
|
|
|
|
|
|
|
+ this.$message.success('作业票结束')
|
|
|
|
|
+ this.tabPosition = 'first'
|
|
|
|
|
+ this.getList()
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
// 作业票取消
|
|
// 作业票取消
|
|
|
cancelJobticket() {
|
|
cancelJobticket() {
|
|
|
const data = {
|
|
const data = {
|
|
|
- ticketId: this.ticketId,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ ticketId: this.ticketId
|
|
|
|
|
+ }
|
|
|
updateJobToCancel(data).then((res) => {
|
|
updateJobToCancel(data).then((res) => {
|
|
|
- console.log(res, "取消作业票");
|
|
|
|
|
|
|
+ console.log(res, '取消作业票')
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
|
- this.$message.success("作业票取消");
|
|
|
|
|
- this.tabPosition = "first";
|
|
|
|
|
- this.getList();
|
|
|
|
|
|
|
+ this.$message.success('作业票取消')
|
|
|
|
|
+ this.tabPosition = 'first'
|
|
|
|
|
+ this.getList()
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
// 查看详情八大步骤
|
|
// 查看详情八大步骤
|
|
|
checkDetail(row) {
|
|
checkDetail(row) {
|
|
|
- if (row.stepIndex == "5") {
|
|
|
|
|
- this.FiveDetailvisible = true;
|
|
|
|
|
- let ticketId = this.ticketId;
|
|
|
|
|
|
|
+ if (row.stepIndex == '5') {
|
|
|
|
|
+ this.FiveDetailvisible = true
|
|
|
|
|
+ let ticketId = this.ticketId
|
|
|
getJobPlayTicketInfo(ticketId).then((res) => {
|
|
getJobPlayTicketInfo(ticketId).then((res) => {
|
|
|
- console.log(res, "作业执行详细信息");
|
|
|
|
|
|
|
+ console.log(res, '作业执行详细信息')
|
|
|
this.jobTicket = [res.data.jobTicket].map((item) => ({
|
|
this.jobTicket = [res.data.jobTicket].map((item) => ({
|
|
|
...item,
|
|
...item,
|
|
|
lockKeyName: res.data.lockKeyName,
|
|
lockKeyName: res.data.lockKeyName,
|
|
|
- colockKeyName: res.data.colockKeyName,
|
|
|
|
|
- }));
|
|
|
|
|
- this.lockUserList = res.data.lockUserList;
|
|
|
|
|
- this.colockUserList = res.data.colockUserList;
|
|
|
|
|
- this.ticketPointsList = res.data.ticketPointsList;
|
|
|
|
|
- });
|
|
|
|
|
- } else if (row.stepIndex == "8") {
|
|
|
|
|
- let ticketId = this.ticketId;
|
|
|
|
|
- this.EightDetailvisible = true;
|
|
|
|
|
|
|
+ colockKeyName: res.data.colockKeyName
|
|
|
|
|
+ }))
|
|
|
|
|
+ this.lockUserList = res.data.lockUserList
|
|
|
|
|
+ this.colockUserList = res.data.colockUserList
|
|
|
|
|
+ this.ticketPointsList = res.data.ticketPointsList
|
|
|
|
|
+ })
|
|
|
|
|
+ } else if (row.stepIndex == '8') {
|
|
|
|
|
+ let ticketId = this.ticketId
|
|
|
|
|
+ this.EightDetailvisible = true
|
|
|
getStepEight(ticketId).then((res) => {
|
|
getStepEight(ticketId).then((res) => {
|
|
|
- console.log(res, "第八步查看作业票数据");
|
|
|
|
|
- this.AffectedTickets = res.data;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.log(res, '第八步查看作业票数据')
|
|
|
|
|
+ this.AffectedTickets = res.data
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
-};
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|