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){
var _arr = [];
var arr = str.split(",");
var arr = (str+"").split(",");
arr.forEach(item => {
if(item){
var urlArr = item.split('/');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -105,21 +105,22 @@
methods: {
//
handleDetail(row) {
let projectId = '', operation = null;
let catetype = row.workflow_.key;
if (catetype === 'visit') {
let cateType = row.workflow_.key;
let projectId = null;
if (cateType === '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;
operation = row.ticket_data.operation ? row.ticket_data.operation : null;
cateType = 'opl'
}
this.$router.push({
name: "ticketdetail",
query: {
id: row.id,
projectId: projectId,
catetype: row.workflow_.key,
operation: operation
catetype: cateType,
},
});
},

View File

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

View File

@ -16,6 +16,9 @@
<script>
export default {
name: "workstep",
props:{
ticket: { type: Object, default: () => {} },
},
data() {
return {
sort: 0,
@ -31,19 +34,17 @@ export default {
getFlowSteps() {
this.$API.wf.ticket.ticketFlowSteps.req(this.workId).then((res) => {
this.flowSteps = res;
this.$API.wf.ticket.ticketItem.req(this.workId).then((resp) => {
let state = resp.state;
let dat = this.flowSteps.filter((item) => {
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;
}
let state = this.ticket.state;
let dat = this.flowSteps.filter((item) => {
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;
}
});
},
},

View File

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

View File

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