opl 页面调整
This commit is contained in:
parent
b1eaf35a69
commit
4375778c3b
|
|
@ -45,6 +45,7 @@ const install = (Vue, vm) => {
|
||||||
let getTicketLog = (id) => vm.$u.get(`/wf/ticket/${id}/flowlogs/`); //工单日志
|
let getTicketLog = (id) => vm.$u.get(`/wf/ticket/${id}/flowlogs/`); //工单日志
|
||||||
let getTicketTransitions = (id) => vm.$u.get(`/wf/ticket/${id}/transitions/`); //工单按钮查询
|
let getTicketTransitions = (id) => vm.$u.get(`/wf/ticket/${id}/transitions/`); //工单按钮查询
|
||||||
let workflowInit = (key) => vm.$u.get(`/wf/workflow/${key}/init_key/`); //工单按钮查询
|
let workflowInit = (key) => vm.$u.get(`/wf/workflow/${key}/init_key/`); //工单按钮查询
|
||||||
|
let workflowInitId = (id) => vm.$u.get(`/wf/workflow/${id}/init/`); //工单按钮查询
|
||||||
let ticketDutyAgg = (data = {}) => vm.$u.get(`/wf/ticket/duty_agg/`,data); //工单待办聚合
|
let ticketDutyAgg = (data = {}) => vm.$u.get(`/wf/ticket/duty_agg/`,data); //工单待办聚合
|
||||||
|
|
||||||
let addNode = (id, data = {}) => vm.$u.get(`/wf/ticket/${id}/add_node/`, data); //加签
|
let addNode = (id, data = {}) => vm.$u.get(`/wf/ticket/${id}/add_node/`, data); //加签
|
||||||
|
|
@ -137,6 +138,7 @@ const install = (Vue, vm) => {
|
||||||
getTickets,
|
getTickets,
|
||||||
getTicketItem,
|
getTicketItem,
|
||||||
workflowInit,
|
workflowInit,
|
||||||
|
workflowInitId,
|
||||||
getTicketTransitions,
|
getTicketTransitions,
|
||||||
getTicketLog,
|
getTicketLog,
|
||||||
ticketRetry,
|
ticketRetry,
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@
|
||||||
<button type="primary" plain="true" style="width: 25%;" @click="goBack">上一步</button>
|
<button type="primary" plain="true" style="width: 25%;" @click="goBack">上一步</button>
|
||||||
<button v-for=" item in initform.transitions" :key="item.id" @click="submitticket(item.id)" type="primary" style="width: 25%;">{{item.name}}
|
<button v-for=" item in initform.transitions" :key="item.id" @click="submitticket(item.id)" type="primary" style="width: 25%;">{{item.name}}
|
||||||
</button>
|
</button>
|
||||||
<button plain="true" style="width: 25%;" @click="nexStep">退出</button>
|
<button plain="true" style="width: 25%;" @click="goOut">退出</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -102,6 +102,8 @@
|
||||||
name: "gasList",
|
name: "gasList",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
oplId: null,
|
||||||
|
oplCateCode: null,
|
||||||
limitedDialog: false,
|
limitedDialog: false,
|
||||||
formData: {
|
formData: {
|
||||||
opl: '',
|
opl: '',
|
||||||
|
|
@ -122,6 +124,7 @@
|
||||||
},
|
},
|
||||||
onLoad(params) {
|
onLoad(params) {
|
||||||
this.oplId = params.oplId;
|
this.oplId = params.oplId;
|
||||||
|
this.oplCateCode = params.oplCateCode;
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.gasCheckList = [];
|
this.gasCheckList = [];
|
||||||
|
|
@ -210,14 +213,14 @@
|
||||||
},
|
},
|
||||||
edit(row) {},
|
edit(row) {},
|
||||||
|
|
||||||
nexStep() {
|
goOut() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/workSpace/operation/operationList'
|
url: '/pages/workSpace/operation/operationList'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getInit() {
|
getInit() {
|
||||||
this.$u.api.workflowInit('opl_fire').then((res) => {
|
this.$u.api.workflowInit('opl_'+ this.oplCateCode).then((res) => {
|
||||||
this.initform = res;
|
this.initform = res;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
@ -231,7 +234,7 @@
|
||||||
opl: that.oplId
|
opl: that.oplId
|
||||||
};
|
};
|
||||||
ticket.transition = id;
|
ticket.transition = id;
|
||||||
ticket.title = that.oplDetail.operation_.name + that.oplDetail.cate_name + '申请';
|
ticket.title = that.oplDetail.operation_.name + '-' + that.oplDetail.cate_name + '-申请';
|
||||||
that.$u.api.ticketCreate(ticket).then((res) => {
|
that.$u.api.ticketCreate(ticket).then((res) => {
|
||||||
if (res.err_msg) {} else {
|
if (res.err_msg) {} else {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
|
|
|
||||||
|
|
@ -56,9 +56,10 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="apply-info" style="min-height: fit-content;display: flex;">
|
<view class="apply-info" style="min-height: fit-content;display: flex;">
|
||||||
|
|
||||||
<button type="primary" plain="true" style="width: 25%;" @click="goBack">上一步</button>
|
<button type="primary" plain="true" style="width: 25%;" @click="goBack">上一步</button>
|
||||||
<button type="primary" style="width: 25%;" @click="nexStep">下一步</button>
|
<button v-for=" item in initform.transitions" :key="item.id" @click="submitticket(item.id)" type="primary" style="width: 25%;" v-if="!showN">{{item.name}}
|
||||||
|
</button>
|
||||||
|
<button type="primary" style="width: 25%;" @click="nexStep" v-if="showN">下一步</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -69,7 +70,10 @@
|
||||||
name: "workerList",
|
name: "workerList",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
oplId: null,
|
||||||
|
oplCateCode: null,
|
||||||
limitedPeople: false,
|
limitedPeople: false,
|
||||||
|
showN: false,
|
||||||
formData: {
|
formData: {
|
||||||
opl: '',
|
opl: '',
|
||||||
worker: '',
|
worker: '',
|
||||||
|
|
@ -105,6 +109,9 @@
|
||||||
},
|
},
|
||||||
onLoad(params) {
|
onLoad(params) {
|
||||||
this.oplId = params.oplId;
|
this.oplId = params.oplId;
|
||||||
|
this.oplCateCode = params.oplCateCode;
|
||||||
|
this.showNext()
|
||||||
|
this.getInit()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.workerList = [];
|
this.workerList = [];
|
||||||
|
|
@ -113,6 +120,11 @@
|
||||||
// this.getVpeopleList();
|
// this.getVpeopleList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showNext(){
|
||||||
|
if(["fire", "space", "cooler"].indexOf(this.oplCateCode)!=-1){
|
||||||
|
this.showN = true
|
||||||
|
}
|
||||||
|
},
|
||||||
formSubmit(val) {
|
formSubmit(val) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.formData.opl = that.oplId;
|
that.formData.opl = that.oplId;
|
||||||
|
|
@ -204,12 +216,18 @@
|
||||||
edit(row) {},
|
edit(row) {},
|
||||||
|
|
||||||
nexStep(){
|
nexStep(){
|
||||||
let params = `?oplId=${this.oplId}`;
|
let params = `?oplId=${this.oplId}&oplCateCode=${this.oplCateCode}`;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/workSpace/operation/gasList'+params
|
url: '/pages/workSpace/operation/gasList'+params
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getInit() {
|
||||||
|
this.$u.api.workflowInit('opl_'+ this.oplCateCode).then((res) => {
|
||||||
|
this.initform = res;
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
//提交工单
|
//提交工单
|
||||||
submitticket(id) {
|
submitticket(id) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -219,14 +237,15 @@
|
||||||
opl: that.oplId
|
opl: that.oplId
|
||||||
};
|
};
|
||||||
ticket.transition = id;
|
ticket.transition = id;
|
||||||
|
ticket.title = that.oplDetail.operation_.name + '-' + that.oplDetail.cate_name + '申请';
|
||||||
that.$u.api.ticketCreate(ticket).then((res) => {
|
that.$u.api.ticketCreate(ticket).then((res) => {
|
||||||
if (res.err_msg) {} else {
|
if (res.err_msg) {} else {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/workSpace/workSpace'
|
url: '/pages/workSpace/operation/operationList'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -174,6 +174,7 @@
|
||||||
},
|
},
|
||||||
header: {},
|
header: {},
|
||||||
oplId: null,
|
oplId: null,
|
||||||
|
oplCateCode: null,
|
||||||
operationName: '',
|
operationName: '',
|
||||||
oplCateName: '',
|
oplCateName: '',
|
||||||
fileList: [],
|
fileList: [],
|
||||||
|
|
@ -207,17 +208,18 @@
|
||||||
if (params.oplId) {
|
if (params.oplId) {
|
||||||
this.oplId = params.oplId;
|
this.oplId = params.oplId;
|
||||||
this.formData.id = params.oplId;
|
this.formData.id = params.oplId;
|
||||||
|
this.getOplDetail()
|
||||||
}else{
|
}else{
|
||||||
console.log('s', this.vuex_user.belong_dept)
|
console.log('s', this.vuex_user.belong_dept)
|
||||||
this.formData.dept_do = this.vuex_user.belong_dept
|
this.formData.dept_do = this.vuex_user.belong_dept
|
||||||
|
this.formData.cate = this.oplcateId;
|
||||||
|
this.formData.operation = this.operationId;
|
||||||
|
this.getOperation();
|
||||||
}
|
}
|
||||||
this.formData.cate = this.oplcateId;
|
|
||||||
this.formData.operation = this.operationId;
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
debugger;
|
debugger;
|
||||||
this.getOperation();
|
|
||||||
this.getOplcates();
|
|
||||||
this.getdept();
|
this.getdept();
|
||||||
this.getRange();
|
this.getRange();
|
||||||
this.getUserRange();
|
this.getUserRange();
|
||||||
|
|
@ -236,17 +238,18 @@
|
||||||
that.formData.start_time = res.start_time; //作业开始时间
|
that.formData.start_time = res.start_time; //作业开始时间
|
||||||
that.formData.end_time = res.end_time; //作业结束时间
|
that.formData.end_time = res.end_time; //作业结束时间
|
||||||
that.operationName = res.name; //作业
|
that.operationName = res.name; //作业
|
||||||
console.log(res);
|
this.getOplcates()
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// getOplDetail(){
|
getOplDetail(){
|
||||||
// let that = this;
|
let that = this;
|
||||||
// that.$u.api.oplItem(that.oplId).then((res) => {
|
that.$u.api.oplItem(that.oplId).then((res) => {
|
||||||
// that.formData = res; //作业开始时间
|
that.formData = res; //作业开始时间
|
||||||
// debugger;
|
that.operationName = res.operation_.name
|
||||||
// console.log(res);
|
this.getOplcates()
|
||||||
// });
|
});
|
||||||
// },
|
|
||||||
|
},
|
||||||
//根据作业许可证类别ID获取,风险、措施===>作业许可证类别详情
|
//根据作业许可证类别ID获取,风险、措施===>作业许可证类别详情
|
||||||
getOplcates() {
|
getOplcates() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -255,57 +258,42 @@
|
||||||
that.risklist = [];
|
that.risklist = [];
|
||||||
that.measurelist = [];
|
that.measurelist = [];
|
||||||
that.oplCateName = res.name;
|
that.oplCateName = res.name;
|
||||||
that.oplcateCode = res.code;
|
that.oplCateCode = res.code;
|
||||||
let risklist = res.risk_options_;
|
let risklist = res.risk_options_;
|
||||||
let measurelist = res.measure_options_;
|
let measurelist = res.measure_options_;
|
||||||
if (that.oplId !== null) {
|
|
||||||
that.editCheckShow(risklist, measurelist);
|
|
||||||
} else {
|
|
||||||
risklist.forEach(item => {
|
|
||||||
let obj = {};
|
|
||||||
obj = item;
|
|
||||||
obj.checked = false;
|
|
||||||
that.risklist.push(obj)
|
|
||||||
})
|
|
||||||
measurelist.forEach(item => {
|
|
||||||
let obj = {};
|
|
||||||
obj = item;
|
|
||||||
obj.checked = false;
|
|
||||||
that.measurelist.push(obj)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
editCheckShow(risklist, measurelist) {
|
|
||||||
debugger;
|
|
||||||
let that = this;
|
|
||||||
that.$u.api.oplItem(that.oplId).then((res) => {
|
|
||||||
that.formData = res; //作业开始时间
|
|
||||||
risklist.forEach(item => {
|
risklist.forEach(item => {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj = item;
|
obj = item;
|
||||||
if (res.risks_checked.indexOf(item.id) > -1) {
|
obj.checked = false;
|
||||||
obj.checked = true;
|
|
||||||
} else {
|
|
||||||
obj.checked = false;
|
|
||||||
}
|
|
||||||
that.risklist.push(obj)
|
that.risklist.push(obj)
|
||||||
})
|
})
|
||||||
|
|
||||||
measurelist.forEach(item => {
|
measurelist.forEach(item => {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj = item;
|
obj = item;
|
||||||
if (res.measures_checked.indexOf(item.id) > -1) {
|
obj.checked = false;
|
||||||
obj.checked = true;
|
|
||||||
} else {
|
|
||||||
obj.checked = false;
|
|
||||||
}
|
|
||||||
that.measurelist.push(obj)
|
that.measurelist.push(obj)
|
||||||
})
|
})
|
||||||
debugger;
|
this.editCheckShow()
|
||||||
console.log(res);
|
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
editCheckShow() {
|
||||||
|
debugger;
|
||||||
|
let that = this;
|
||||||
|
that.risklist.forEach(item => {
|
||||||
|
if (this.formData.risks_checked.indexOf(item.id) > -1) {
|
||||||
|
item.checked = true;
|
||||||
|
} else {
|
||||||
|
item.checked = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
that.measurelist.forEach(item => {
|
||||||
|
if (this.formData.measures_checked.indexOf(item.id) > -1) {
|
||||||
|
item.checked = true;
|
||||||
|
} else {
|
||||||
|
item.checked = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//获取作业区域
|
//获取作业区域
|
||||||
getRange() {
|
getRange() {
|
||||||
|
|
@ -412,7 +400,7 @@
|
||||||
if (that.oplId !== null) {
|
if (that.oplId !== null) {
|
||||||
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
|
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
params = `?oplId=${that.oplId}`;
|
params = `?oplId=${that.oplId}&oplCateCode=${that.oplCateCode}`;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/workSpace/operation/workerList' + params
|
url: '/pages/workSpace/operation/workerList' + params
|
||||||
})
|
})
|
||||||
|
|
@ -421,7 +409,7 @@
|
||||||
} else {
|
} else {
|
||||||
that.$u.api.oplCreate(that.formData).then(res => {
|
that.$u.api.oplCreate(that.formData).then(res => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
params = `?oplId=${res.id}`;
|
params = `?oplId=${res.id}&oplCateCode=${that.oplCateCode}`;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/workSpace/operation/workerList' + params
|
url: '/pages/workSpace/operation/workerList' + params
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -184,16 +184,20 @@
|
||||||
//部门
|
//部门
|
||||||
depRange: [],
|
depRange: [],
|
||||||
leveloptions: [{
|
leveloptions: [{
|
||||||
value: "特殊动火",
|
value: "特级",
|
||||||
text: "特殊动火"
|
text: "特级:>30米"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "一级动火",
|
value: "三级",
|
||||||
text: "一级动火"
|
text: "三级:15-30米"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "二级动火",
|
value: "二级",
|
||||||
text: "二级动火"
|
text: "二级:>5-15米"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "一级",
|
||||||
|
text: "一级:1.8-5米"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue