[流程调试,问题修复]

- 相关方App端 安全环保检查流程调试
mengfanliang-dev-pitfall
huangyuxuan 2024-09-04 16:48:26 +08:00
parent 5aca35552e
commit 9eb6b71628
11 changed files with 154 additions and 163 deletions

View File

@ -142,7 +142,7 @@ export const getHiddenPositionTree = (params) =>
post("/app/hidden/getTreehiddenRegionListAll", params);
/** 部门树 */
export const getDepartmentTree = (params) => post("/app/sys/listTree", params);
export const getDepartmentTree = (params) => post("/app/corpDepartment/listzTree", params);
/** 人员 */
export const getPersonnelList = (params) => post("/app/sys/listUser", params);

View File

@ -3,7 +3,7 @@
<view class="tki-tree-mask" :class="{'show':showTree}" @tap="_cancel"></view>
<view class="tki-tree-cnt" :class="{'show':showTree}">
<view class="tki-tree-bar">
<view class="tki-tree-bar-cancel" :style="{'color':cancelColor}" hover-class="hover-c" @tap="_cancel"></view>
<view class="tki-tree-bar-cancel" :style="{'color':cancelColor}" hover-class="hover-c" @tap="_cancel">41</view>
<view class="tki-tree-bar-title" :style="{'color':titleColor}">{{title}}</view>
<view class="tki-tree-bar-confirm" :style="{'color':confirmColor}" hover-class="hover-c" @tap="_confirm"></view>
</view>

View File

@ -1,37 +1,23 @@
import { post, upload, uploads } from "../../utils/request";
/** 获取监管端的部门的人员 */
export const getDeptUser = (params) =>
post("/AppUser/listAllManageAndCorp", { loading: false, ...params });
export const getDeptUser = (params) => post("/app/user/listAll", {loading: false, ...params});
/** 获取隐患级别 */
export const getHiddenLevel = () =>
post("/app/dictionaries/listSelectTree", {
loading: false,
DICTIONARIES_ID: "5e7cf8620ba54ad89719d0be62133c7a",
});
export const getHiddenLevel = () => post("/app/dictionaries", {loading: false, DICTIONARIES_ID: '5e7cf8620ba54ad89719d0be62133c7a'});
/** 获取隐患部位 */
export const getHiddenRegion = (params) =>
post("/app/hiddenRegion/gerRegionList", { loading: false, ...params });
/** 获取隐患类型 */
export const getHiddenType = () =>
post("/app/dictionaries/listSelectTree", {
loading: false,
DICTIONARIES_ID: "3babc15144444bdc8d763d0af2bdfff6",
});
export const getHiddenType = () => post("/app/dictionaries", {loading: false, DICTIONARIES_ID: '3babc15144444bdc8d763d0af2bdfff6'});
/** 获取被检查部门 */
export const getInspectedDepartment = (params) =>
post("/app/corpDepartment/listTreeCorpDept", { loading: false, ...params });
export const getInspectedDepartment = (params) => post("/app/corpDepartment/listzTree", {loading: false, CORPINFO_ID: params});
/** 获取检查部门 */
export const getInspectionDepartment = (params) =>
post("/app/corpDepartment/listTreeManageAndCorp", {
loading: false,
...params,
});
export const getInspectionDepartment = (params) => post("/app/corpDepartment/listzTree", {loading: false, CORPINFO_ID: params});
/** 获取检查类型 */
export const getInspectionType = () =>
@ -41,12 +27,10 @@ export const getInspectionType = () =>
});
/** 获取检查人员 */
export const getInspectors = (params) =>
post("/AppUser/listAllManageAndCorp", { loading: false, ...params });
export const getInspectors = (params) => post("/app/user/listAll", {loading: false, ...params});
/** 安全环保检查明细信息 */
export const getSafetyenvironmentalGoEdit = (params) =>
post("/app/safetyenvironmental/goEdit", params);
export const getSafetyenvironmentalGoEdit = (params) => post("/app/safetyenvironmental/goShow", params);
/** 上传图片 */
export const setImgFilesAdd = (params) =>
@ -57,8 +41,7 @@ export const setSafetyenvironmentalAdd = (params) =>
post("/app/safetyenvironmental/add", params);
/** 安全环保检查检查人确认 */
export const setSafetyenvironmentalVerify = (params) =>
upload("/app/safetyenvironmentalinspector/verify", params);
export const setSafetyenvironmentalVerify = (params) => upload("/app/safetyenvironmental/verify", params);
/** 新增安全环保检查 - plus */
export const setSafetyenvironmentalAdd_plus = (params) =>
@ -81,8 +64,7 @@ export const setSafetyenvironmentalExplain = (params) =>
post("/app/safetyenvironmental/explain", params);
/** 设置安全环境流程 */
export const setSafetyenvironmentalFlow = (params) =>
post("/app/safetyenvironmental/showFlowChart", params);
export const setSafetyenvironmentalFlow = (params) => post("/app/safetyenvironmental/getFlow", params);
/** 修改安全环保检查 - plus */
export const setSafetyenvironmentalEdit_plus = (params) =>
@ -99,9 +81,8 @@ export const setVideoAdd = (params) => upload("/app/imgfiles/add", params);
export const getSafetyenvironmentalList = (params) =>
post("/app/safetyenvironmental/list", params);
/** 获取安全环保检查列表 */
export const getpleadList = (params) =>
post("/app/safetyenvironmental/pleadList", params);
/** 获取安全环保检查申辩记录列表 */
export const getpleadList = (params) => post("/app/safetyenvironmental/pleadList", params);
/** 获取安全环保检查申辩流程列表 */
export const getSafetyenvironmentalExplain = (params) =>
@ -114,13 +95,12 @@ export const getHiddenGoEdit = (params) => post("/app/hidden/goEdit", params);
export const setFinalCheck = (params) => post("/app/hidden/finalcheck", params);
/** 安全环保检查检查人确认列表 */
export const getSafetyenvironmentalinspectorList = (params) =>
post("/app/safetyenvironmentalinspector/list", params);
export const getSafetyenvironmentalinspectorList = (params) => post("/app/safetyenvironmental/prosecutors/list", params);
/** 获取被检查人签字/申辩列表 */
export const getInspectedList = (params) =>
post(
`/app/safetyenvironmentalexplain/list?showCount=${params.showCount}&currentPage=${params.currentPage}`
`/app/safetyenvironmental/list?showCount=${params.showCount}&currentPage=${params.currentPage}`
);
/** 获取被检查人签字/申辩确认前的详情记录 */

View File

@ -82,7 +82,7 @@
import { getpleadList, getSafetyenvironmentalList } from "../../api";
import keyWordSearchInput from "@/components/keyWordSearchInput/index.vue";
import List from "@/components/list/list.vue";
import { initiateList } from "../../../Mock/safetyEnvirData";
// import { initiateList } from "../../../Mock/safetyEnvirData";
export default {
components: { keyWordSearchInput, List },
@ -112,24 +112,24 @@ export default {
title: "加载中",
});
// TODO: ,
// let resData = await getpleadList({
// loginUserId: this.userInfo.USER_ID,
// supDeparIds: this.userInfo.supDeparIds,
// roleLevel: this.userInfo.roleLevel,
// CORPINFO_ID: this.userInfo.CORPINFO_ID,
// KEYWORDS: this.keyword,
// showCount: this.pageSize,
// currentPage: this.currentPage,
// });
// this.list = [...this.list, ...resData.varList];
// this.totalPage = resData.page.totalPage;
let resData = await getpleadList({
loginUserId: this.userInfo.USER_ID,
supDeparIds: this.userInfo.supDeparIds,
roleLevel: this.userInfo.roleLevel,
CORPINFO_ID: this.userInfo.CORPINFO_ID,
// KEYWORDS: this.keyword,
showCount: this.pageSize,
currentPage: this.currentPage,
});
this.list = [...this.list, ...resData.varList];
this.totalPage = resData.page.totalPage;
// mock
setTimeout(() => {
this.list = initiateList;
this.totalPage = initiateList.length;
uni.hideLoading();
}, 400);
// setTimeout(() => {
// this.list = initiateList;
// this.totalPage = initiateList.length;
// uni.hideLoading();
// }, 400);
},
resetList() {
this.pageSize = 10;

View File

@ -54,7 +54,7 @@
<script>
import { getSafetyenvironmentalExplain } from "../../api";
import { exPlainList } from '../../../Mock/safetyEnvirData';
// import { exPlainList } from '../../../Mock/safetyEnvirData';
export default {
data() {
@ -78,16 +78,16 @@ export default {
title: "加载中",
});
// TODO: ,
// let resData = await getSafetyenvironmentalExplain({
// INSPECTION_ID: this.INSPECTION_ID,
// CORPINFO_ID: this.userInfo.CORPINFO_ID
// });
// this.list = resData.list;
let resData = await getSafetyenvironmentalExplain({
INSPECTION_ID: this.INSPECTION_ID,
CORPINFO_ID: this.userInfo.CORPINFO_ID
});
this.list = resData.list;
setTimeout(() => {
this.list = exPlainList;
uni.hideLoading();
}, 400);
// setTimeout(() => {
// this.list = exPlainList;
// uni.hideLoading();
// }, 400);
},
previewImage(current) {
uni.previewImage({

View File

@ -16,7 +16,7 @@
<view slot="title" class="title required">被检查单位</view>
<view slot="value">
<text @click="showTree('tkitree')">{{
disabled ? form.INSPECTED_CORPINFO_ID_NAME : form.INSPECTED_DEPARTMENT_NAME || '请选择' }}</text>
disabled ? form.INSPECTED_DEPARTMENT_NAME : form.INSPECTED_DEPARTMENT_NAME || '请选择' }}</text>
<tki-tree ref="tkitree" :range="inspectedDepartmentTreeList" rangeKey="name" selectParent
@confirm="confirmTree($event, 'inspectedSiteuserColumns')" />
</view>
@ -367,7 +367,8 @@ export default {
hiddenList: [],
CREATTIME: '',
INSPECTION_USER_OPINION: '',
INSPECTION_USER_SIGN_IMG: ''
INSPECTION_USER_SIGN_IMG: '',
CONFIRM_MESSAGE: ''
},
rules: {
'INSPECTION_SUBJECT': { required: true, message: '请选择检查题目' },
@ -452,12 +453,13 @@ export default {
}
this.type = event.type
if (event.type === 'add' || event.type === 'edit') {
await this.fnGetInspectedDepartment()
await this.fnGetInspectionDepartment()
await this.fnGetInspectedDepartment(this.userInfo.CORPINFO_ID)
await this.fnGetInspectionDepartment(this.userInfo.CORPINFO_ID)
await this.fnGetInspectionType()
await this.fnGetHiddenRegion()
await this.fnGetHiddenType()
// this.fnGetHiddenLevel()
await this.fnGetInspectionType()
}
},
computed: {
@ -467,11 +469,12 @@ export default {
},
methods: {
async fnGetInspectedDepartment() {
let resData = await getInspectedDepartment();
console.log(this.userInfo.CORPINFO_ID)
let resData = await getInspectedDepartment(this.userInfo.CORPINFO_ID);
this.inspectedDepartmentTreeList = JSON.parse(resData.zTreeNodes);
},
async fnGetInspectionDepartment() {
let resData = await getInspectionDepartment();
let resData = await getInspectionDepartment(this.userInfo.CORPINFO_ID);
this.inspectionDepartmentTreeList = JSON.parse(resData.zTreeNodes);
},
async fnGetHiddenRegion(id) {
@ -489,8 +492,8 @@ export default {
let resData = await getHiddenLevel();
this.hiddenLevelTreeList = JSON.parse(resData.zTreeNodes);
},
async fnGetInspectionType() {
let resData = await getInspectionType();
async fnGetInspectionType(detpId) {
let resData = await getInspectionType({ 'DEPARTMENT_ID': detpId });
this.inspectionTypeTreeList = JSON.parse(resData.zTreeNodes);
},
async fnGetDeptUser(detpId) {
@ -498,11 +501,14 @@ export default {
return resData.userList;
},
async fnGetInspectors(detpId) {
console.log(this.form.INSPECTED_DEPARTMENT_ID)
console.info(detpId)
let resData = await getInspectors({ 'DEPARTMENT_ID': detpId });
return resData.userList;
},
async fnGetSafetyenvironmentalGoEdit() {
let resData = await getSafetyenvironmentalGoEdit({ INSPECTION_ID: this.INSPECTION_ID })
console.info(resData)
for (let i = 0; i < resData.pd.hiddenList.length; i++) {
for (let j = 0; j < resData.pd.hiddenList[i].hiddenImgs.length; j++) {
resData.pd.hiddenList[i].hiddenImgs[j].url = this.$store.state.filePath + resData.pd.hiddenList[i].hiddenImgs[j].FILEPATH
@ -705,6 +711,7 @@ export default {
formData: {
...this.form,
INSPECTION_ORIGINATOR_ID: this.userInfo.USER_ID,
CORPINFO_ID: this.userInfo.CORPINFO_ID,
INSPECTION_STATUS: '1',
delInspectors: this.delInspectors.join(','),
delSituations: this.delSituations.join(','),
@ -938,6 +945,7 @@ export default {
},
signConfirm(signImg) {
this.form.INSPECTION_USER_SIGN_IMG = signImg.filePath
this.form.CONFIRM_MESSAGE = '1'
},
},
}

View File

@ -23,7 +23,7 @@
<list :list="list" @scrollToLower="scrollToLower">
<template #default="{ item }">
<view class="flex-between main-title">
<text>被检查单位{{ item.INSPECTED_CORPINFO_ID_NAME }}</text>
<text>被检查单位{{ item.INSPECTED_DEPARTMENT_NAME }}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>检查发起人{{ item.INSPECTION_ORIGINATOR_NAME }}</text>
@ -121,7 +121,7 @@
import { getSafetyenvironmentalList } from "../../api";
import keyWordSearchInput from "@/components/keyWordSearchInput/index.vue";
import List from "@/components/list/list.vue";
import { initiateList } from "../../../Mock/safetyEnvirData";
// import { initiateList } from "../../../Mock/safetyEnvirData";
export default {
components: { keyWordSearchInput, List },
@ -169,28 +169,28 @@ export default {
},
methods: {
async getData() {
uni.showLoading({
title: "加载中",
});
// TODO: ,
// let resData = await getSafetyenvironmentalList({
// loginUserId: this.userInfo.USER_ID,
// supDeparIds: this.userInfo.supDeparIds,
// roleLevel: this.userInfo.roleLevel,
// KEYWORDS: this.keyword,
// INSPECTION_STATUS: this.INSPECTION_STATUS,
// showCount: this.pageSize,
// currentPage: this.currentPage,
// uni.showLoading({
// title: "",
// });
// this.list = [...this.list, ...resData.varList];
// this.totalPage = resData.page.totalPage;
// TODO: ,
let resData = await getSafetyenvironmentalList({
loginUserId: this.userInfo.USER_ID,
supDeparIds: this.userInfo.supDeparIds,
roleLevel: this.userInfo.roleLevel,
// KEYWORDS: this.keyword,
INSPECTION_STATUS: this.INSPECTION_STATUS,
showCount: this.pageSize,
currentPage: this.currentPage,
});
this.list = [...this.list, ...resData.varList];
this.totalPage = resData.page.totalPage;
// mock
setTimeout(() => {
this.list = initiateList;
this.totalPage = initiateList.length;
uni.hideLoading();
}, 400);
// setTimeout(() => {
// this.list = initiateList;
// this.totalPage = initiateList.length;
// uni.hideLoading();
// }, 400);
},
resetList() {
this.pageSize = 10;

View File

@ -9,14 +9,16 @@
</template>
<script>
import SeeksRelationGraph from 'relation-graph'
import { getHotWorkGoEdit, setSafetyenvironmentalFlow } from "../../api";
import pagination from '@/components/pagination/index.vue' // el-pagination
export default {
data() {
return {
current:0,
steps: [],
ID:''
ID:''
}
},
onLoad(event) {
@ -26,8 +28,8 @@ export default {
methods: {
async getDate(){
let resData = await setSafetyenvironmentalFlow({ ID:this.ID });
this.current = resData.active
this.steps = resData.varList
this.current = resData.active
}
}
}

View File

@ -311,7 +311,7 @@ import { getDepartmentTree, getPersonnelList, getHiddenLevelTree } from "@/api";
import { getInspectedItemGoShow } from '../../api';
import sign from '@/components/sign/sign.vue';
import uniDrawer from '@/components/uni-drawer/uni-drawer.vue';
import { inspectedFormData } from '@/Mock/safetyEnvirData';
// import { inspectedFormData } from '@/Mock/safetyEnvirData';
export default {
components: { sign, uniDrawer },
@ -455,7 +455,7 @@ export default {
this.msg = "edit";
this.fnGetData();
this.getDept();
this.getDict();
// this.getDict();
},
methods: {
/**
@ -467,39 +467,40 @@ export default {
title: '请稍候'
})
try {
_this.form = inspectedFormData;
setTimeout(() => {
// _this.form = inspectedFormData;
// setTimeout(() => {
// uni.hideLoading();
// }, 500);
const responseData = await getInspectedItemGoShow({
INSPECTION_ID: _this.form.INSPECTION_ID,
})
if (responseData.result === 'success') {
uni.hideLoading();
}, 500);
// const responseData = await getInspectedItemGoShow({
// INSPECTION_ID: _this.form.INSPECTION_ID,
// })
// if (responseData.data.result === 'success') {
// uni.hideLoading();
// // _this.form = res.data.pd;
// for (let i = 0; i < _this.form.inspectorList.length; i++) {
// _this.inspectorList.push([])
// _this.getUserList('inspectorList', _this.form.inspectorList[i].INSPECTION_DEPARTMENT_ID, i)
// }
// if (Number(_this.form.INSPECTION_STATUS) < 1) {
// _this.forbidEdit = false;
// }
// } else if ("exception" == data.result) {
// uni.hideLoading();
// uni.showToast({
// title: '',
// duration: 2000
// });
// }
_this.form = responseData.pd;
for (let i = 0; i < _this.form.inspectorList.length; i++) {
_this.inspectorList.push([])
_this.getUserList('inspectorList', _this.form.inspectorList[i].INSPECTION_DEPARTMENT_ID, i)
}
if (Number(_this.form.INSPECTION_STATUS) < 1) {
_this.forbidEdit = false;
}
} else if ("exception" == data.result) {
uni.hideLoading();
uni.showToast({
title: '错误',
duration: 2000
});
}
} catch (err) {
uni.hideLoading();
uni.showToast({
title: '错误',
duration: 2000
});
// uni.hideLoading();
// uni.showToast({
// title: '',
// duration: 2000
// });
}
},
/**
/**
* 完成手写签字事件处理
*/
subCanvas(e) {
@ -508,7 +509,7 @@ export default {
this.$set(this.inspectedForm, 'INSPECTED_SITEUSER_SIGN_TIME', formatDate(new Date(), 'yyyy-MM-dd hh:mm'))
this.modalShow = false;
},
/**
/**
* 删除手写签名的图片
*/
delImg(e) {
@ -550,7 +551,7 @@ export default {
this.$refs['showHiddenWindow'].close();
this.showHiddenWindow = false;
},
/**
/**
* 抽屉状态发生变化触发
*/
change(e, type) {
@ -570,7 +571,7 @@ export default {
current: this.$store.state.filePath + url
});
},
/**
/**
* 被检查单位现场负责人意见的单选选择动作
*/
changeRadioGroup(e) {
@ -627,7 +628,7 @@ export default {
title: '请稍候'
})
uni.uploadFile({
url: requestPath + "/app/safetyenvironmentalexplain/add",
url: "http://127.0.0.1:8199/app/safetyenvironmental/checkverify",
filePath: _this.signImgList[0].filePath,
name: 'FFILE',
formData: this.inspectedForm,
@ -658,7 +659,7 @@ export default {
uni.navigateBack({ delta: 1 });
uni.hideLoading();
},
/**
/**
* 获取部门下拉信息
*/
async getDept() {
@ -676,7 +677,7 @@ export default {
});
}
},
/**
/**
* 获取人员列表
*/
async getUserList(list, dept, i) {
@ -1069,4 +1070,4 @@ export default {
bottom: 0;
height: 80upx;
}
</style>
</style>

View File

@ -34,7 +34,7 @@
<view class="flex-end">
<!-- v-if="item.INSPECTION_STATUS === '2'" -->
<view>
<u-button type="primary" text="确认" size="mini" shape="circle" @click="goToDetail(item.INSPECTION_ID)" />
<u-button v-if="item.INSPECTION_STATUS === '2'" type="primary" text="确认" size="mini" shape="circle" @click="goToDetail(item.INSPECTION_ID)" />
</view>
</view>
</template>
@ -46,7 +46,7 @@
import { getInspectedList } from "../../api";
import keyWordSearchInput from "@/components/keyWordSearchInput/index.vue";
import List from "@/components/list/list.vue";
import { inspectedList } from "../../../Mock/safetyEnvirData";
// import { inspectedList } from "../../../Mock/safetyEnvirData";
export default {
components: { keyWordSearchInput, List },
@ -55,7 +55,6 @@ export default {
return {
show: false,
columns: [
[
{ id: "", name: "请选择" },
{ id: "0", name: "待检查人核实" },
{ id: "1", name: "检查人核实中" },
@ -67,7 +66,6 @@ export default {
{ id: "7", name: "已验收" },
{ id: "-1", name: "检查人核实打回" },
{ id: "-2", name: "被检查人申辩" },
],
],
searchForm: {
HIDDENDESCR: "",
@ -85,23 +83,23 @@ export default {
methods: {
async getData() {
uni.showLoading({
title: "加载中",
});
// TODO: ,
// let resData = await getInspectedList({
// showCount: this.pageSize,
// currentPage: this.currentPage,
// uni.showLoading({
// title: "",
// });
// this.list = [...this.list, ...resData.varList];
// this.totalPage = resData.page.totalPage;
// TODO: ,
let resData = await getInspectedList({
showCount: this.pageSize,
currentPage: this.currentPage,
});
this.list = [...this.list, ...resData.varList];
this.totalPage = resData.page.totalPage;
// mock
setTimeout(() => {
this.list = inspectedList;
this.totalPage = inspectedList.length;
uni.hideLoading();
}, 400);
// setTimeout(() => {
// this.list = inspectedList;
// this.totalPage = inspectedList.length;
// uni.hideLoading();
// }, 400);
},
resetList() {
this.pageSize = 10;
@ -129,6 +127,8 @@ export default {
});
},
translate(id) {
console.info(id)
console.info(this.columns)
for (var i = 0; i < this.columns.length; i++) {
if (this.columns[i].id == id) return this.columns[i].name
}

View File

@ -163,21 +163,21 @@ export default {
title: "加载中",
});
// TODO: ,
// let resData = await getSafetyenvironmentalinspectorList({
// INSPECTION_USER_ID: this.userInfo.USER_ID,
// KEYWORDS: this.keyword,
// showCount: this.pageSize,
// currentPage: this.currentPage,
// });
// this.list = [...this.list,...resData.varList];
// this.totalPage = resData.page.totalPage;
let resData = await getSafetyenvironmentalinspectorList({
INSPECTION_USER_ID: this.userInfo.USER_ID,
// KEYWORDS: this.keyword,
showCount: this.pageSize,
currentPage: this.currentPage,
});
this.list = [...this.list,...resData.varList];
this.totalPage = resData.page.totalPage;
// mock
setTimeout(() => {
this.list = initiateList;
this.totalPage = initiateList.length;
uni.hideLoading();
}, 400);
// setTimeout(() => {
// this.list = initiateList;
// this.totalPage = initiateList.length;
// uni.hideLoading();
// }, 400);
},
resetList() {
this.pageSize = 10;