bug修改

This commit is contained in:
曹前明 2022-09-26 15:55:52 +08:00
parent e068923bbe
commit 0bfd7a25e6
15 changed files with 226 additions and 90 deletions

View File

@ -50,12 +50,14 @@ const install = (Vue, vm) => {
let addNodeEnd = (id, data = {}) => vm.$u.get(`/wf/ticket/${id}/add_node_end/`, data); //加签处理
let deliver = (id, data = {}) => vm.$u.get(`/wf/ticket/${id}/deliver/`, data); //转交工单
let ticketHandle = (id, data = {}) => vm.$u.post(`/wf/ticket/${id}/handle/`, data); //工单处理
let ticketRetry = (id) => vm.$u.post(`/wf/ticket/${id}/retry_script/`, data); //工单重试
let ticketAccept = (id) => vm.$u.post(`/wf/ticket/${id}/accpet/`); //接单
let operationList = (data = {}) => vm.$u.get('/opm/operation/', data); //作业列表
let operationItem = (id) => vm.$u.get(`/opm/operation/${id}/`); //作业详情
let operationCreat = (data = {}) => vm.$u.post('/opm/operation/', data); //作业新建
let operationUpdate = (id, data = {}) => vm.$u.put(`/opm/operation/${id}/`, data); //作业编辑
let operationDelete = (id) => vm.$u.delete(`/opm/operation/${id}/`); //作业编辑
let oplItem = (id) => vm.$u.get(`/opm/opl/${id}/`); //opl作业许可证查询
let oplLists = (data = {}) => vm.$u.get('/opm/opl/', data); //作业许可证
let oplCate = (data = {}) => vm.$u.get('/opm/opl_cate/', data); //作业许可证类型
@ -66,7 +68,8 @@ const install = (Vue, vm) => {
let oplWorkerCreate = (data = {}) => vm.$u.post('/opm/opl_worker/', data); //作业许可证工作人员创建
let oplWorkerDelete = (id) => vm.$u.delete(`/opm/opl_worker/${id}/`); //作业许可证工作人员删除
let oplGasList = (data = {}) => vm.$u.get('/opm/gas_check/', data); //气体检测记录
let oplGasCreate = (data = {}) => vm.$u.post('/opm/gas_check/', data); //作业许可证类型
let oplGasCreate = (data = {}) => vm.$u.post('/opm/gas_check/', data); //气体监测记录创建
let oplGasDelete = (id) => vm.$u.delete(`/opm/gas_check/${id}`); //气体监测记录删除
let oplMtartMtask = (id) => vm.$u.post(`/opm/opl/${id}/start_mtask/`); //作业开始监控
let oplStopMtask = (id) => vm.$u.post(`/opm/opl/${id}/stop_mtask/`); //作业结束监控
@ -83,6 +86,7 @@ const install = (Vue, vm) => {
let rpjMemberDelete = (id) => vm.$u.post(`/rpm/rpj_member/${id}/`); //入厂项目工作人员删除
let areaLists = (data = {}) => vm.$u.get('/am/area/', data); //作业区域
let areaDetail = (id) => vm.$u.get(`/am/area/${id}/`); // 区域详情
let visitList = (data = {}) => vm.$u.get(`/vm/visit/`, data); //来访项目查询
let visitItem = (id) => vm.$u.get(`/vm/visit/${id}/`); //来访项目详情
@ -105,6 +109,7 @@ const install = (Vue, vm) => {
let eventtHandle = (id,data={}) => vm.$u.post(`/ecm/event/${id}/handle/`, data); //事件处理
let thirdBltBind = (data={}) => vm.$u.post(`/third/tdevice/blt_bind/`, data); //解绑卡
let tdevice = (data={}) => vm.$u.get(`/third/tdevice/`, data); //设备列表
vm.$u.api = {
getUserInfo ,
@ -131,6 +136,7 @@ const install = (Vue, vm) => {
workflowInit,
getTicketTransitions,
getTicketLog,
ticketRetry,
visitList,
visitItem,
@ -163,6 +169,7 @@ const install = (Vue, vm) => {
operationItem,
operationCreat,
operationUpdate,
operationDelete,
operationList,
oplLists,
oplItem,
@ -176,12 +183,14 @@ const install = (Vue, vm) => {
oplMtartMtask,
oplStopMtask,
oplWorkerDelete,
oplGasDelete,
hrmUserInfo,
hrmCertificate,
hrmUpdateInfo,
areaLists,
areaDetail,
eventList,
eventtItem,
@ -192,6 +201,7 @@ const install = (Vue, vm) => {
permissions,
thirdBltBind,
tdevice
};
}

View File

@ -2,8 +2,8 @@
"name" : "曲阳金隅EHS",
"appid" : "__UNI__B00D419",
"description" : "曲阳金隅EHS",
"versionName" : "1.00.09",
"versionCode" : 10009,
"versionName" : "1.00.11",
"versionCode" : 10011,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -64,7 +64,7 @@
<view class="img-view">
<image src="../../static/home/tongzhi.png" mode="" class="img"></image>
</view>
<text class="title-text-left">实时事件</text>
<text class="title-text-left">最近发生</text>
</view>
<view class="" @click="goIntoTargetPage('warning')">
<text class="title-text-right">查看更多</text>
@ -151,14 +151,15 @@
},
getEvent() {
let that = this;
let date = new Date();
let years = date.getFullYear();
let months = date.getMonth()+1;
let days = date.getDate();
that.eventList = []
// let date = new Date();
// let years = date.getFullYear();
// let months = date.getMonth() + 1;
// let days = date.getDate();
// that.eventList = []
let params = {
page: 1,
start_create: years+'-'+months+'-'+days
page_size: 2,
ordering: '-create_time'
};
that.$u.api.eventList(params).then(res => {
let eventList = res.results.filter(item => {

View File

@ -48,7 +48,7 @@
关闭
</view>
<view class="shenhezhong bottom-btn" @click="ticketHandle(val,'handle')"
v-if="vuex_user.id===scope.row.create_by&&val.state_.type!==1&&val.state_.enable_retreat">
v-if="vuex_user.id===val.create_by&&val.state_.type!==1&&val.state_.enable_retreat">
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
撤回
</view>
@ -57,6 +57,10 @@
<image src="../../../static/my/my_apply/tongguo.png" mode=""></image>
查看
</view>
<view class="shenhejieshu bottom-btn" @click="ticketHandle(val,'retry')" v-if="val.script_run_last_result===false">
<image src="../../../static/my/my_apply/orange-time.png" mode=""></image>
重试
</view>
</view>
</view>
</view>
@ -126,10 +130,18 @@
projectId = row.ticket_data.opl;
cateType = 'opl'
}
if(type=='retry'){
that.$u.api.ticketRetry(row.id).then(res => {
uni.showToast({
title: '重试下发成功'
})
})
}else{
const params = `?ticketId=${row.id}&projectId=${projectId}&cateType=${cateType}&type=${type}`;
uni.navigateTo({
url: '../detail/ticketHandle' + params,
})
}
},
//

View File

@ -61,11 +61,9 @@
},
saveVisitor(){
this.$u.api.visitorCreate(this.formData).then(res=>{
if(res.err_msg){}else{
uni.navigateTo({
url: '/pages/workSpace/visit/vpeopleList'
uni.navigateBack({
delta: 1
})
}
})
},
goBack() {

View File

@ -4,16 +4,22 @@
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
<view class="apply-info">
<view class="row" v-for="(row,index) in gasCheckList" :key="index" @tap="select(row)">
<view class="center">
<view class="name-tel">
<view class="center" style="display: flex;">
<view class="name-tel" style="width: 80%;">
<view class="name">检测部位{{row.check_place}}</view>
<view class="tel">O₂(%){{row.o2}}</view>
<view class="tel">CO{{row.co}}</view>
<view class="tel">可燃气体(V%LEL){{row.lel}}</view>
<view class="tel">检验结论{{row.is_ok}}</view>
<view class="tel">检验结论
<span v-if="row.is_ok">正常</span>
<span v-else>异常</span>
</view>
<view class="tel">检测人{{row.checker_.name}}</view>
<view class="tel">检验时间{{row.check_time}}</view>
</view>
<view style="width: 20%;">
<button type="warn" size="mini" @click="remove(row)" >X</button>
</view>
</view>
<view class="right">
<view class="icon bianji" @tap.stop="edit(row)">
@ -32,7 +38,7 @@
<form @submit="formSubmit">
<view class="uni-form-item">
<view class="title">检测时间</view>
<uni-datetime-picker v-model="formData.check_time" :border="false" />
<uni-datetime-picker v-model="formData.check_time" type="datetime" :hide-second="true"/>
<!-- <picker mode="date" :value="formData.check_time" class="content" @change="timeChange">
<view class="uni-input">{{formData.check_time}}</view>
</picker> -->
@ -99,7 +105,7 @@
limitedDialog: false,
formData: {
opl: '',
check_time: '选择日期',
check_time: null,
check_place:'',
o2:'',
co:'',
@ -125,6 +131,11 @@
this.getInit();
},
methods: {
remove(row){
this.$u.api.oplGasDelete(row.id).then(res => {
this.getGasCheckList()
})
},
timeChange(e){
// debugger;
console.log(e.detail.value)
@ -309,12 +320,12 @@
}
.dialogCont {
width: 80vw;
width: 92vw;
position: absolute;
top: 50%;
margin: auto;
background-color: #ffffff;
left: 10vw;
left: 4vw;
transform: translateY(-50%);
padding: 20rpx;
border-radius: 20rpx;

View File

@ -13,7 +13,7 @@
<view class="form-content ">
<view class="form-item border-bottom">
<view class="form-left">
<text class="star">*</text>
<!-- <text class="star">*</text> -->
<text class="form-left-text">具体地点</text>
</view>
<view class="form-right">
@ -23,19 +23,17 @@
<view class="form-item border-bottom">
<view class="form-left">
<text class="star">*</text>
<text class="form-left-text">开始时间</text>
<text class="form-left-text">作业时间</text>
</view>
<view class="form-right form-date">
<uni-datetime-picker v-model="formData.start_time" :border="false" />
</view>
</view>
<view class="form-item border-bottom">
<view class="form-left">
<text class="star">*</text>
<text class="form-left-text">结束时间</text>
</view>
<view class="form-right form-date">
<uni-datetime-picker v-model="formData.end_time" :border="false" />
<uni-datetime-picker
v-model="datetimerange"
type="datetimerange"
rangeSeparator="至"
:hide-second="true"
/>
</view>
</view>
</view>
<view class="form-item border-bottom">
@ -55,7 +53,7 @@
<text class="form-left-text">作业区域</text>
</view>
<view class="form-right">
<uni-data-select v-model="formData.area" :localdata="range">
<uni-data-select v-model="formData.area" :localdata="range" @change="areaChange">
</uni-data-select>
</view>
</view>
@ -68,6 +66,18 @@
</uni-data-select>
</view>
</view>
<view class="form-item border-bottom">
<view class="form-left">
<text class="star">*</text>
<text class="form-left-text">属地部门</text>
</view>
<view class="form-right">
<uni-data-picker placeholder="请选择属地部门" popup-title="请选择属地部门" :localdata="depRange"
v-model="formData.dept_ter" @change="onchange" @nodeclick="onnodeclick"
@popupopened="onpopupopened" @popupclosed="onpopupclosed">
</uni-data-picker>
</view>
</view>
<view class="form-item border-bottom">
<view class="form-left">
<text class="star">*</text>
@ -90,20 +100,6 @@
</uni-data-select>
</view>
</view>
<view class="form-item border-bottom">
<view class="form-left">
<text class="star">*</text>
<text class="form-left-text">属地部门</text>
</view>
<view class="form-right">
<uni-data-picker placeholder="请选择属地部门" popup-title="请选择属地部门" :localdata="depRange"
v-model="formData.dept_ter" @change="onchange" @nodeclick="onnodeclick"
@popupopened="onpopupopened" @popupclosed="onpopupclosed">
</uni-data-picker>
</view>
</view>
<view class="btn" v-if="showBtns">
<button type="primary" class="save-btn" @click="saveSubmit">下一步</button>
</view>
@ -127,12 +123,12 @@
start_time: '', //
end_time: '', //
state_work: '', //
belong_dept: '', //
area: '', //
area: null, //
dept_ter: '', //
dept_bus: '', //
coordinator: '', //
},
datetimerange: [],
userRange: [],
vchannelOptions: [],
//
@ -155,6 +151,12 @@
depRange: [],
}
},
watch: {
datetimerange(newval) {
this.formData.start_time = this.datetimerange[0]
this.formData.end_time = this.datetimerange[1]
},
},
onLoad(params) {
debugger;
if(params.operationId){
@ -178,12 +180,45 @@
this.range = [];
},
methods: {
areaChange(val) {
this.getVchannelOptions(val)
this.getAreaDept(val)
},
getVchannelOptions(val) {
if(val==null || val==''){
return
}
this.$u.api.tdevice({area: val, type: 60, page: 0}).then(res=>{
let vchannelOptions = [];
let obj = {};
res.forEach(item => {
obj = {
value: null,
text: ''
};
obj.value = item.id;
obj.text = item.name;
vchannelOptions.push(obj);
})
this.vchannelOptions = vchannelOptions
})
},
getAreaDept(val){
console.log(val)
if(val==null || val==''){
return
}
this.$u.api.areaDetail(val).then(res=>{
this.formData.dept_ter = res.belong_dept
})
},
//operation
getOperation() {
debugger;
let that = this;
that.$u.api.operationItem(that.operationId).then((res) => {
that.formData.id = res.id; //
that.formData.state = res.state;
that.formData.name = res.name; //
that.formData.place = res.place; //
that.formData.state_work = res.state_work; //
@ -193,9 +228,11 @@
that.formData.dept_ter = res.dept_ter; //
that.formData.start_time = res.start_time; //
that.formData.end_time = res.end_time; //
if(res.vchannels){
that.formData.vchannel = res.vchannels[0]
}
that.operationName = res.name; //
console.log(res);
debugger;
that.datetimerange = [res.start_time, res.end_time]
});
},
saveSubmit() {
@ -203,12 +240,16 @@
if (!that.paramsCheck()) {
return;
} else {
if(this.formData.vchannel){
this.formData.vchannels = [this.formData.vchannel]
}
if(this.formData.id){
if(this.formData.state!=10){
uni.navigateTo({
url: '/pages/workSpace/operation/oplCate?operationId='+this.formData.id
})
}else{
this.$u.api.operationUpdate(this.formData.id,this.formData).then(res => {
let params = `?operationId=${res.id}`;
uni.navigateTo({
@ -232,8 +273,6 @@
let that = this;
that.$u.api.deptList({page: 0}).then(res => {
that.depRange = that.redata(res);
console.log(that.depRange)
})
},
//
@ -289,7 +328,6 @@
parent.children = parent.children ? parent.children : [];
parent.children.push(item);
}
console.log(arr);
return arr;
},

View File

@ -55,7 +55,11 @@
<image src="../../../static/my/my_apply/tongguo.png" mode=""></image>
查看
</view>
<view class="shenhezhong shenhe-status" @click="operationWarning(val)" style="color: orange;">
<view class="shenhezhong shenhe-status" @click="operationHandle(val,'delete')" v-if="val.state===10&&dataTypye==='isMy'" style="color: #ff0000;">
<image src="../../../static/my/my_apply/return.png" mode=""></image>
删除
</view>
<view class="shenhezhong shenhe-status" @click="operationWarning(val)" style="color: orange;" v-if="val.state===30||val.state===40">
<image src="../../../static/my/my_apply/orange-time.png" mode=""></image>
新增违规
</view>
@ -114,7 +118,7 @@
//
onPullDownRefresh() {
this.params.pageNum = 1;
this.ticketList = [];
this.lists = [];
this.getLists();
},
methods: {
@ -126,11 +130,18 @@
})
},
operationHandle(val,type) {
if (type=='delete'){
this.$u.api.operationDelete(val.id).then(res => {
this.resetSearch()
})
}else{
let operation = val.id;//id
const params = `?operationId=${val.id}&type=${type}`;
uni.navigateTo({
url: '/pages/workSpace/operation/operationCreate' + params,
})
}
},
operationDetail(val){
let operation = val.id;//id

View File

@ -107,7 +107,8 @@
<text class="visitorCell">{{item1.check_place}}</text>
<text class="visitorCell"></text>
<text class="visitorCell">
<span v-if="item1.is_ok">正常</span>
<span v-else>异常</span>
</text>
</view>
</view>

View File

@ -172,9 +172,7 @@
risks_checked: [],
measures_checked: [],
},
header: {
Authorization: "Bearer " + this.vuex_token
},
header: {},
oplId: null,
operationName: '',
oplCateName: '',
@ -209,6 +207,9 @@
if (params.oplId) {
this.oplId = params.oplId;
this.formData.id = params.oplId;
}else{
console.log('s', this.vuex_user.belong_dept)
this.formData.dept_do = this.vuex_user.belong_dept
}
this.formData.cate = this.oplcateId;
this.formData.operation = this.operationId;
@ -223,6 +224,11 @@
this.getHeader();
},
methods: {
getHeader() {
this.header = {
Authorization: "Bearer " + this.vuex_token
}
},
//operation
getOperation() {
let that = this;
@ -415,7 +421,7 @@
} else {
that.$u.api.oplCreate(that.formData).then(res => {
uni.hideLoading();
params = `?oplId=${res.oplId}`;
params = `?oplId=${res.id}`;
uni.navigateTo({
url: '/pages/workSpace/operation/workerList' + params
})

View File

@ -48,7 +48,7 @@
</view>
</view>
<view class="wrap-view wrap-top">
<view class="item title"> <text class="blueLine"></text>证书</view>
<view class="item title"> <text class="blueLine"></text>资料</view>
<view class="filesWrap" v-if="certificateList.length>0">
<view class="filesItem itemTitle">
<text class="fileCell leftFileCell">资质内容</text>
@ -68,7 +68,7 @@
</view>
</view>
<view v-else style="text-align: center;">暂无相关证书</view>
<view v-else style="text-align: center;">暂无相关资料</view>
</view>
<view class="wrap-view wrap-top">
<view class="item title"> <text class="blueLine"></text>作业人员</view>
@ -108,6 +108,14 @@
},
workerList:[],
certificateList:[],
stateOptions: {
10: "创建中",
20: "审批中",
30: "待入厂",
40: "进行中",
50: "已完成",
60: "已关闭",
},
act_states: {
0: "草稿中",
1: "进行中",

View File

@ -40,16 +40,20 @@
<view class="center-info">
<view class="info-details">相关方{{val.rparty_name}}</view>
<view class="info-details">合同编号{{val.contract_number}} </view>
<view class="info-details">状态{{stateOptions[val.state]}}</view>
<view class="info-details">作业类型{{typeOptions[val.type]}} </view>
<view class="info-details">所属部门{{val.belong_dept_name}} </view>
<view class="info-details">入厂时间{{val.come_time}} </view>
<view class="info-details">离厂时间{{val.leave_time}} </view>
<view class="info-details">入厂时间{{val.come_time}}-{{val.leave_time}} </view>
</view>
<view class="bottom-btns">
<view class="shenhezhong shenhe-status" @click="rpjHandle(val,'edit')" v-if="val.state===10&&dataTypye==='isMy'">
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
编辑
</view>
<view class="shenhezhong shenhe-status" @click="rpjHandle(val,'delete')" v-if="val.state===10&&dataTypye==='isMy'" style="color: #ff0000;">
<image src="../../../static/my/my_apply/return.png" mode=""></image>
删除
</view>
<view class="shenhezhong shenhe-status" @click="rpjDetail(val)"
style="color: #15a306;">
<image src="../../../static/my/my_apply/tongguo.png" mode=""></image>
@ -78,9 +82,10 @@
stateOptions: {
10: "创建中",
20: "审批中",
30: "待作业",
40: "作业中",
50: "已关闭",
30: "待入厂",
40: "进行中",
50: "已完成",
60: "已关闭",
},
typeOptions: {
10: "建筑施工",
@ -120,7 +125,7 @@
//
onPullDownRefresh() {
this.params.pageNum = 1;
this.ticketList = [];
this.lists = [];
this.getLists();
},
methods: {
@ -132,10 +137,18 @@
})
},
rpjHandle(val, type) {
if(type=='delete'){
this.$u.api.rpjDelete(val.id).then(res => {
this.resetSearch()
})
}else{
const params = `?rpj=${val.id}&type=${type}`;
uni.navigateTo({
url: '/pages/workSpace/rpj/rpjCreate' + params,
})
}
},
rpjDetail(val){
const params = `?rpjId=${val.id}`;

View File

@ -113,8 +113,8 @@
},
//
onPullDownRefresh() {
this.pageNum = 1;
this.ticketList = [];
this.params.pageNum = 1;
this.lists = [];
this.getLists();
},
methods: {
@ -137,9 +137,7 @@
})
}else if(type=='delete'){
this.$u.api.visitDelete(val.id).then(res => {
this.pageNum = 1;
this.ticketList = [];
this.getLists();
this.resetSearch()
})
}

View File

@ -79,6 +79,7 @@
</view>
</view>
</view>
<button type="warn" class="backCard" @click="bindBtl">退卡</button>
</view>
</template>
@ -119,6 +120,22 @@
this.limitedOperation = this.vuex_perm.includes('operation.create')>-1||this.vuex_perm.includes('superuser')>-1;
},
methods: {
bindBtl(){
let that = this;
uni.scanCode({
success: function (res) {
let form = {};
form.type = 20;
form.code = res.result;
that.$u.api.thirdBltBind(form).then(res=>{
uni.showToast({
title: res,
icon: "none"
})
})
}
});
},
goInto(index) {
if (index == 0) {
uni.navigateTo({
@ -460,4 +477,15 @@
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
}
.backCard {
width: 100px;
height: 48px;
border-radius: 25px;
line-height: 48px;
box-shadow: 0 0 6px 2px rgba(255, 170, 0, 0.3);
z-index: 100;
position: fixed;
bottom: 80px;
right: 20px;
}
</style>

View File

@ -40,6 +40,7 @@ const store = new Vuex.Store({
// vuex_host: 'http://222.222.144.147:6013',
// vuex_api: 'http://222.222.144.147:6013/api',
// vuex_apifile: 'http://222.222.144.147:6013/api/file/',
// vuex_api: 'http://127.0.0.1:8000/api',
vuex_host: 'http://10.99.5.79:20309',
vuex_api: 'http://10.99.5.79:20309/api',
vuex_apifile: 'http://10.99.5.79:20309/api/file/',