[流程调试,问题修复]

- 相关方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); 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); 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-mask" :class="{'show':showTree}" @tap="_cancel"></view>
<view class="tki-tree-cnt" :class="{'show':showTree}"> <view class="tki-tree-cnt" :class="{'show':showTree}">
<view class="tki-tree-bar"> <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-title" :style="{'color':titleColor}">{{title}}</view>
<view class="tki-tree-bar-confirm" :style="{'color':confirmColor}" hover-class="hover-c" @tap="_confirm"></view> <view class="tki-tree-bar-confirm" :style="{'color':confirmColor}" hover-class="hover-c" @tap="_confirm"></view>
</view> </view>

View File

@ -1,37 +1,23 @@
import { post, upload, uploads } from "../../utils/request"; import { post, upload, uploads } from "../../utils/request";
/** 获取监管端的部门的人员 */ /** 获取监管端的部门的人员 */
export const getDeptUser = (params) => export const getDeptUser = (params) => post("/app/user/listAll", {loading: false, ...params});
post("/AppUser/listAllManageAndCorp", { loading: false, ...params });
/** 获取隐患级别 */ /** 获取隐患级别 */
export const getHiddenLevel = () => export const getHiddenLevel = () => post("/app/dictionaries", {loading: false, DICTIONARIES_ID: '5e7cf8620ba54ad89719d0be62133c7a'});
post("/app/dictionaries/listSelectTree", {
loading: false,
DICTIONARIES_ID: "5e7cf8620ba54ad89719d0be62133c7a",
});
/** 获取隐患部位 */ /** 获取隐患部位 */
export const getHiddenRegion = (params) => export const getHiddenRegion = (params) =>
post("/app/hiddenRegion/gerRegionList", { loading: false, ...params }); post("/app/hiddenRegion/gerRegionList", { loading: false, ...params });
/** 获取隐患类型 */ /** 获取隐患类型 */
export const getHiddenType = () => export const getHiddenType = () => post("/app/dictionaries", {loading: false, DICTIONARIES_ID: '3babc15144444bdc8d763d0af2bdfff6'});
post("/app/dictionaries/listSelectTree", {
loading: false,
DICTIONARIES_ID: "3babc15144444bdc8d763d0af2bdfff6",
});
/** 获取被检查部门 */ /** 获取被检查部门 */
export const getInspectedDepartment = (params) => export const getInspectedDepartment = (params) => post("/app/corpDepartment/listzTree", {loading: false, CORPINFO_ID: params});
post("/app/corpDepartment/listTreeCorpDept", { loading: false, ...params });
/** 获取检查部门 */ /** 获取检查部门 */
export const getInspectionDepartment = (params) => export const getInspectionDepartment = (params) => post("/app/corpDepartment/listzTree", {loading: false, CORPINFO_ID: params});
post("/app/corpDepartment/listTreeManageAndCorp", {
loading: false,
...params,
});
/** 获取检查类型 */ /** 获取检查类型 */
export const getInspectionType = () => export const getInspectionType = () =>
@ -41,12 +27,10 @@ export const getInspectionType = () =>
}); });
/** 获取检查人员 */ /** 获取检查人员 */
export const getInspectors = (params) => export const getInspectors = (params) => post("/app/user/listAll", {loading: false, ...params});
post("/AppUser/listAllManageAndCorp", { loading: false, ...params });
/** 安全环保检查明细信息 */ /** 安全环保检查明细信息 */
export const getSafetyenvironmentalGoEdit = (params) => export const getSafetyenvironmentalGoEdit = (params) => post("/app/safetyenvironmental/goShow", params);
post("/app/safetyenvironmental/goEdit", params);
/** 上传图片 */ /** 上传图片 */
export const setImgFilesAdd = (params) => export const setImgFilesAdd = (params) =>
@ -57,8 +41,7 @@ export const setSafetyenvironmentalAdd = (params) =>
post("/app/safetyenvironmental/add", params); post("/app/safetyenvironmental/add", params);
/** 安全环保检查检查人确认 */ /** 安全环保检查检查人确认 */
export const setSafetyenvironmentalVerify = (params) => export const setSafetyenvironmentalVerify = (params) => upload("/app/safetyenvironmental/verify", params);
upload("/app/safetyenvironmentalinspector/verify", params);
/** 新增安全环保检查 - plus */ /** 新增安全环保检查 - plus */
export const setSafetyenvironmentalAdd_plus = (params) => export const setSafetyenvironmentalAdd_plus = (params) =>
@ -81,8 +64,7 @@ export const setSafetyenvironmentalExplain = (params) =>
post("/app/safetyenvironmental/explain", params); post("/app/safetyenvironmental/explain", params);
/** 设置安全环境流程 */ /** 设置安全环境流程 */
export const setSafetyenvironmentalFlow = (params) => export const setSafetyenvironmentalFlow = (params) => post("/app/safetyenvironmental/getFlow", params);
post("/app/safetyenvironmental/showFlowChart", params);
/** 修改安全环保检查 - plus */ /** 修改安全环保检查 - plus */
export const setSafetyenvironmentalEdit_plus = (params) => export const setSafetyenvironmentalEdit_plus = (params) =>
@ -99,9 +81,8 @@ export const setVideoAdd = (params) => upload("/app/imgfiles/add", params);
export const getSafetyenvironmentalList = (params) => export const getSafetyenvironmentalList = (params) =>
post("/app/safetyenvironmental/list", params); post("/app/safetyenvironmental/list", params);
/** 获取安全环保检查列表 */ /** 获取安全环保检查申辩记录列表 */
export const getpleadList = (params) => export const getpleadList = (params) => post("/app/safetyenvironmental/pleadList", params);
post("/app/safetyenvironmental/pleadList", params);
/** 获取安全环保检查申辩流程列表 */ /** 获取安全环保检查申辩流程列表 */
export const getSafetyenvironmentalExplain = (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 setFinalCheck = (params) => post("/app/hidden/finalcheck", params);
/** 安全环保检查检查人确认列表 */ /** 安全环保检查检查人确认列表 */
export const getSafetyenvironmentalinspectorList = (params) => export const getSafetyenvironmentalinspectorList = (params) => post("/app/safetyenvironmental/prosecutors/list", params);
post("/app/safetyenvironmentalinspector/list", params);
/** 获取被检查人签字/申辩列表 */ /** 获取被检查人签字/申辩列表 */
export const getInspectedList = (params) => export const getInspectedList = (params) =>
post( 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 { getpleadList, getSafetyenvironmentalList } from "../../api";
import keyWordSearchInput from "@/components/keyWordSearchInput/index.vue"; import keyWordSearchInput from "@/components/keyWordSearchInput/index.vue";
import List from "@/components/list/list.vue"; import List from "@/components/list/list.vue";
import { initiateList } from "../../../Mock/safetyEnvirData"; // import { initiateList } from "../../../Mock/safetyEnvirData";
export default { export default {
components: { keyWordSearchInput, List }, components: { keyWordSearchInput, List },
@ -112,24 +112,24 @@ export default {
title: "加载中", title: "加载中",
}); });
// TODO: , // TODO: ,
// let resData = await getpleadList({ let resData = await getpleadList({
// loginUserId: this.userInfo.USER_ID, loginUserId: this.userInfo.USER_ID,
// supDeparIds: this.userInfo.supDeparIds, supDeparIds: this.userInfo.supDeparIds,
// roleLevel: this.userInfo.roleLevel, roleLevel: this.userInfo.roleLevel,
// CORPINFO_ID: this.userInfo.CORPINFO_ID, CORPINFO_ID: this.userInfo.CORPINFO_ID,
// KEYWORDS: this.keyword, // KEYWORDS: this.keyword,
// showCount: this.pageSize, showCount: this.pageSize,
// currentPage: this.currentPage, currentPage: this.currentPage,
// }); });
// this.list = [...this.list, ...resData.varList]; this.list = [...this.list, ...resData.varList];
// this.totalPage = resData.page.totalPage; this.totalPage = resData.page.totalPage;
// mock // mock
setTimeout(() => { // setTimeout(() => {
this.list = initiateList; // this.list = initiateList;
this.totalPage = initiateList.length; // this.totalPage = initiateList.length;
uni.hideLoading(); // uni.hideLoading();
}, 400); // }, 400);
}, },
resetList() { resetList() {
this.pageSize = 10; this.pageSize = 10;

View File

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

View File

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

View File

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

View File

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

View File

@ -311,7 +311,7 @@ import { getDepartmentTree, getPersonnelList, getHiddenLevelTree } from "@/api";
import { getInspectedItemGoShow } from '../../api'; import { getInspectedItemGoShow } from '../../api';
import sign from '@/components/sign/sign.vue'; import sign from '@/components/sign/sign.vue';
import uniDrawer from '@/components/uni-drawer/uni-drawer.vue'; import uniDrawer from '@/components/uni-drawer/uni-drawer.vue';
import { inspectedFormData } from '@/Mock/safetyEnvirData'; // import { inspectedFormData } from '@/Mock/safetyEnvirData';
export default { export default {
components: { sign, uniDrawer }, components: { sign, uniDrawer },
@ -455,7 +455,7 @@ export default {
this.msg = "edit"; this.msg = "edit";
this.fnGetData(); this.fnGetData();
this.getDept(); this.getDept();
this.getDict(); // this.getDict();
}, },
methods: { methods: {
/** /**
@ -467,37 +467,38 @@ export default {
title: '请稍候' title: '请稍候'
}) })
try { try {
_this.form = inspectedFormData; // _this.form = inspectedFormData;
setTimeout(() => { // setTimeout(() => {
// uni.hideLoading();
// }, 500);
const responseData = await getInspectedItemGoShow({
INSPECTION_ID: _this.form.INSPECTION_ID,
})
if (responseData.result === 'success') {
uni.hideLoading(); uni.hideLoading();
}, 500); _this.form = responseData.pd;
// const responseData = await getInspectedItemGoShow({ for (let i = 0; i < _this.form.inspectorList.length; i++) {
// INSPECTION_ID: _this.form.INSPECTION_ID, _this.inspectorList.push([])
// }) _this.getUserList('inspectorList', _this.form.inspectorList[i].INSPECTION_DEPARTMENT_ID, i)
// if (responseData.data.result === 'success') { }
// uni.hideLoading(); if (Number(_this.form.INSPECTION_STATUS) < 1) {
// // _this.form = res.data.pd; _this.forbidEdit = false;
// for (let i = 0; i < _this.form.inspectorList.length; i++) { }
// _this.inspectorList.push([]) } else if ("exception" == data.result) {
// _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.hideLoading();
uni.showToast({ uni.showToast({
title: '错误', title: '错误',
duration: 2000 duration: 2000
}); });
} }
} catch (err) {
// uni.hideLoading();
// uni.showToast({
// title: '',
// duration: 2000
// });
}
}, },
/** /**
* 完成手写签字事件处理 * 完成手写签字事件处理
@ -627,7 +628,7 @@ export default {
title: '请稍候' title: '请稍候'
}) })
uni.uploadFile({ uni.uploadFile({
url: requestPath + "/app/safetyenvironmentalexplain/add", url: "http://127.0.0.1:8199/app/safetyenvironmental/checkverify",
filePath: _this.signImgList[0].filePath, filePath: _this.signImgList[0].filePath,
name: 'FFILE', name: 'FFILE',
formData: this.inspectedForm, formData: this.inspectedForm,

View File

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

View File

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