|
|
@@ -5,54 +5,6 @@
|
|
|
<el-radio-button label="second">选择SOP</el-radio-button>
|
|
|
<el-radio-button label="third">作业详情</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
- <!-- <div
|
|
|
- style="
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- position: relative;
|
|
|
- "
|
|
|
- v-show="tabPosition == 'first'"
|
|
|
- >
|
|
|
- <img
|
|
|
- style="width: 1250px; height: 700px"
|
|
|
- src="@/assets/images/marsBg.png"
|
|
|
- alt=""
|
|
|
- />
|
|
|
- <img
|
|
|
- v-for="(ticket, index) in TicketListPage"
|
|
|
- :key="ticket.ticketId"
|
|
|
- :style="{
|
|
|
- width: '35px',
|
|
|
- cursor: 'pointer',
|
|
|
- height: '35px',
|
|
|
- position: 'absolute',
|
|
|
- top: '220px',
|
|
|
- left: `calc(700px + 40px * ${index})`,
|
|
|
- }"
|
|
|
- :src="require('@/assets/images/marsPoint.png')"
|
|
|
- alt=""
|
|
|
- @click="handleTicketClick(ticket)"
|
|
|
- />
|
|
|
- <img
|
|
|
- v-for="(ticket, index) in COCOTicketListPage"
|
|
|
- :key="ticket.ticketId"
|
|
|
- :style="{
|
|
|
- width: '35px',
|
|
|
- cursor: 'pointer',
|
|
|
- height: '35px',
|
|
|
- position: 'absolute',
|
|
|
- top: '440px',
|
|
|
- left: `calc(880px + 40px * ${index})`,
|
|
|
- }"
|
|
|
- :src="require('@/assets/images/marsPoint.png')"
|
|
|
- alt=""
|
|
|
- @click="handleTicketClick(ticket)"
|
|
|
- />
|
|
|
- <div class="deptXLG" @click="handelChange('second', 8, 'R&R')">R&R</div>
|
|
|
- <div class="deptCCO" @click="handelChange('second', 7, 'CCO')">CCO</div>
|
|
|
- </div> -->
|
|
|
-
|
|
|
<div
|
|
|
style="
|
|
|
display: flex;
|
|
|
@@ -131,7 +83,7 @@
|
|
|
:data="marsSopPage"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
|
<el-table-column
|
|
|
label="设备/工艺名称"
|
|
|
align="center"
|
|
|
@@ -163,7 +115,8 @@
|
|
|
type="primary"
|
|
|
style="margin-left: 140px"
|
|
|
@click="handelChange('third')"
|
|
|
- >开始执行</el-button
|
|
|
+ >开始执行
|
|
|
+ </el-button
|
|
|
>
|
|
|
</div>
|
|
|
<div
|
|
|
@@ -179,7 +132,7 @@
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span>工艺/设备 工艺图</span>
|
|
|
</div>
|
|
|
- <img style="margin-left: 25%" :src="this.machineryImg" alt="" />
|
|
|
+ <img style="margin-left: 25%" :src="this.machineryImg" alt=""/>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
<div class="left-bottom">
|
|
|
@@ -244,25 +197,27 @@
|
|
|
</span>
|
|
|
<span v-if="scope.row.conflictJobNum !== null">
|
|
|
<i class="el-icon-s-claim">{{
|
|
|
- scope.row.conflictJobNum
|
|
|
- }}</i>
|
|
|
+ scope.row.conflictJobNum
|
|
|
+ }}</i>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" prop="stepStatus">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.stepStatus !== '1'">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- size="small"
|
|
|
- @click="addInside(scope.row)"
|
|
|
- >{{
|
|
|
- scope.row.stepIndex == "3" ? "分配" : "执行"
|
|
|
- }}</el-button
|
|
|
- >
|
|
|
+ <!-- 判断逻辑 -->
|
|
|
+ <span
|
|
|
+ v-if="scope.row.stepIndex == '3' && (scope.row.stepStatus !== '1' || !isStepFourExecuted)"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ size="small"
|
|
|
+ @click="addInside(scope.row)"
|
|
|
+ >
|
|
|
+ 分配
|
|
|
+ </el-button>
|
|
|
</span>
|
|
|
- <span v-if="scope.row.stepStatus == '1'">
|
|
|
+ <span v-if="scope.row.stepIndex == '3' && scope.row.stepStatus === '1' && isStepFourExecuted">
|
|
|
<span
|
|
|
style="
|
|
|
display: inline-block;
|
|
|
@@ -274,9 +229,35 @@
|
|
|
"
|
|
|
></span>
|
|
|
<span>已执行</span>
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <!-- 其他步骤 -->
|
|
|
+ <span v-if="scope.row.stepIndex != '3' && scope.row.stepStatus !== '1'">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ size="small"
|
|
|
+ @click="addInside(scope.row)"
|
|
|
+ >
|
|
|
+ 执行
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
+ <span v-if="scope.row.stepIndex != '3' && scope.row.stepStatus === '1'">
|
|
|
+ <span
|
|
|
+ style="
|
|
|
+ display: inline-block;
|
|
|
+ width: 8px;
|
|
|
+ height: 8px;
|
|
|
+ margin: 1%;
|
|
|
+ border-radius: 50%;
|
|
|
+ background: #6aabfb;
|
|
|
+ "
|
|
|
+ ></span>
|
|
|
+ <span>已执行</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+
|
|
|
<el-table-column
|
|
|
label="内容"
|
|
|
prop="stepContent"
|
|
|
@@ -295,7 +276,7 @@
|
|
|
type="text"
|
|
|
size="small"
|
|
|
@click="checkDetail(scope.row)"
|
|
|
- >查看</el-button
|
|
|
+ >查看</el-button
|
|
|
>
|
|
|
</span>
|
|
|
</template>
|
|
|
@@ -306,13 +287,15 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-button style="float: right" type="primary" @click="finshJobticket"
|
|
|
- >结束作业</el-button
|
|
|
+ >结束作业
|
|
|
+ </el-button
|
|
|
>
|
|
|
<el-button
|
|
|
style="float: right; margin-right: 10px"
|
|
|
type="danger"
|
|
|
@click="cancelJobticket"
|
|
|
- >取消作业</el-button
|
|
|
+ >取消作业
|
|
|
+ </el-button
|
|
|
>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
@@ -332,6 +315,7 @@
|
|
|
clearable
|
|
|
style="width: 230px"
|
|
|
@change="handlelockerChage"
|
|
|
+ @clear="handlelockerClear"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="dict in this.listLockerOption"
|
|
|
@@ -350,14 +334,16 @@
|
|
|
<el-table
|
|
|
:data="insideTableData"
|
|
|
stripe
|
|
|
+ ref="insideTable"
|
|
|
height="400"
|
|
|
@selection-change="InSelectionChange"
|
|
|
:header-cell-style="{
|
|
|
'background-color': '#afccfd',
|
|
|
color: 'white',
|
|
|
}"
|
|
|
+
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
|
<el-table-column prop="userId" label="内部人员Id">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="nickName" label="姓名">
|
|
|
@@ -372,6 +358,7 @@
|
|
|
<el-table
|
|
|
:data="outsideTableData"
|
|
|
stripe
|
|
|
+ ref="outsideTable"
|
|
|
height="400"
|
|
|
@selection-change="OutSelectionChange"
|
|
|
:header-cell-style="{
|
|
|
@@ -379,7 +366,7 @@
|
|
|
color: 'white',
|
|
|
}"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
|
<el-table-column prop="userId" label="外部人员Id">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="nickName" label="姓名">
|
|
|
@@ -403,8 +390,8 @@
|
|
|
<el-table-column prop="userType" label="来源">
|
|
|
<template slot-scope="scope">
|
|
|
<span style="color: #2a87ff">{{
|
|
|
- scope.row.userType == "0" ? "内部" : "外部"
|
|
|
- }}</span>
|
|
|
+ scope.row.userType == '0' ? '内部' : '外部'
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="80">
|
|
|
@@ -427,7 +414,8 @@
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button v-no-more-click type="primary" @click="confirmAddUser"
|
|
|
- >确认</el-button
|
|
|
+ >确认
|
|
|
+ </el-button
|
|
|
>
|
|
|
<el-button v-no-more-click @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
@@ -496,13 +484,13 @@
|
|
|
<span
|
|
|
v-else-if="scope.row.jobStatus == 4"
|
|
|
style="font-size: 20px; line-height: 30px"
|
|
|
- >🔒</span
|
|
|
+ >🔒</span
|
|
|
>
|
|
|
<!-- 显示对号 -->
|
|
|
<span
|
|
|
v-else-if="scope.row.jobStatus == 5"
|
|
|
style="font-size: 20px; line-height: 30px"
|
|
|
- >✓</span
|
|
|
+ >✓</span
|
|
|
>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -536,13 +524,13 @@
|
|
|
<span
|
|
|
v-else-if="scope.row.jobStatus == 4"
|
|
|
style="font-size: 20px; line-height: 30px"
|
|
|
- >🔒</span
|
|
|
+ >🔒</span
|
|
|
>
|
|
|
<!-- 显示对号 -->
|
|
|
<span
|
|
|
v-else-if="scope.row.jobStatus == 5"
|
|
|
style="font-size: 20px; line-height: 30px"
|
|
|
- >✓</span
|
|
|
+ >✓</span
|
|
|
>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -576,13 +564,13 @@
|
|
|
<span
|
|
|
v-else-if="scope.row.pointStatus == 1"
|
|
|
style="font-size: 20px; line-height: 30px"
|
|
|
- >🔒</span
|
|
|
+ >🔒</span
|
|
|
>
|
|
|
<!-- 显示对号 -->
|
|
|
<span
|
|
|
v-else-if="scope.row.pointStatus == 2"
|
|
|
style="font-size: 20px; line-height: 30px"
|
|
|
- >✓</span
|
|
|
+ >✓</span
|
|
|
>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -605,10 +593,10 @@
|
|
|
</template>
|
|
|
|
|
|
<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 {
|
|
|
addJobTicket,
|
|
|
addJobUsers,
|
|
|
@@ -619,23 +607,23 @@ import {
|
|
|
listJobTicket,
|
|
|
updateJobStep,
|
|
|
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";
|
|
|
+ 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'
|
|
|
|
|
|
export default {
|
|
|
- name: "NewSop",
|
|
|
+ name: 'NewSop',
|
|
|
components: { Template, MapData },
|
|
|
- dicts: ["sop_type", "ticket_status"],
|
|
|
+ dicts: ['sop_type', 'ticket_status'],
|
|
|
data() {
|
|
|
return {
|
|
|
- tabPosition: "first",
|
|
|
- selectedOption: "",
|
|
|
+ tabPosition: 'first',
|
|
|
+ selectedOption: '',
|
|
|
marsSopPage: [], //岗位对应sop列表
|
|
|
- marsSopTitle: "", //岗位后 对应展示sop
|
|
|
+ marsSopTitle: '', //岗位后 对应展示sop
|
|
|
marsDeptList: [],
|
|
|
listLockerOption: [], //上锁人下拉数据
|
|
|
form: null, //存储选中的设备工艺sop列表数据
|
|
|
@@ -649,11 +637,11 @@ export default {
|
|
|
insideTableData: [], //内部人员表格
|
|
|
AllUserTable: [], //所有选中人员列表
|
|
|
dialogForm: {
|
|
|
- nickName: "",
|
|
|
- username: "",
|
|
|
+ nickName: '',
|
|
|
+ username: ''
|
|
|
},
|
|
|
// 弹出层标题
|
|
|
- title: "",
|
|
|
+ title: '',
|
|
|
// 弹框中显示的form表单内容
|
|
|
newticketUserDTOList: [], //为了上锁人单独传递数据
|
|
|
FiveDetailvisible: false, //第五步详情弹窗
|
|
|
@@ -664,176 +652,221 @@ export default {
|
|
|
TicketListPage: [], //作业票列表page接口传递的数据 底图循环渲染图标 RR岗位作业票
|
|
|
selectPointList: [], //隔离点选中的表格渲染
|
|
|
COCOTicketListPage: [], //CCO岗位的作业票
|
|
|
- scaleFactor: 1, // 缩放比例,初始值为1
|
|
|
- };
|
|
|
+ scaleFactor: 1 // 缩放比例,初始值为1
|
|
|
+ }
|
|
|
},
|
|
|
computed: {
|
|
|
filteredSopTypes() {
|
|
|
const sopTypesInMarsSopPage = this.marsSopPage.map(
|
|
|
(item) => item.sopType
|
|
|
- );
|
|
|
+ )
|
|
|
return this.dict.type.sop_type.filter((option) =>
|
|
|
sopTypesInMarsSopPage.includes(option.value)
|
|
|
- );
|
|
|
+ )
|
|
|
+ },
|
|
|
+ isStepFourExecuted() {
|
|
|
+ const stepFour = this.EightStepForm.find((step) => step.stepIndex == "4");
|
|
|
+ return stepFour && stepFour.stepStatus === '1';
|
|
|
},
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
- this.getList();
|
|
|
+ this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
handleTicketClick(data) {
|
|
|
- console.log(data, "查看作业票详情");
|
|
|
- this.ticketId = data.ticketId;
|
|
|
- this.tabPosition = "third";
|
|
|
+ console.log(data, '查看作业票详情')
|
|
|
+ this.ticketId = data.ticketId
|
|
|
+ this.tabPosition = 'third'
|
|
|
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) => {
|
|
|
- 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) => {
|
|
|
- console.log(response, "电柜信息--NewMarsJob");
|
|
|
+ console.log(response, '电柜信息--NewMarsJob')
|
|
|
this.selectPointList = response.data.filter((item) =>
|
|
|
selectPointsIds.includes(item.pointId)
|
|
|
- );
|
|
|
- console.log(this.selectPointList, "拿到的选中隔离点数据");
|
|
|
- });
|
|
|
- });
|
|
|
+ )
|
|
|
+ console.log(this.selectPointList, '拿到的选中隔离点数据')
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
getList() {
|
|
|
const data = {
|
|
|
pages: 1,
|
|
|
- size: -1,
|
|
|
- };
|
|
|
+ size: -1
|
|
|
+ }
|
|
|
getWorkstationTicketList(data).then((res) => {
|
|
|
- console.log(res, "查看-正在进行中作业票列表");
|
|
|
+ console.log(res, '查看-正在进行中作业票列表')
|
|
|
this.TicketListPage = res.data.filter(
|
|
|
- (item) => item.workstationId == "8"
|
|
|
- );
|
|
|
+ (item) => item.workstationId == '8'
|
|
|
+ )
|
|
|
this.COCOTicketListPage = res.data.filter(
|
|
|
- (item) => item.workstationId == "7"
|
|
|
- );
|
|
|
- });
|
|
|
+ (item) => item.workstationId == '7'
|
|
|
+ )
|
|
|
+ })
|
|
|
listTechnology(data).then((res) => {
|
|
|
- console.log(res, "technologyList");
|
|
|
- this.technologyList = res.data.records;
|
|
|
- });
|
|
|
+ console.log(res, 'technologyList')
|
|
|
+ this.technologyList = res.data.records
|
|
|
+ })
|
|
|
listMarsDept(data).then((res) => {
|
|
|
- console.log(res, "marsDeptList");
|
|
|
- this.marsDeptList = res.data.records;
|
|
|
- });
|
|
|
+ console.log(res, 'marsDeptList')
|
|
|
+ this.marsDeptList = res.data.records
|
|
|
+ })
|
|
|
const query = {
|
|
|
pageSize: 10000,
|
|
|
- pageNum: 1,
|
|
|
- };
|
|
|
+ pageNum: 1
|
|
|
+ }
|
|
|
getUserList(query).then((res) => {
|
|
|
- console.log(res, "userList");
|
|
|
+ console.log(res, 'userList')
|
|
|
this.listLockerOption = res.rows
|
|
|
.filter((item) => item.unitId == 9)
|
|
|
.map((item) => ({
|
|
|
label: item.nickName,
|
|
|
- value: item.userId,
|
|
|
- }));
|
|
|
- });
|
|
|
+ value: item.userId
|
|
|
+ }))
|
|
|
+ })
|
|
|
},
|
|
|
// 作业票切换
|
|
|
handelChange(val, workstationId, workstationName) {
|
|
|
- console.log(val);
|
|
|
- this.tabPosition = val;
|
|
|
- this.marsSopTitle = workstationName;
|
|
|
+ console.log(val)
|
|
|
+ this.tabPosition = val
|
|
|
+ this.marsSopTitle = workstationName
|
|
|
if (workstationId) {
|
|
|
const data = {
|
|
|
pages: 1,
|
|
|
size: -1,
|
|
|
- workstationId: workstationId,
|
|
|
- };
|
|
|
+ workstationId: workstationId
|
|
|
+ }
|
|
|
getIsMarsSopPage(data).then((res) => {
|
|
|
- console.log(res, "SopPage");
|
|
|
- this.marsSopPage = res.data.records;
|
|
|
- });
|
|
|
+ console.log(res, 'SopPage')
|
|
|
+ this.marsSopPage = res.data.records
|
|
|
+ })
|
|
|
}
|
|
|
- if (val == "third") {
|
|
|
+ if (val == 'third') {
|
|
|
const data = {
|
|
|
- sopId: this.form[0].sopId,
|
|
|
- };
|
|
|
+ sopId: this.form[0].sopId
|
|
|
+ }
|
|
|
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) => {
|
|
|
- this.EightStepForm = res.data;
|
|
|
- console.log(res, "作业票-详细信息");
|
|
|
- });
|
|
|
- });
|
|
|
+ this.EightStepForm = res.data
|
|
|
+ console.log(res, '作业票-详细信息')
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- console.log(selection, "mars设备工艺表格多选拿到的数据");
|
|
|
- this.form = selection;
|
|
|
- this.machineryId = selection[0].machineryId;
|
|
|
+ console.log(selection, 'mars设备工艺表格多选拿到的数据')
|
|
|
+ this.form = selection
|
|
|
+ this.machineryId = selection[0].machineryId
|
|
|
getTechnologyInfo(selection[0].machineryId).then((res) => {
|
|
|
- this.machineryImg = res.data.machineryImg;
|
|
|
- });
|
|
|
+ this.machineryImg = res.data.machineryImg
|
|
|
+ })
|
|
|
},
|
|
|
// 添加内部人员
|
|
|
addInside(row) {
|
|
|
- if (row.stepIndex == "3") {
|
|
|
- this.open = true;
|
|
|
+ if (row.stepIndex == '3') {
|
|
|
+ this.open = true
|
|
|
const query = {
|
|
|
pageSize: 10000,
|
|
|
- pageNum: 1,
|
|
|
- };
|
|
|
+ pageNum: 1
|
|
|
+ }
|
|
|
getUserList(query).then((res) => {
|
|
|
- this.insideTableData = res.rows.filter((item) => item.unitId == 9);
|
|
|
- this.outsideTableData = res.rows.filter((item) => item.unitId != "9");
|
|
|
- console.log(this.insideTableData, this.outsideTableData, "用户");
|
|
|
- });
|
|
|
+ this.insideTableData = res.rows.filter((item) => item.unitId == 9)
|
|
|
+ this.outsideTableData = res.rows.filter((item) => item.unitId != '9')
|
|
|
+ console.log(this.insideTableData, this.outsideTableData, '用户')
|
|
|
+ // 获取已分配人员数据
|
|
|
+ getJobTicketInfo(this.ticketId).then((res) => {
|
|
|
+ const assignedUsers = res.data.jobTicketUserList || [];
|
|
|
+ console.log(assignedUsers, '已分配人员');
|
|
|
+ this.dialogForm.locker = assignedUsers
|
|
|
+ .filter(item => item.userRole == 'jtlocker')
|
|
|
+ .map(item => item.userName);
|
|
|
+ console.log(this.dialogForm.locker,'上锁人回显数据')
|
|
|
+ // 更新内部和外部用户的选中状态
|
|
|
+ this.$nextTick(() => {
|
|
|
+ // 手动选中内部人员
|
|
|
+ this.insideTableData.forEach((user) => {
|
|
|
+ const isAssigned = assignedUsers.some(
|
|
|
+ (assigned) =>
|
|
|
+ assigned.userId == user.userId && assigned.userType == '0'&&assigned.userRole!=='jtlocker'
|
|
|
+ );
|
|
|
+ if (isAssigned) {
|
|
|
+ this.$refs.insideTable.toggleRowSelection(user, true);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 手动选中外部人员
|
|
|
+ this.outsideTableData.forEach((user) => {
|
|
|
+ const isAssigned = assignedUsers.some(
|
|
|
+ (assigned) =>
|
|
|
+ assigned.userId == user.userId && assigned.userType == '1'&&assigned.userRole!=='jtlocker'
|
|
|
+ );
|
|
|
+ if (isAssigned) {
|
|
|
+ this.$refs.outsideTable.toggleRowSelection(user, true);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
} else {
|
|
|
+
|
|
|
const data = {
|
|
|
stepId: row.stepId,
|
|
|
- stepStatus: "1",
|
|
|
- };
|
|
|
+ stepStatus: '1'
|
|
|
+ }
|
|
|
updateJobStep(data).then((res) => {
|
|
|
- this.$message.success("执行成功");
|
|
|
+ this.$message.success('执行成功')
|
|
|
getStepInfo(this.ticketId).then((res) => {
|
|
|
- this.EightStepForm = res.data;
|
|
|
- console.log(res, "作业票-详细信息");
|
|
|
- });
|
|
|
- });
|
|
|
+ this.EightStepForm = res.data
|
|
|
+ console.log(res, '作业票-详细信息')
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 上锁人下拉选择change事件
|
|
|
handlelockerChage(val) {
|
|
|
- console.log(val, "上锁人chage");
|
|
|
- const user = this.listLockerOption.find((item) => item.value == val);
|
|
|
+ console.log(val, '上锁人chage')
|
|
|
+ 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(
|
|
|
(u) => u.userName === user.label
|
|
|
- );
|
|
|
+ )
|
|
|
if (!existingUser) {
|
|
|
this.newticketUserDTOList.push({
|
|
|
userName: user.label,
|
|
|
userId: user.value,
|
|
|
userType: 0,
|
|
|
- userRole: "jtlocker",
|
|
|
- });
|
|
|
+ userRole: 'jtlocker'
|
|
|
+ })
|
|
|
|
|
|
- console.log(this.newticketUserDTOList, "用户");
|
|
|
+ console.log(this.newticketUserDTOList, '用户')
|
|
|
} else {
|
|
|
// console.log('用户已存在', user.label)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ handlelockerClear(){
|
|
|
+ this.newticketUserDTOList = []
|
|
|
+ console.log(this.newticketUserDTOList, '清除后的用户');
|
|
|
+ },
|
|
|
InSelectionChange(selection) {
|
|
|
selection.forEach((item) => {
|
|
|
if (!this.AllUserTable.some((user) => user.userId === item.userId)) {
|
|
|
@@ -841,11 +874,11 @@ export default {
|
|
|
userName: item.nickName,
|
|
|
userId: item.userId,
|
|
|
userType: 0,
|
|
|
- userRole: "jtcolocker",
|
|
|
- });
|
|
|
+ userRole: 'jtcolocker'
|
|
|
+ })
|
|
|
}
|
|
|
- });
|
|
|
- console.log(this.AllUserTable, "内部人员");
|
|
|
+ })
|
|
|
+ console.log(this.AllUserTable, '内部人员')
|
|
|
},
|
|
|
|
|
|
OutSelectionChange(selection) {
|
|
|
@@ -855,103 +888,103 @@ export default {
|
|
|
userName: item.nickName,
|
|
|
userId: item.userId,
|
|
|
userType: 1,
|
|
|
- userRole: "jtcolocker",
|
|
|
- });
|
|
|
+ userRole: 'jtcolocker'
|
|
|
+ })
|
|
|
}
|
|
|
- });
|
|
|
- console.log(this.AllUserTable, "外部人员");
|
|
|
+ })
|
|
|
+ console.log(this.AllUserTable, '外部人员')
|
|
|
},
|
|
|
confirmAddUser() {
|
|
|
const data = {
|
|
|
ticketId: this.ticketId,
|
|
|
- ticketUserDTOList: [...this.AllUserTable, ...this.newticketUserDTOList],
|
|
|
- };
|
|
|
- console.log(data, "添加人员");
|
|
|
+ ticketUserDTOList: [...this.AllUserTable, ...this.newticketUserDTOList]
|
|
|
+ }
|
|
|
+ console.log(data, '添加人员')
|
|
|
addJobUsers(data).then((res) => {
|
|
|
- console.log(res, "添加人员");
|
|
|
+ console.log(res, '添加人员')
|
|
|
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) => {
|
|
|
- this.EightStepForm = res.data;
|
|
|
- console.log(res, "作业票-详细信息");
|
|
|
- });
|
|
|
+ this.EightStepForm = res.data
|
|
|
+ console.log(res, '作业票-详细信息')
|
|
|
+ })
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
// 人员列表删除
|
|
|
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(
|
|
|
(item) => item.userName == deletedItem.userName
|
|
|
- );
|
|
|
+ )
|
|
|
if (formIndex !== -1) {
|
|
|
- this.dialogForm.ticketUserDTOList.splice(formIndex, 1); // 从 form.ticketUserDTOList 中删除
|
|
|
+ this.dialogForm.ticketUserDTOList.splice(formIndex, 1) // 从 form.ticketUserDTOList 中删除
|
|
|
}
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
- this.open = false;
|
|
|
- this.FiveDetailvisible = false;
|
|
|
+ this.open = false
|
|
|
+ this.FiveDetailvisible = false
|
|
|
},
|
|
|
// 作业票结束
|
|
|
finshJobticket() {
|
|
|
const data = {
|
|
|
- ticketId: this.ticketId,
|
|
|
- };
|
|
|
+ ticketId: this.ticketId
|
|
|
+ }
|
|
|
updateJobToFinish(data).then((res) => {
|
|
|
- console.log(res, "结束作业票");
|
|
|
+ console.log(res, '结束作业票')
|
|
|
if (res.data) {
|
|
|
- this.$message.success("作业票结束");
|
|
|
- this.tabPosition = "first";
|
|
|
- this.getList();
|
|
|
+ this.$message.success('作业票结束')
|
|
|
+ this.tabPosition = 'first'
|
|
|
+ this.getList()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
// 作业票取消
|
|
|
cancelJobticket() {
|
|
|
const data = {
|
|
|
- ticketId: this.ticketId,
|
|
|
- };
|
|
|
+ ticketId: this.ticketId
|
|
|
+ }
|
|
|
updateJobToCancel(data).then((res) => {
|
|
|
- console.log(res, "取消作业票");
|
|
|
+ console.log(res, '取消作业票')
|
|
|
if (res.data) {
|
|
|
- this.$message.success("作业票取消");
|
|
|
- this.tabPosition = "first";
|
|
|
- this.getList();
|
|
|
+ this.$message.success('作业票取消')
|
|
|
+ this.tabPosition = 'first'
|
|
|
+ this.getList()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
// 查看详情八大步骤
|
|
|
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) => {
|
|
|
- console.log(res, "作业执行详细信息");
|
|
|
+ console.log(res, '作业执行详细信息')
|
|
|
this.jobTicket = [res.data.jobTicket].map((item) => ({
|
|
|
...item,
|
|
|
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;
|
|
|
+ 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
|
|
|
getStepEight(ticketId).then((res) => {
|
|
|
- console.log(res, "第八步查看作业票数据");
|
|
|
- });
|
|
|
+ console.log(res, '第八步查看作业票数据')
|
|
|
+ })
|
|
|
}
|
|
|
- },
|
|
|
- },
|
|
|
-};
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
|
|
|
@@ -1042,6 +1075,7 @@ export default {
|
|
|
background-color: #a1a3a9;
|
|
|
border-radius: 6px;
|
|
|
}
|
|
|
+
|
|
|
div[ref="mapContainer"] {
|
|
|
transition: transform 0.2s ease;
|
|
|
}
|