|
|
@@ -338,21 +338,32 @@
|
|
|
height="400"
|
|
|
@selection-change="InSelectionChange"
|
|
|
:header-cell-style="{
|
|
|
- 'background-color': '#afccfd',
|
|
|
- color: 'white',
|
|
|
- }"
|
|
|
-
|
|
|
+ 'background-color': '#afccfd',
|
|
|
+ color: 'white',
|
|
|
+ }"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55" align="center"/>
|
|
|
- <el-table-column prop="userId" label="内部人员Id">
|
|
|
- </el-table-column>
|
|
|
+ <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="姓名">
|
|
|
<template slot-scope="scope">
|
|
|
<span style="color: #2a87ff">{{ scope.row.nickName }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <!-- 添加搜索条件的列 -->
|
|
|
+ <el-table-column label="搜索">
|
|
|
+ <template slot="header">
|
|
|
+ <el-input
|
|
|
+ placeholder="搜索姓名"
|
|
|
+ v-model="insideSearchQuery"
|
|
|
+ size="small"
|
|
|
+ @input="filterInsideTable"
|
|
|
+ style="width: 90px;"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col :span="7">
|
|
|
<h3>外部共锁人列表</h3>
|
|
|
<el-table
|
|
|
@@ -362,20 +373,32 @@
|
|
|
height="400"
|
|
|
@selection-change="OutSelectionChange"
|
|
|
:header-cell-style="{
|
|
|
- 'background-color': '#fc3d49',
|
|
|
- color: 'white',
|
|
|
- }"
|
|
|
+ 'background-color': '#fc3d49',
|
|
|
+ color: 'white',
|
|
|
+ }"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55" align="center"/>
|
|
|
- <el-table-column prop="userId" label="外部人员Id">
|
|
|
- </el-table-column>
|
|
|
+ <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="姓名">
|
|
|
<template slot-scope="scope">
|
|
|
<span style="color: #2a87ff">{{ scope.row.nickName }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <!-- 添加搜索条件的列 -->
|
|
|
+ <el-table-column label="搜索">
|
|
|
+ <template slot="header">
|
|
|
+ <el-input
|
|
|
+ placeholder="搜索姓名"
|
|
|
+ v-model="outsideSearchQuery"
|
|
|
+ size="small"
|
|
|
+ @input="filterOutsideTable"
|
|
|
+ style="width: 90px;"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col :span="7">
|
|
|
<h3>选中人员列表</h3>
|
|
|
<el-table :data="AllUserTable" stripe height="400">
|
|
|
@@ -589,6 +612,40 @@
|
|
|
<el-button v-no-more-click @click="cancel">关 闭</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+<!-- 第八步查看影响作业票-->
|
|
|
+ <el-dialog :visible.sync="EightDetailvisible" title="受影响作业票" width="650px" append-to-body>
|
|
|
+
|
|
|
+ <el-table :data="AffectedTickets">
|
|
|
+ <el-table-column label="作业票编号" prop="ticketId" >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="作业票名称" prop="ticketName" width="220" >
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="作业票状态" prop="ticketStatus">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag
|
|
|
+ :options="dict.type.ticket_status"
|
|
|
+ :value="scope.row.ticketStatus"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="作业票类型"
|
|
|
+ prop="ticketType"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag
|
|
|
+ :options="dict.type.sop_type"
|
|
|
+ :value="scope.row.ticketType"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button v-no-more-click @click="cancel">关 闭</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -635,6 +692,12 @@ export default {
|
|
|
openColocker: false, //添加内外部人员
|
|
|
outsideTableData: [], //外部人员表格
|
|
|
insideTableData: [], //内部人员表格
|
|
|
+ insideTableDataOrign:[],//内部原始数据
|
|
|
+ outsideTableDataOrign:[],//外部原始数据
|
|
|
+ selectedInsideRows: [], // 存储选中的内部人员的 userId
|
|
|
+ selectedOutsideRows: [], // 存储选中的外部人员的 userId
|
|
|
+ insideSearchQuery: '', // 内部搜索条件
|
|
|
+ outsideSearchQuery: '', // 外部搜索条件
|
|
|
AllUserTable: [], //所有选中人员列表
|
|
|
dialogForm: {
|
|
|
nickName: '',
|
|
|
@@ -652,7 +715,9 @@ export default {
|
|
|
TicketListPage: [], //作业票列表page接口传递的数据 底图循环渲染图标 RR岗位作业票
|
|
|
selectPointList: [], //隔离点选中的表格渲染
|
|
|
COCOTicketListPage: [], //CCO岗位的作业票
|
|
|
- scaleFactor: 1 // 缩放比例,初始值为1
|
|
|
+ scaleFactor: 1, // 缩放比例,初始值为1
|
|
|
+ EightDetailvisible: false,//第八步受影响作业票
|
|
|
+ AffectedTickets:[],//第八步查看详情信息表格
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -674,6 +739,76 @@ export default {
|
|
|
this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ filterInsideTable() {
|
|
|
+ const query = this.insideSearchQuery.trim().toLowerCase();
|
|
|
+ const filteredData = this.insideTableDataOrign.filter(item =>
|
|
|
+ item.nickName.toLowerCase().includes(query)
|
|
|
+ );
|
|
|
+ this.insideTableData = filteredData;
|
|
|
+
|
|
|
+ // 如果输入框为空或null,回显选中状态
|
|
|
+ if (!this.insideSearchQuery) {
|
|
|
+ // 筛选完毕后,勾选 AllUserTable 中有的用户
|
|
|
+ this.insideTableData.forEach(user => {
|
|
|
+
|
|
|
+ const matchingUser = this.AllUserTable.find(u =>
|
|
|
+ u.userId == user.userId
|
|
|
+ );
|
|
|
+
|
|
|
+ console.log('Matching User:', matchingUser); // 输出匹配结果
|
|
|
+ if (matchingUser) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ console.log(`Selecting user: ${user.nickName}`);
|
|
|
+ this.$refs.insideTable.toggleRowSelection(user, true);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ console.log(`Deselecting user: ${user.nickName}`);
|
|
|
+ this.$refs.insideTable.toggleRowSelection(user, false);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// 外部人员搜索
|
|
|
+ filterOutsideTable() {
|
|
|
+ const query = this.outsideSearchQuery.trim().toLowerCase();
|
|
|
+ const filteredData = this.outsideTableDataOrign.filter(item =>
|
|
|
+ item.nickName.toLowerCase().includes(query)
|
|
|
+ );
|
|
|
+ this.outsideTableData = filteredData;
|
|
|
+
|
|
|
+ // 如果输入框为空或null,回显选中状态
|
|
|
+ if (!this.outsideSearchQuery) {
|
|
|
+ // 筛选完毕后,勾选 AllUserTable 中有的用户
|
|
|
+ this.outsideTableData.forEach(user => {
|
|
|
+
|
|
|
+ const matchingUser = this.AllUserTable.find(u =>
|
|
|
+ u.userId == user.userId
|
|
|
+ );
|
|
|
+
|
|
|
+ console.log('Matching User:', matchingUser); // 输出匹配结果
|
|
|
+ if (matchingUser) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ console.log(`Selecting user: ${user.nickName}`);
|
|
|
+ this.$refs.outsideTable.toggleRowSelection(user, true);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ console.log(`Deselecting user: ${user.nickName}`);
|
|
|
+ this.$refs.outsideTable.toggleRowSelection(user, false);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
handleTicketClick(data) {
|
|
|
console.log(data, '查看作业票详情')
|
|
|
this.ticketId = data.ticketId
|
|
|
@@ -787,6 +922,7 @@ export default {
|
|
|
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 || [];
|
|
|
@@ -795,6 +931,7 @@ export default {
|
|
|
.filter(item => item.userRole == 'jtlocker')
|
|
|
.map(item => item.userName);
|
|
|
console.log(this.dialogForm.locker,'上锁人回显数据')
|
|
|
+
|
|
|
// 更新内部和外部用户的选中状态
|
|
|
this.$nextTick(() => {
|
|
|
// 手动选中内部人员
|
|
|
@@ -805,6 +942,7 @@ export default {
|
|
|
);
|
|
|
if (isAssigned) {
|
|
|
this.$refs.insideTable.toggleRowSelection(user, true);
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -816,8 +954,11 @@ export default {
|
|
|
);
|
|
|
if (isAssigned) {
|
|
|
this.$refs.outsideTable.toggleRowSelection(user, true);
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
+ this.insideTableDataOrign = [...this.insideTableData];
|
|
|
+ this.outsideTableDataOrign = [...this.outsideTableData];
|
|
|
});
|
|
|
});
|
|
|
|
|
|
@@ -931,6 +1072,7 @@ export default {
|
|
|
cancel() {
|
|
|
this.open = false
|
|
|
this.FiveDetailvisible = false
|
|
|
+ this.EightDetailvisible=false
|
|
|
},
|
|
|
// 作业票结束
|
|
|
finshJobticket() {
|
|
|
@@ -978,8 +1120,10 @@ export default {
|
|
|
})
|
|
|
} else if (row.stepIndex == '8') {
|
|
|
let ticketId = this.ticketId
|
|
|
+ this.EightDetailvisible=true
|
|
|
getStepEight(ticketId).then((res) => {
|
|
|
console.log(res, '第八步查看作业票数据')
|
|
|
+ this.AffectedTickets=res.data
|
|
|
})
|
|
|
}
|
|
|
}
|