pc界面优化初步完成

This commit is contained in:
曹前明 2022-08-03 15:33:56 +08:00
parent 8ef71cf24e
commit 8840084ce9
13 changed files with 184 additions and 147 deletions

View File

@ -79,7 +79,7 @@
// //
toArr(str){ toArr(str){
var _arr = []; var _arr = [];
var arr = str.split(","); var arr = (str+"").split(",");
arr.forEach(item => { arr.forEach(item => {
if(item){ if(item){
var urlArr = item.split('/'); var urlArr = item.split('/');

View File

@ -8,37 +8,37 @@
</div> </div>
</template> </template>
<div class="card-body"> <div class="card-body">
<div> <div>
<el-badge :value="operationnumber" class="item"> <el-badge :value="operationnumber" class="item">
<el-button <el-button
icon="el-icon-document-copy" icon="el-icon-document-copy"
type="primary" type="primary"
size="small" size="small"
></el-button> ></el-button>
</el-badge> </el-badge>
<div style="font-size:16px">危险作业</div> <div style="font-size: 16px">危险作业</div>
</div>
<div>
<el-badge :value="rpjnumber" class="item">
<el-button
icon="el-icon-document-copy"
type="warning"
size="small"
></el-button>
</el-badge>
<div style="font-size:16px">相关方项目</div>
</div>
<div>
<el-badge :value="visitnumber" class="item">
<el-button
icon="el-icon-document-copy"
type="success"
size="small"
></el-button>
</el-badge>
<div style="font-size:16px">来访项目</div>
</div>
</div> </div>
<div>
<el-badge :value="rpjnumber" class="item">
<el-button
icon="el-icon-document-copy"
type="warning"
size="small"
></el-button>
</el-badge>
<div style="font-size: 16px">相关方项目</div>
</div>
<div>
<el-badge :value="visitnumber" class="item">
<el-button
icon="el-icon-document-copy"
type="success"
size="small"
></el-button>
</el-badge>
<div style="font-size: 16px">来访项目</div>
</div>
</div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
@ -46,12 +46,10 @@
<template #header> <template #header>
<div class="card-header"> <div class="card-header">
<span>人员统计</span> <span>人员统计</span>
<el-switch <el-radio-group v-model="ep_count_type" @change="countINdexChange">
v-model="ep_count_type" <el-radio label="1" size="large">有卡</el-radio>
active-text="在厂" <el-radio label="2" size="large">在厂</el-radio>
inactive-text="有卡" </el-radio-group>
@change="countTypeChange"
/>
</div> </div>
</template> </template>
<div class="screen-cockpits"> <div class="screen-cockpits">
@ -101,7 +99,7 @@ export default {
return { return {
dutyAgg: [], dutyAgg: [],
// //
ep_count_type: true, ep_count_type: "2",
userCount: { userCount: {
total: 0, total: 0,
count_employee: 0, // count_employee: 0, //
@ -150,7 +148,6 @@ export default {
this.countIndex = index; this.countIndex = index;
this.getManCount(); this.getManCount();
}, },
// //
getOperation() { getOperation() {
this.$API.opm.operation.list this.$API.opm.operation.list
@ -476,12 +473,12 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height:24px; height: 24px;
} }
.card-body { .card-body {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
height:80px; height: 80px;
} }
</style> </style>

View File

@ -203,7 +203,7 @@
hidePagination hidePagination
stripe stripe
hideDo hideDo
style="height: calc(100% - 60px);" style="height: 200px;"
> >
<el-table-column <el-table-column
label="#" label="#"
@ -314,12 +314,14 @@
<el-button type="primary" @click="submitWorker"> </el-button> <el-button type="primary" @click="submitWorker"> </el-button>
</template> </template>
</sc-dialog> </sc-dialog>
<el-button style="margin-top: 12px" @click="handleLastStep" <div style="margin-top:20px;text-align:center">
<el-button style="margin-right: 4px" @click="handleLastStep"
>上一步 >上一步
</el-button> </el-button>
<el-button style="margin-top: 12px" type="primary" plain @click="handleNextStep" <el-button type="primary" plain @click="handleNextStep"
>下一步 >下一步
</el-button> </el-button>
</div>
</el-main> </el-main>
<!--气体检测记录!--> <!--气体检测记录!-->
<el-main class="nopadding" v-show="active === 2"> <el-main class="nopadding" v-show="active === 2">
@ -336,6 +338,7 @@
row-key="id" row-key="id"
hidePagination hidePagination
stripe stripe
style="height: 200px;"
> >
<el-table-column <el-table-column
label="#" label="#"
@ -480,15 +483,18 @@
<el-button type="primary" @click="submitgas"> </el-button> <el-button type="primary" @click="submitgas"> </el-button>
</template> </template>
</sc-dialog> </sc-dialog>
<el-button @click="handleLastStep">上一步</el-button> <div style="margin-top:20px;text-align:center">
<el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
<el-button <el-button
v-for=" item in initForm.transitions" v-for=" item in initForm.transitions"
:key="item.id" :key="item.id"
type="primary" type="primary"
@click="submitTicketCreate(item.id)" @click="submitTicketCreate(item.id)"
style="margin-right:4px"
>{{item.name}} >{{item.name}}
</el-button> </el-button>
<el-button @click="submitOut">退出</el-button> <el-button @click="submitOut" type="warning">退出</el-button>
</div>
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
@ -814,7 +820,7 @@
// //
getInit() { getInit() {
this.$API.wf.workflow.initkey.req('Fire').then((res) => { this.$API.wf.workflow.initkey.req('opl_fire').then((res) => {
this.initForm = res; this.initForm = res;
}); });
}, },

View File

@ -83,7 +83,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="24" :sm="12" :xs="24"> <el-col :md="24" :sm="12" :xs="24" v-if="rparty_show">
<el-form-item label="相关方"> <el-form-item label="相关方">
<el-select v-model="form.rparty" style="width: 100%"> <el-select v-model="form.rparty" style="width: 100%">
<el-option <el-option
@ -137,13 +137,22 @@
{id: 30, name: "保安保洁服务"}, {id: 30, name: "保安保洁服务"},
{id: 40, name: "其他"}, {id: 40, name: "其他"},
], ],
rparty_show: false
}; };
}, },
mounted() { mounted() {
this.getRpartyOptions(); this.rpartyShow()
this.getDept(); this.getDept();
}, },
methods: { methods: {
rpartyShow(){
var userInfo = this.$TOOL.data.get("USER_INFO");
if(userInfo.type=='employee'){
this.rparty_show = true
this.getRpartyOptions();
}
},
// //
open(mode = "add") { open(mode = "add") {
this.mode = mode; this.mode = mode;

View File

@ -7,8 +7,9 @@
@closed="$emit('closed')" @closed="$emit('closed')"
> >
<el-container v-loading="loading"> <el-container v-loading="loading">
<el-main style="padding: 0 20px 20px 20px"> <el-main>
<el-descriptions direction="vertical" :column="3" border> <el-card shadow="hover">
<el-descriptions :column="3" title="基本信息">
<el-descriptions-item label="入厂项目:">{{form.name }}</el-descriptions-item> <el-descriptions-item label="入厂项目:">{{form.name }}</el-descriptions-item>
<el-descriptions-item label="项目类型:">{{types_[form.type]}}</el-descriptions-item> <el-descriptions-item label="项目类型:">{{types_[form.type]}}</el-descriptions-item>
<el-descriptions-item label="合同编号:">{{form.contract_number}}</el-descriptions-item> <el-descriptions-item label="合同编号:">{{form.contract_number}}</el-descriptions-item>
@ -18,7 +19,8 @@
<el-descriptions-item label="所属部门:">{{form.belong_dept_name}}</el-descriptions-item> <el-descriptions-item label="所属部门:">{{form.belong_dept_name}}</el-descriptions-item>
<el-descriptions-item label="相关方:">{{form.rparty_name}}</el-descriptions-item> <el-descriptions-item label="相关方:">{{form.rparty_name}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-card style="margin-top:20px"> </el-card>
<el-card style="margin-top:8px" shadow="hover">
<scTable <scTable
ref="fileTable" ref="fileTable"
:data="rpjFileList" :data="rpjFileList"
@ -26,6 +28,7 @@
hidePagination hidePagination
stripe stripe
hideDo hideDo
style="height:200px"
> >
<el-table-column <el-table-column
label="#" label="#"
@ -40,16 +43,14 @@
</el-table-column> </el-table-column>
<el-table-column label="文件资料" prop="name"> <el-table-column label="文件资料" prop="name">
<template #default="scope"> <template #default="scope">
<div v-for="(item, index) in scope.row.files_" :key="index"> <div v-for="item in scope.row.files_" :key="item.id">
<el-link :href="item.file"> <el-link style="font-size:12px" type="primary" :href="item.path" target="_blank">{{item.name}}</el-link>
{{ item.name }} </div>
</el-link>
</div>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-card> </el-card>
<el-card style="margin-top:20px"> <el-card style="margin-top:8px" shadow="hover">
<scTable <scTable
ref="table" ref="table"
:data="memeberList" :data="memeberList"
@ -58,6 +59,7 @@
stripe stripe
hideDo hideDo
hidePagination hidePagination
style="height:200px"
> >
<el-table-column label="#" fixed="left" type="index" width="50"></el-table-column> <el-table-column label="#" fixed="left" type="index" width="50"></el-table-column>
<el-table-column label="姓名" prop="remployee_.name"> <el-table-column label="姓名" prop="remployee_.name">
@ -136,12 +138,14 @@
}, },
// //
setData(data) { setData(data) {
this.loading = true
this.$API.rpm.rpj.item.req(data.id).then((res) => { this.$API.rpm.rpj.item.req(data.id).then((res) => {
this.loading = false
this.form = res; this.form = res;
this.getRpjfileList(); this.getRpjfileList();
this.getMemberList(); this.getMemberList();
this.visible = true; this.visible = true;
}); }).catch(e=>{this.loading=false});
}, },
// //
getRpjfileList() { getRpjfileList() {

View File

@ -88,7 +88,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="24" :sm="12" :xs="24"> <el-col :md="24" :sm="12" :xs="24" v-if="rparty_show">
<el-form-item label="相关方"> <el-form-item label="相关方">
<el-select v-model="rpjform.rparty" style="width: 100%"> <el-select v-model="rpjform.rparty" style="width: 100%">
<el-option <el-option
@ -105,7 +105,7 @@
<el-row> <el-row>
<el-col :md="24" :sm="12" :xs="24"> <el-col :md="24" :sm="12" :xs="24">
<el-form-item> <el-form-item>
<el-button style="margin-top: 12px" @click="handleNextStep" <el-button style="margin-top: 20px" type="primary" @click="handleNextStep"
>下一步 >下一步
</el-button </el-button
> >
@ -122,7 +122,9 @@
:data="rpjfileList" :data="rpjfileList"
row-key="id" row-key="id"
hidePagination hidePagination
hideDo
stripe stripe
style="height:300px"
> >
<el-table-column <el-table-column
label="#" label="#"
@ -137,44 +139,45 @@
</el-table-column> </el-table-column>
<el-table-column label="文件资料" prop="name"> <el-table-column label="文件资料" prop="name">
<template #default="scope"> <template #default="scope">
<div v-for="(item, index) in scope.row.files_" :key="index"> <div v-for="item in scope.row.files_" :key="item.id">
<el-link :href="item.file"> <el-link style="font-size:12px" type="primary" :href="item.path" target="_blank">{{item.name}}</el-link>
{{ item.name }} </div>
</el-link>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200"> <el-table-column label="操作" fixed="right" align="center" width="200">
<template #default="scope"> <template #default="scope">
<el-button <el-button
text link
type="primary" type="primary"
size="small" size="small"
@click="upload(scope.row, scope.$index)" @click="upload(scope.row, scope.$index)"
>上传 ><span v-if="scope.row.files.length>=1" style="color:red">重传</span>
<span v-else>上传</span>
</el-button </el-button
> >
<el-popconfirm <!-- <el-popconfirm
title="确定删除吗?" title="确定删除吗?"
@confirm="del_rpjfile(scope.row)" @confirm="del_rpjfile(scope.row)"
> >
<template #reference> <template #reference>
<el-button text type="danger" size="small">删除</el-button> <el-button link type="danger" size="small">删除</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm> -->
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
<el-button style="margin-top: 12px" @click="handleLastStep" <div style="margin-top:20px;text-align:center">
<el-button style="margin-right: 4px" @click="handleLastStep"
>上一步 >上一步
</el-button </el-button
> >
<el-button style="margin-top: 12px" @click="handleNextStep" <el-button type="primary" @click="handleNextStep"
>下一步 >下一步
</el-button </el-button
> >
<sc-dialog v-model="dialogupload" draggable title="上传文件"> </div>
<el-dialog v-model="dialogupload" draggable title="上传文件">
<el-form ref="dialogfileForm" :model="fileform" label-width="120px"> <el-form ref="dialogfileForm" :model="fileform" label-width="120px">
<el-row> <el-row>
<el-col :md="24" :sm="12" :xs="24"> <el-col :md="24" :sm="12" :xs="24">
@ -184,10 +187,10 @@
:on-success="success" :on-success="success"
:multiple="true" :multiple="true"
:limit="10" :limit="10"
tip="最多上传10个文件,单个文件不要超过10M,请上传xlsx/docx格式文件" tip="最多上传10个文件,单个文件不要超过10M"
> >
<el-button type="primary" icon="el-icon-upload" <el-button type="primary" icon="el-icon-upload"
>上传附件 >
</el-button </el-button
> >
</sc-upload-file> </sc-upload-file>
@ -199,7 +202,7 @@
<el-button @click="dialogupload = false"> </el-button> <el-button @click="dialogupload = false"> </el-button>
<el-button type="primary" @click="submitFile"> </el-button> <el-button type="primary" @click="submitFile"> </el-button>
</template> </template>
</sc-dialog> </el-dialog>
</el-main> </el-main>
<!--选择人员!--> <!--选择人员!-->
<el-main class="nopadding" v-show="active === 2"> <el-main class="nopadding" v-show="active === 2">
@ -215,7 +218,9 @@
:data="apiworkerObj" :data="apiworkerObj"
row-key="id" row-key="id"
hidePagination hidePagination
hideDo
stripe stripe
style="height:300px"
> >
<el-table-column <el-table-column
label="#" label="#"
@ -243,6 +248,10 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否项目负责人" prop="is_manager" width="150"> <el-table-column label="是否项目负责人" prop="is_manager" width="150">
<template #default="scope">
<span v-if="scope.row.is_manager"></span>
<span v-else></span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="创建时间" label="创建时间"
@ -262,13 +271,11 @@
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
<sc-dialog v-model="workerdialog" draggable title="选择项目人员"> <el-dialog v-model="workerdialog" draggable title="选择项目人员">
<el-form <el-form
ref="workerForm" ref="workerForm"
:model="formworker" :model="formworker"
label-width="80px" label-width="120px"
width="70%"
style="margin: 40px 40px 40px 40px"
> >
<el-row> <el-row>
<el-col :md="24" :sm="12" :xs="24"> <el-col :md="24" :sm="12" :xs="24">
@ -327,15 +334,18 @@
<el-button @click="workerdialog = false"> </el-button> <el-button @click="workerdialog = false"> </el-button>
<el-button type="primary" @click="submitWorker"> </el-button> <el-button type="primary" @click="submitWorker"> </el-button>
</template> </template>
</sc-dialog> </el-dialog>
<el-button @click="handleLastStep">上一步</el-button> <div style="margin-top:20px;text-align:center">
<el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
<el-button <el-button
v-for=" item in initForm.transitions" v-for=" item in initForm.transitions"
:key="item.id" :key="item.id"
type="primary" type="primary"
@click="submitTicketCreate(item.id)" @click="submitTicketCreate(item.id)"
style="margin-right:4px"
>{{item.name}}</el-button> >{{item.name}}</el-button>
<el-button @click="submitOut">退出</el-button> <el-button @click="submitOut" type="warning">退出</el-button>
</div>
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
@ -406,16 +416,24 @@
apiworkerObj: [], apiworkerObj: [],
workerdialog: false, workerdialog: false,
initForm: {}, initForm: {},
rparty_show: false
}; };
}, },
mounted() { mounted() {
this.rpjId = this.$route.query.rpjid; //ID this.rpjId = this.$route.query.rpjid; //ID
this.rpartyShow()
this.getRpj(); this.getRpj();
this.getRpartyOptions();
this.getDept(); this.getDept();
this.getInit(); this.getInit();
}, },
methods: { methods: {
rpartyShow(){
var userInfo = this.$TOOL.data.get("USER_INFO");
if(userInfo.type=='employee'){
this.rparty_show = true
this.getRpartyOptions();
}
},
// //
getRpj() { getRpj() {
console.log(this.$route.query.rpjid); console.log(this.$route.query.rpjid);
@ -430,8 +448,8 @@
}); });
}, },
// //
getRpjfileList(id) { getRpjfileList() {
this.$API.rpm.rpjfile.list.req({page: 0, rpj: id}).then((res) => { this.$API.rpm.rpjfile.list.req({page: 0, rpj: this.rpjId}).then((res) => {
this.rpjfileList = res; this.rpjfileList = res;
}); });
}, },
@ -512,7 +530,8 @@
.then((res) => { .then((res) => {
this.$message.success("提交成功!"); this.$message.success("提交成功!");
this.dialogupload = false; this.dialogupload = false;
this.rpjfileList = []
this.getRpjfileList();
return res; return res;
}) })
.catch((err) => { .catch((err) => {
@ -536,8 +555,8 @@
}, },
// //
getmemberList(id) { getmemberList() {
this.$API.rpm.member.list.req({rpj: id, page: 0}).then((res) => { this.$API.rpm.member.list.req({rpj: this.rpjId, page: 0}).then((res) => {
this.apiworkerObj = res; this.apiworkerObj = res;
console.log(res); console.log(res);
}); });
@ -551,11 +570,11 @@
// //
delWorker(row) { delWorker(row) {
this.$API.opm.worker.delete this.$API.rpm.member.delete
.req(row.id) .req(row.id)
.then((res) => { .then((res) => {
this.$message.success("作业人员删除成功"); this.$message.success("作业人员删除成功");
this.getmemberList()
return res; return res;
}) })
.catch((err) => { .catch((err) => {
@ -569,6 +588,7 @@
this.$API.rpm.member.create.req(this.formworker).then((res) => { this.$API.rpm.member.create.req(this.formworker).then((res) => {
this.$message.success("创建项目人员成功"); this.$message.success("创建项目人员成功");
this.workerdialog = false; this.workerdialog = false;
this.getmemberList()
}) })
.catch((err) => { .catch((err) => {
return err; return err;
@ -578,7 +598,7 @@
// //
getInit(){ getInit(){
this.$API.wf.workflow.initkey.req('rparty').then((res) => { this.$API.wf.workflow.initkey.req('rpj').then((res) => {
this.initForm = res; this.initForm = res;
}); });
}, },

View File

@ -76,14 +76,15 @@
methods: { methods: {
handleShow(row) { handleShow(row) {
let cateType = row.workflow_.key; let cateType = row.workflow_.key;
let projectId = '', operation = null; let projectId = null;
if (cateType === 'visit') { if (cateType === 'visit') {
projectId = row.ticket_data.visit; projectId = row.ticket_data.visit;
} else if (cateType === 'rparty') { } else if (cateType === 'rpj') {
projectId = row.ticket_data.rpj; projectId = row.ticket_data.rpj;
} else { } else if(cateType.indexOf('opl_')!=-1){
operation = row.ticket_data.operation ? row.ticket_data.operation : null; // operation = row.ticket_data.operation ? row.ticket_data.operation : null;
projectId = row.ticket_data.opl; projectId = row.ticket_data.opl;
cateType = 'opl'
} }
this.$router.push({ this.$router.push({
name: "ticketdetail", name: "ticketdetail",
@ -92,7 +93,7 @@
type: 'show', type: 'show',
projectId: projectId, projectId: projectId,
catetype: cateType, catetype: cateType,
operation: operation // operation: operation
}, },
}); });
}, },

View File

@ -74,14 +74,14 @@
methods: { methods: {
handleShow(row) { handleShow(row) {
let cateType = row.workflow_.key; let cateType = row.workflow_.key;
let projectId = '', operation = null; let projectId = null;
if (cateType === 'visit') { if (cateType === 'visit') {
projectId = row.ticket_data.visit; projectId = row.ticket_data.visit;
} else if (cateType === 'rparty') { } else if (cateType === 'rpj') {
projectId = row.ticket_data.rpj; projectId = row.ticket_data.rpj;
} else { } else if(cateType.indexOf('opl_')!=-1){
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
projectId = row.ticket_data.opl; projectId = row.ticket_data.opl;
cateType = 'opl'
} }
this.$router.push({ this.$router.push({
name: "ticketdetail", name: "ticketdetail",
@ -90,7 +90,6 @@
type: 'show', type: 'show',
projectId: projectId, projectId: projectId,
catetype: cateType, catetype: cateType,
operation: operation
}, },
}); });
}, },

View File

@ -105,21 +105,22 @@
methods: { methods: {
// //
handleDetail(row) { handleDetail(row) {
let projectId = '', operation = null; let cateType = row.workflow_.key;
let catetype = row.workflow_.key; let projectId = null;
if (catetype === 'visit') { if (cateType === 'visit') {
projectId = row.ticket_data.visit; projectId = row.ticket_data.visit;
} else if (catetype === 'Fire') { } else if (cateType === 'rpj') {
projectId = row.ticket_data.rpj;
} else if(cateType.indexOf('opl_')!=-1){
projectId = row.ticket_data.opl; projectId = row.ticket_data.opl;
operation = row.ticket_data.operation ? row.ticket_data.operation : null; cateType = 'opl'
} }
this.$router.push({ this.$router.push({
name: "ticketdetail", name: "ticketdetail",
query: { query: {
id: row.id, id: row.id,
projectId: projectId, projectId: projectId,
catetype: row.workflow_.key, catetype: cateType,
operation: operation
}, },
}); });
}, },

View File

@ -113,23 +113,22 @@
methods: { methods: {
handleShow(row) { handleShow(row) {
let cateType = row.workflow_.key; let cateType = row.workflow_.key;
let projectId = '', operation = null; let projectId = null;
if (cateType === 'visit') { if (cateType === 'visit') {
projectId = row.ticket_data.visit; projectId = row.ticket_data.visit;
} else if (cateType === 'rparty') { } else if (cateType === 'rpj') {
projectId = row.ticket_data.rpj; projectId = row.ticket_data.rpj;
} else { } else if(cateType.indexOf('opl_')!=-1){
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
projectId = row.ticket_data.opl; projectId = row.ticket_data.opl;
cateType = 'opl'
} }
this.$router.push({ this.$router.push({
name: "ticketdetail", name: "ticketdetail",
query: { query: {
id: row.id, id: row.id,
type: 'show', type: "show",
projectId: projectId, projectId: projectId,
catetype: cateType, catetype: cateType,
operation: operation
}, },
}); });
}, },

View File

@ -16,6 +16,9 @@
<script> <script>
export default { export default {
name: "workstep", name: "workstep",
props:{
ticket: { type: Object, default: () => {} },
},
data() { data() {
return { return {
sort: 0, sort: 0,
@ -31,19 +34,17 @@ export default {
getFlowSteps() { getFlowSteps() {
this.$API.wf.ticket.ticketFlowSteps.req(this.workId).then((res) => { this.$API.wf.ticket.ticketFlowSteps.req(this.workId).then((res) => {
this.flowSteps = res; this.flowSteps = res;
this.$API.wf.ticket.ticketItem.req(this.workId).then((resp) => { let state = this.ticket.state;
let state = resp.state; let dat = this.flowSteps.filter((item) => {
let dat = this.flowSteps.filter((item) => { return item.id == state;
return item.id == state;
});
debugger;
this.sort = dat[0].sort;
this.actives = this.flowSteps.indexOf(dat[0]);
if (this.flowSteps.length - this.actives > 1) {
} else {
this.actives = this.flowSteps.length;
}
}); });
debugger;
this.sort = dat[0].sort;
this.actives = this.flowSteps.indexOf(dat[0]);
if (this.flowSteps.length - this.actives > 1) {
} else {
this.actives = this.flowSteps.length;
}
}); });
}, },
}, },

View File

@ -2,7 +2,7 @@
<el-container> <el-container>
<el-main v-loading="mainLoading"> <el-main v-loading="mainLoading">
<el-card header="流程"> <el-card header="流程">
<work-step ref="workStep"></work-step> <work-step v-if="ticketDetail.state" ref="workStep" :ticket="ticketDetail"></work-step>
<el-button <el-button
class="ticketRetry" class="ticketRetry"
v-if="type!=='show'&&ticketDetail.state_&&ticketDetail.state_.name==='任务执行'" v-if="type!=='show'&&ticketDetail.state_&&ticketDetail.state_.name==='任务执行'"
@ -51,7 +51,7 @@
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-card style="margin-top: 8px" v-if="cateType==='rparty'"> <el-card style="margin-top: 8px" v-if="cateType==='rpj'">
<el-descriptions title="入厂项目" :column="3"> <el-descriptions title="入厂项目" :column="3">
<el-descriptions-item label="工单流水号:"> <el-descriptions-item label="工单流水号:">
{{ticketDetail.sn }} {{ticketDetail.sn }}
@ -86,22 +86,25 @@
</div> </div>
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog> <show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
</el-card> </el-card>
<el-card style="margin-top: 8px" v-else> <el-card style="margin-top: 8px" v-if="cateType==='opl'">
<el-descriptions title="作业许可证" :column="3"> <el-descriptions title="作业许可证" :column="3">
<el-descriptions-item label="工单流水号:"> <el-descriptions-item label="工单流水号:">
{{ticketDetail.sn }} {{ticketDetail.sn }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="所属作业:"> <el-descriptions-item label="所属作业:">
{{oplDetail.name }} <span v-if="oplDetail.operation">{{oplDetail.operation_.name }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="作业地点:"> <el-descriptions-item label="许可证类型:">
{{oplDetail.place}} {{oplDetail.cate_name }}
</el-descriptions-item>
<el-descriptions-item label="作业区域:">
<span v-if="oplDetail.operation">{{oplDetail.operation_.area_.name}}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="作业状态:"> <el-descriptions-item label="作业状态:">
{{state_[oplDetail.state]}} <span v-if="oplDetail.operation">{{state_[oplDetail.operation_.state]}}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="生产状态:"> <el-descriptions-item label="生产状态:">
{{oplDetail.state_work }} <span v-if="oplDetail.operation">{{oplDetail.operation_.state_work }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="开始时间:"> <el-descriptions-item label="开始时间:">
{{oplDetail.start_time }} {{oplDetail.start_time }}
@ -224,8 +227,8 @@
userName: "", userName: "",
rpjDetail: {}, rpjDetail: {},
oplDetail: {}, oplDetail: {},
ticketDetail: [], ticketDetail: {},
visitDetail: [], visitDetail: {},
employeeLists: [], employeeLists: [],
operationBtn: [], operationBtn: [],
form: { form: {
@ -279,14 +282,12 @@
this.type = this.$route.query.type; this.type = this.$route.query.type;
this.projectId = this.$route.query.projectId; this.projectId = this.$route.query.projectId;
this.cateType = this.$route.query.catetype; this.cateType = this.$route.query.catetype;
this.operation = this.$route.query.operation;
}, },
mounted() { mounted() {
debugger; debugger;
if (this.cateType === 'visit') { if (this.cateType === 'visit') {
this.getVisit(); this.getVisit();
} else if (this.cateType === 'rparty') { } else if (this.cateType === 'rpj') {
this.getRpj(); this.getRpj();
} else { } else {
this.getOpl(); this.getOpl();

View File

@ -74,23 +74,22 @@
methods: { methods: {
handleShow(row) { handleShow(row) {
let cateType = row.workflow_.key; let cateType = row.workflow_.key;
let projectId = '', operation = null; let projectId = null;
if (cateType === 'visit') { if (cateType === 'visit') {
projectId = row.ticket_data.visit; projectId = row.ticket_data.visit;
} else if (cateType === 'rparty') { } else if (cateType === 'rpj') {
projectId = row.ticket_data.rpj; projectId = row.ticket_data.rpj;
} else { } else if(cateType.indexOf('opl_')!=-1){
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
projectId = row.ticket_data.opl; projectId = row.ticket_data.opl;
cateType = 'opl'
} }
this.$router.push({ this.$router.push({
name: "ticketdetail", name: "ticketdetail",
query: { query: {
id: row.id, id: row.id,
type: 'show', type: "show",
projectId: projectId, projectId: projectId,
catetype: cateType, catetype: cateType,
operation: operation
}, },
}); });
}, },