|
@@ -24,7 +24,7 @@
|
|
|
<span
|
|
<span
|
|
|
style="float: right; padding: 1px 0; font-size: 22px"
|
|
style="float: right; padding: 1px 0; font-size: 22px"
|
|
|
type="text"
|
|
type="text"
|
|
|
- >×</span
|
|
|
|
|
|
|
+ >×</span
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="text item">
|
|
<div class="text item">
|
|
@@ -90,7 +90,8 @@
|
|
|
type="primary"
|
|
type="primary"
|
|
|
class="workTicket_btn"
|
|
class="workTicket_btn"
|
|
|
@click="nextStep('second')"
|
|
@click="nextStep('second')"
|
|
|
- >下一步</el-button
|
|
|
|
|
|
|
+ >下一步
|
|
|
|
|
+ </el-button
|
|
|
>
|
|
>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -125,8 +126,8 @@
|
|
|
<el-table-column prop="pointName" label="已选隔离点">
|
|
<el-table-column prop="pointName" label="已选隔离点">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span style="color: #2a87ff">{{
|
|
<span style="color: #2a87ff">{{
|
|
|
- scope.row.pointName
|
|
|
|
|
- }}</span>
|
|
|
|
|
|
|
+ scope.row.pointName
|
|
|
|
|
+ }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="pointType" label="隔离点类型">
|
|
<el-table-column prop="pointType" label="隔离点类型">
|
|
@@ -156,7 +157,8 @@
|
|
|
style="float: right; height: 30px; line-height: 10px"
|
|
style="float: right; height: 30px; line-height: 10px"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
@click="nextStep('third')"
|
|
@click="nextStep('third')"
|
|
|
- >下一步</el-button
|
|
|
|
|
|
|
+ >下一步
|
|
|
|
|
+ </el-button
|
|
|
>
|
|
>
|
|
|
<el-button
|
|
<el-button
|
|
|
plain
|
|
plain
|
|
@@ -168,7 +170,8 @@
|
|
|
"
|
|
"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
@click="previousStep('first')"
|
|
@click="previousStep('first')"
|
|
|
- >上一步</el-button
|
|
|
|
|
|
|
+ >上一步
|
|
|
|
|
+ </el-button
|
|
|
>
|
|
>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -184,7 +187,7 @@
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="dict in this.hardwareTypeOption"
|
|
|
|
|
|
|
+ v-for="dict in this.listUserOption"
|
|
|
:key="dict.value"
|
|
:key="dict.value"
|
|
|
:label="dict.label"
|
|
:label="dict.label"
|
|
|
:value="dict.value"
|
|
:value="dict.value"
|
|
@@ -192,14 +195,17 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="共锁人" prop="coLocker">
|
|
<el-form-item label="共锁人" prop="coLocker">
|
|
|
|
|
+
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="form.coLocker"
|
|
v-model="form.coLocker"
|
|
|
placeholder="共锁人"
|
|
placeholder="共锁人"
|
|
|
clearable
|
|
clearable
|
|
|
|
|
+ multiple
|
|
|
|
|
+ disabled
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="dict in this.hardwareTypeOption"
|
|
|
|
|
|
|
+ v-for="dict in this.listUserOption"
|
|
|
:key="dict.value"
|
|
:key="dict.value"
|
|
|
:label="dict.label"
|
|
:label="dict.label"
|
|
|
:value="dict.value"
|
|
:value="dict.value"
|
|
@@ -208,10 +214,12 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="共锁人" prop="coLocker">
|
|
<el-form-item label="共锁人" prop="coLocker">
|
|
|
<el-button type="primary" @click="addInside"
|
|
<el-button type="primary" @click="addInside"
|
|
|
- >添加内部人员</el-button
|
|
|
|
|
|
|
+ >添加内部人员
|
|
|
|
|
+ </el-button
|
|
|
>
|
|
>
|
|
|
<el-button type="primary" @click="addOutside"
|
|
<el-button type="primary" @click="addOutside"
|
|
|
- >添加外部人员</el-button
|
|
|
|
|
|
|
+ >添加外部人员
|
|
|
|
|
+ </el-button
|
|
|
>
|
|
>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="开始时间" prop="startTime">
|
|
<el-form-item label="开始时间" prop="startTime">
|
|
@@ -241,7 +249,8 @@
|
|
|
style="float: right; height: 30px; line-height: 10px"
|
|
style="float: right; height: 30px; line-height: 10px"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
@click="confirm"
|
|
@click="confirm"
|
|
|
- >完 成</el-button
|
|
|
|
|
|
|
+ >完 成
|
|
|
|
|
+ </el-button
|
|
|
>
|
|
>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -251,6 +260,68 @@
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <!-- 添加或修改设备维修单对话框 -->
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ :visible.sync="open"
|
|
|
|
|
+ width="450px"
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ style="margin-top: 13%"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div slot="title" class="dialog-title">
|
|
|
|
|
+ <i></i>
|
|
|
|
|
+ <span class="title">{{ title }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-form
|
|
|
|
|
+ ref="dialogForm"
|
|
|
|
|
+ :model="dialogForm"
|
|
|
|
|
+ :rules="rules"
|
|
|
|
|
+ label-width="70px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-form-item label="部门" prop="deptId" v-if="insideMumber">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="dialogForm.deptId"
|
|
|
|
|
+ placeholder="请选择部门"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ @change="DeptChage"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="dict in this.listDeptOption"
|
|
|
|
|
+ :key="dict.value"
|
|
|
|
|
+ :label="dict.label"
|
|
|
|
|
+ :value="dict.value"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="选择人员" prop="nickName" v-if="insideMumber">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="dialogForm.nickName"
|
|
|
|
|
+ placeholder="请选择人员"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ multiple
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="dict in this.listUserOption"
|
|
|
|
|
+ :key="dict.value"
|
|
|
|
|
+ :label="dict.label"
|
|
|
|
|
+ :value="dict.value"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="人员名称" prop="mumberId" v-if="outsideMumber">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="dialogForm.username"
|
|
|
|
|
+ placeholder="请输入人员名称"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button type="primary" @click="open=false">确认</el-button>
|
|
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
<!-- newOperations盒子结束-->
|
|
<!-- newOperations盒子结束-->
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -258,148 +329,221 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import SeparationPoint from "@/components/separationPoint/index.vue";
|
|
|
|
|
-import WorkShop from "@/components/separationPoint/workshop.vue";
|
|
|
|
|
|
|
+import SeparationPoint from '@/components/separationPoint/index.vue'
|
|
|
|
|
+import WorkShop from '@/components/separationPoint/workshop.vue'
|
|
|
import {
|
|
import {
|
|
|
listJobTicket,
|
|
listJobTicket,
|
|
|
getJobTicketInfo,
|
|
getJobTicketInfo,
|
|
|
addJobTicket,
|
|
addJobTicket,
|
|
|
updateJobTicket,
|
|
updateJobTicket,
|
|
|
deleteIsJobTicket,
|
|
deleteIsJobTicket,
|
|
|
- getworkareaList,
|
|
|
|
|
-} from "@/api/mes/job/job";
|
|
|
|
|
-import { listAllWorkshop } from "@/api/mes/md/workshop";
|
|
|
|
|
-import {getIsSopPage} from "@/api/mes/sop/sopindex"
|
|
|
|
|
-import IsolationLeftVue from "@/components/separationPoint/index.vue";
|
|
|
|
|
|
|
+ getworkareaList
|
|
|
|
|
+} from '@/api/mes/job/job'
|
|
|
|
|
+import { listAllWorkshop } from '@/api/mes/md/workshop'
|
|
|
|
|
+import { getIsSopPage } from '@/api/mes/sop/sopindex'
|
|
|
|
|
+import { listUser } from '@/api/system/user'
|
|
|
|
|
+import { listDept } from '@/api/system/dept'
|
|
|
|
|
+import IsolationLeftVue from '@/components/separationPoint/index.vue'
|
|
|
|
|
+
|
|
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
- name: "addView",
|
|
|
|
|
- dicts:['ticket_type',"power_type", "point_type"],
|
|
|
|
|
|
|
+ name: 'addView',
|
|
|
|
|
+ dicts: ['ticket_type', 'power_type', 'point_type'],
|
|
|
components: {
|
|
components: {
|
|
|
IsolationLeftVue,
|
|
IsolationLeftVue,
|
|
|
SeparationPoint,
|
|
SeparationPoint,
|
|
|
- WorkShop,
|
|
|
|
|
|
|
+ WorkShop
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- activeName: "first",
|
|
|
|
|
|
|
+ activeName: 'first',
|
|
|
form: {
|
|
form: {
|
|
|
- sopId: "",
|
|
|
|
|
- ticketType: "",
|
|
|
|
|
- ticketName: "",
|
|
|
|
|
- ticketCode: "",
|
|
|
|
|
- ticketContent: "",
|
|
|
|
|
- workshopName: "", //车间名称
|
|
|
|
|
- workline: "", //产线
|
|
|
|
|
|
|
+ sopId: '',
|
|
|
|
|
+ ticketType: '',
|
|
|
|
|
+ ticketName: '',
|
|
|
|
|
+ ticketCode: '',
|
|
|
|
|
+ ticketContent: '',
|
|
|
|
|
+ workshopName: '', //车间名称
|
|
|
|
|
+ workline: '', //产线
|
|
|
spoint: [], //已选隔离点
|
|
spoint: [], //已选隔离点
|
|
|
- locker: "", //上锁人
|
|
|
|
|
- coLocker: "", //共锁人
|
|
|
|
|
- startTime: "", //开始时间
|
|
|
|
|
- endTime: "", //结束时间
|
|
|
|
|
|
|
+ locker: '', //上锁人
|
|
|
|
|
+ coLocker: '', //共锁人
|
|
|
|
|
+ startTime: '', //开始时间
|
|
|
|
|
+ endTime: '' //结束时间
|
|
|
},
|
|
},
|
|
|
dialogForm: {
|
|
dialogForm: {
|
|
|
- dept: "",
|
|
|
|
|
- mumber: "",
|
|
|
|
|
- mumberId: "",
|
|
|
|
|
|
|
+ deptId: '',
|
|
|
|
|
+ nickname: '',
|
|
|
|
|
+ username: ''
|
|
|
},
|
|
},
|
|
|
- hardwareTypeOption:[],
|
|
|
|
|
|
|
+ listUserOption: null,
|
|
|
|
|
+ listDeptOption: null,
|
|
|
// 已选隔离点
|
|
// 已选隔离点
|
|
|
tableData: [],
|
|
tableData: [],
|
|
|
pickerOptions: {
|
|
pickerOptions: {
|
|
|
shortcuts: [
|
|
shortcuts: [
|
|
|
{
|
|
{
|
|
|
- text: "今天",
|
|
|
|
|
|
|
+ text: '今天',
|
|
|
onClick(picker) {
|
|
onClick(picker) {
|
|
|
- picker.$emit("pick", new Date());
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ picker.$emit('pick', new Date())
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- text: "昨天",
|
|
|
|
|
|
|
+ text: '昨天',
|
|
|
onClick(picker) {
|
|
onClick(picker) {
|
|
|
- const date = new Date();
|
|
|
|
|
- date.setTime(date.getTime() - 3600 * 1000 * 24);
|
|
|
|
|
- picker.$emit("pick", date);
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ const date = new Date()
|
|
|
|
|
+ date.setTime(date.getTime() - 3600 * 1000 * 24)
|
|
|
|
|
+ picker.$emit('pick', date)
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- text: "一周前",
|
|
|
|
|
|
|
+ text: '一周前',
|
|
|
onClick(picker) {
|
|
onClick(picker) {
|
|
|
- const date = new Date();
|
|
|
|
|
- date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
|
|
- picker.$emit("pick", date);
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ const date = new Date()
|
|
|
|
|
+ date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
|
|
|
|
|
+ picker.$emit('pick', date)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
},
|
|
},
|
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
open: false,
|
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
|
- title: "",
|
|
|
|
|
|
|
+ title: '',
|
|
|
// 弹框中显示的form表单内容
|
|
// 弹框中显示的form表单内容
|
|
|
insideMumber: false,
|
|
insideMumber: false,
|
|
|
outsideMumber: false,
|
|
outsideMumber: false,
|
|
|
points: null, //逆向传递拿到隔离点的数据
|
|
points: null, //逆向传递拿到隔离点的数据
|
|
|
- sopOptions:[],//sop下拉
|
|
|
|
|
- jobProps:[],//正向传递给车间components
|
|
|
|
|
|
|
+ sopOptions: [],//sop下拉
|
|
|
|
|
+ jobProps: [],//正向传递给车间components
|
|
|
// 表单校验
|
|
// 表单校验
|
|
|
rules: {
|
|
rules: {
|
|
|
teamCode: [
|
|
teamCode: [
|
|
|
- { required: true, message: "班组编号不能为空", trigger: "blur" },
|
|
|
|
|
|
|
+ { required: true, message: '班组编号不能为空', trigger: 'blur' }
|
|
|
],
|
|
],
|
|
|
teamName: [
|
|
teamName: [
|
|
|
- { required: true, message: "班组名称不能为空", trigger: "blur" },
|
|
|
|
|
|
|
+ { required: true, message: '班组名称不能为空', trigger: 'blur' }
|
|
|
],
|
|
],
|
|
|
calendarType: [
|
|
calendarType: [
|
|
|
- { required: true, message: "清选择班组类型", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ { required: true, message: '清选择班组类型', trigger: 'blur' }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ ...mapGetters('sopSelectPoints', [
|
|
|
|
|
+ 'getPointTableData'
|
|
|
|
|
+ ])
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.getSopList()
|
|
this.getSopList()
|
|
|
|
|
+ this.getUser()
|
|
|
|
|
+ console.log(this.getPointTableData, 'this.getPointTableData')
|
|
|
|
|
+ if (this.getPointTableData) {
|
|
|
|
|
+ this.tableData = this.getPointTableData.pointDetailVOList.map((item) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ pointId: item.pointId,
|
|
|
|
|
+ pointName: item.pointName,
|
|
|
|
|
+ pointType: item.pointType,
|
|
|
|
|
+ powerType: item.powerType
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- getSopList(){
|
|
|
|
|
- const query={
|
|
|
|
|
- current:1,
|
|
|
|
|
- size:100000,
|
|
|
|
|
|
|
+ getSopList() {
|
|
|
|
|
+ const query = {
|
|
|
|
|
+ current: 1,
|
|
|
|
|
+ size: 100000
|
|
|
}
|
|
}
|
|
|
getIsSopPage(query).then((res) => {
|
|
getIsSopPage(query).then((res) => {
|
|
|
- console.log(res,'sop列表接口')
|
|
|
|
|
- this.sopOptions=res.data.records
|
|
|
|
|
|
|
+ console.log(res, 'sop列表接口')
|
|
|
|
|
+ this.sopOptions = res.data.records
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- // sop下拉change事件
|
|
|
|
|
- handleSelectSOP(value){
|
|
|
|
|
- this.jobProps=this.sopOptions.filter((item)=>item.sopId==value)
|
|
|
|
|
- console.log(this.jobProps,'父组件jobProps')
|
|
|
|
|
|
|
+ getUser() {
|
|
|
|
|
+ const query = {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 100000
|
|
|
|
|
+ }
|
|
|
|
|
+ listUser(query).then(res => {
|
|
|
|
|
+ console.log(res, '用户列表')
|
|
|
|
|
+ this.listUserOption = res.rows.map((item) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ label: item.nickName,
|
|
|
|
|
+ value: item.deptId,
|
|
|
|
|
+ key: item.userId
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }),
|
|
|
|
|
+ listDept(query).then(res => {
|
|
|
|
|
+ console.log(res, '部门列表')
|
|
|
|
|
+ this.listDeptOption = res.data.map((item) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ label: item.deptName,
|
|
|
|
|
+ value: item.deptId,
|
|
|
|
|
+ key: item.parentId
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
|
|
+ // 添加内部人员 部门下拉的chage事件
|
|
|
|
|
+ DeptChage(val){
|
|
|
|
|
+ console.log(val,' 部门下拉')
|
|
|
|
|
+ const query = {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 100000,
|
|
|
|
|
+ deptId:this.dialogForm.deptId
|
|
|
|
|
+ }
|
|
|
|
|
+ listUser(query).then(res => {
|
|
|
|
|
+ console.log(res, '用户列表')
|
|
|
|
|
+ this.listUserOption = res.rows.map((item) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ label: item.nickName,
|
|
|
|
|
+ value: item.deptId,
|
|
|
|
|
+ key: item.userId
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ // sop下拉change事件
|
|
|
|
|
+ handleSelectSOP(value) {
|
|
|
|
|
+ this.jobProps = this.sopOptions.filter((item) => item.sopId == value)
|
|
|
|
|
+ console.log(this.jobProps, '父组件jobProps')
|
|
|
|
|
+ }
|
|
|
|
|
+ ,
|
|
|
handleClick(tab, event) {
|
|
handleClick(tab, event) {
|
|
|
// console.log(tab, event);
|
|
// console.log(tab, event);
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ ,
|
|
|
previousStep(val) {
|
|
previousStep(val) {
|
|
|
- this.activeName = val;
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ this.activeName = val
|
|
|
|
|
+ }
|
|
|
|
|
+ ,
|
|
|
nextStep(val) {
|
|
nextStep(val) {
|
|
|
- console.log(val, "nextStep");
|
|
|
|
|
- this.activeName = val;
|
|
|
|
|
- console.log("我点击了下一步");
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ console.log(val, 'nextStep')
|
|
|
|
|
+ this.activeName = val
|
|
|
|
|
+ console.log('我点击了下一步')
|
|
|
|
|
+ }
|
|
|
|
|
+ ,
|
|
|
confirm() {
|
|
confirm() {
|
|
|
- console.log("确认");
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ console.log('确认')
|
|
|
|
|
+ }
|
|
|
|
|
+ ,
|
|
|
// 子组件逆向传递选中的隔离点
|
|
// 子组件逆向传递选中的隔离点
|
|
|
// 子组件逆向传递选中的隔离点
|
|
// 子组件逆向传递选中的隔离点
|
|
|
handleSelectPoint(points) {
|
|
handleSelectPoint(points) {
|
|
|
- console.log(points, "父组件接收逆向传递选中的隔离点");
|
|
|
|
|
|
|
+ console.log(points, '父组件接收逆向传递选中的隔离点')
|
|
|
|
|
|
|
|
// 使用 Set 来存储传递过来的点值
|
|
// 使用 Set 来存储传递过来的点值
|
|
|
- const newValues = new Set(points.map((point) => point.pointId));
|
|
|
|
|
|
|
+ const newValues = new Set(points.map((point) => point.pointId))
|
|
|
|
|
|
|
|
// 1. 删除取消选中的点
|
|
// 1. 删除取消选中的点
|
|
|
- this.tableData = this.tableData.filter((item) => newValues.has(item.pointId));
|
|
|
|
|
|
|
+ this.tableData = this.tableData.filter((item) => newValues.has(item.pointId))
|
|
|
|
|
|
|
|
// 2. 确保新增点不会重复
|
|
// 2. 确保新增点不会重复
|
|
|
- const existingValues = new Set(this.tableData.map((item) => item.pointId));
|
|
|
|
|
|
|
+ const existingValues = new Set(this.tableData.map((item) => item.pointId))
|
|
|
|
|
|
|
|
points.forEach((point) => {
|
|
points.forEach((point) => {
|
|
|
// 如果当前传递的点不在已有的点集中,则添加
|
|
// 如果当前传递的点不在已有的点集中,则添加
|
|
@@ -407,72 +551,80 @@ export default {
|
|
|
this.tableData.push({
|
|
this.tableData.push({
|
|
|
pointName: point.pointName, // 显示的名称
|
|
pointName: point.pointName, // 显示的名称
|
|
|
pointId: point.pointId, // 对应的值
|
|
pointId: point.pointId, // 对应的值
|
|
|
- pointType:point.pointType,
|
|
|
|
|
- powerType:point.powerType,
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ pointType: point.pointType,
|
|
|
|
|
+ powerType: point.powerType
|
|
|
|
|
+ })
|
|
|
// 将新点值添加到 Set 中
|
|
// 将新点值添加到 Set 中
|
|
|
- existingValues.add(point.value);
|
|
|
|
|
|
|
+ existingValues.add(point.value)
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
// 更新 form.spoint 为最新选中的隔离点数组
|
|
// 更新 form.spoint 为最新选中的隔离点数组
|
|
|
- this.form.spoint = points.map((point) => point.pointId);
|
|
|
|
|
|
|
+ this.form.spoint = points.map((point) => point.pointId)
|
|
|
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ ,
|
|
|
// 车间你逆向传递拿到的隔离点数据产线
|
|
// 车间你逆向传递拿到的隔离点数据产线
|
|
|
handleProductLineSelected(selectedOption) {
|
|
handleProductLineSelected(selectedOption) {
|
|
|
// console.log(selectedOption, '父组件接收到的 selectedOption');
|
|
// console.log(selectedOption, '父组件接收到的 selectedOption');
|
|
|
- this.points = selectedOption;
|
|
|
|
|
- this.form.workline=selectedOption.label
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ this.points = selectedOption
|
|
|
|
|
+ this.form.workline = selectedOption.label
|
|
|
|
|
+ }
|
|
|
|
|
+ ,
|
|
|
// 车间子组件逆传递车间相关数据车间
|
|
// 车间子组件逆传递车间相关数据车间
|
|
|
- handleWorkshopSelected(selectedOption){
|
|
|
|
|
- console.log(selectedOption,'handleWorkshopSelected')
|
|
|
|
|
- this.emitWorkShop=selectedOption
|
|
|
|
|
- this.form.workshopName=selectedOption.label
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ handleWorkshopSelected(selectedOption) {
|
|
|
|
|
+ console.log(selectedOption, 'handleWorkshopSelected')
|
|
|
|
|
+ this.emitWorkShop = selectedOption
|
|
|
|
|
+ this.form.workshopName = selectedOption.label
|
|
|
|
|
+ }
|
|
|
|
|
+ ,
|
|
|
// 添加内部人员
|
|
// 添加内部人员
|
|
|
addInside() {
|
|
addInside() {
|
|
|
- this.open = true;
|
|
|
|
|
- this.title = "添加内部人员";
|
|
|
|
|
- this.insideMumber = true;
|
|
|
|
|
- this.outsideMumber = false;
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ this.open = true
|
|
|
|
|
+ this.title = '添加内部人员'
|
|
|
|
|
+ this.insideMumber = true
|
|
|
|
|
+ this.outsideMumber = false
|
|
|
|
|
+ }
|
|
|
|
|
+ ,
|
|
|
addOutside() {
|
|
addOutside() {
|
|
|
- this.open = true;
|
|
|
|
|
- this.title = "添加外部人员";
|
|
|
|
|
- this.insideMumber = false;
|
|
|
|
|
- this.outsideMumber = true;
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ this.open = true
|
|
|
|
|
+ this.title = '添加外部人员'
|
|
|
|
|
+ this.insideMumber = false
|
|
|
|
|
+ this.outsideMumber = true
|
|
|
|
|
+ }
|
|
|
|
|
+ ,
|
|
|
// 取消按钮
|
|
// 取消按钮
|
|
|
cancel() {
|
|
cancel() {
|
|
|
- this.open = false;
|
|
|
|
|
- this.reset();
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
-};
|
|
|
|
|
|
|
+ this.open = false
|
|
|
|
|
+ this.reset()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-<style scoped lang="scss" >
|
|
|
|
|
|
|
+<style scoped lang="scss">
|
|
|
.newOperations {
|
|
.newOperations {
|
|
|
width: 99%;
|
|
width: 99%;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
//background: pink;
|
|
//background: pink;
|
|
|
margin: 10px;
|
|
margin: 10px;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
|
|
+
|
|
|
.left {
|
|
.left {
|
|
|
width: 75%;
|
|
width: 75%;
|
|
|
height: 830px;
|
|
height: 830px;
|
|
|
background: #eee;
|
|
background: #eee;
|
|
|
margin-right: 10px;
|
|
margin-right: 10px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.right {
|
|
.right {
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
|
|
+
|
|
|
.right_top {
|
|
.right_top {
|
|
|
height: 550px;
|
|
height: 550px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.workTicket_btn {
|
|
.workTicket_btn {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
left: 63%;
|
|
left: 63%;
|
|
@@ -481,6 +633,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
//右侧卡片样式开始
|
|
//右侧卡片样式开始
|
|
|
.text {
|
|
.text {
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
@@ -488,6 +641,7 @@ export default {
|
|
|
|
|
|
|
|
.item {
|
|
.item {
|
|
|
margin-bottom: 18px;
|
|
margin-bottom: 18px;
|
|
|
|
|
+
|
|
|
p {
|
|
p {
|
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
|
font-weight: bolder;
|
|
font-weight: bolder;
|
|
@@ -501,6 +655,7 @@ export default {
|
|
|
content: "";
|
|
content: "";
|
|
|
width: 320px;
|
|
width: 320px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.clearfix:after {
|
|
.clearfix:after {
|
|
|
clear: both;
|
|
clear: both;
|
|
|
}
|
|
}
|
|
@@ -518,23 +673,27 @@ export default {
|
|
|
// 调整箭头符号块的宽度
|
|
// 调整箭头符号块的宽度
|
|
|
width: 175px !important;
|
|
width: 175px !important;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.el-input.el-input--medium.el-input--suffix {
|
|
.el-input.el-input--medium.el-input--suffix {
|
|
|
.el-input__inner {
|
|
.el-input__inner {
|
|
|
// 调整输入框的宽高
|
|
// 调整输入框的宽高
|
|
|
height: 36px !important;
|
|
height: 36px !important;
|
|
|
width: 220px !important;
|
|
width: 220px !important;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.el-input__suffix-inner {
|
|
.el-input__suffix-inner {
|
|
|
// 调整箭头符号的位置
|
|
// 调整箭头符号的位置
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
right: -45px;
|
|
right: -45px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.el-select__tags {
|
|
.el-select__tags {
|
|
|
// 调整输入框里面的多选不换行
|
|
// 调整输入框里面的多选不换行
|
|
|
flex-wrap: nowrap !important;
|
|
flex-wrap: nowrap !important;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
//隔离点多选框样式结束
|
|
//隔离点多选框样式结束
|
|
|
</style>
|
|
</style>
|
|
|
|
|
|