1、添加 信息查看导航 维码生成器 隐患查看 检查查看 风险查看 视频查看

2、按钮点击 添加形参
3、接口 添加   区域选择、检查库、隐患 搜索
4、修改 request  公共方法信息(原来的都写死了)
This commit is contained in:
wyw 2025-02-25 16:46:59 +08:00
parent 039cf70aa6
commit 7217872c88
10 changed files with 1857 additions and 19 deletions

View File

@ -37,6 +37,36 @@
"navigationBarTitleText": "当班工作人员"
}
},
{
"path": "pages/apply/qrcodeMake",
"style": {
"navigationBarTitleText": "二维码生成器"
}
},
{
"path": "pages/apply/viewRisk",
"style": {
"navigationBarTitleText": "隐患查看"
}
},
{
"path": "pages/apply/viewCheck",
"style": {
"navigationBarTitleText": "检查查看"
}
},
{
"path": "pages/apply/viewEvaluation",
"style": {
"navigationBarTitleText": "风险查看"
}
},
{
"path": "pages/apply/viewVideo",
"style": {
"navigationBarTitleText": "视频查看"
}
},
{
"path": "pages/apply/complete",
"style": {
@ -58,7 +88,7 @@
"navigationBarBackgroundColor": "#fff"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",

384
pages/apply/qrcodeMake.vue Normal file
View File

@ -0,0 +1,384 @@
<template>
<!-- 二维码生成页面 -->
<view class="content">
<view class="container">
<view class="form-sub">
<u-form :model="model" ref="uForm" label-width="90px" class="demo-ruleForm" size="mini">
<view style="position: relative;">
<view style="position: absolute;left: -10px;color: #3d4b70;top: -3px;">*</view>
</view>
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;">参数信息</view>
<!-- <u-form-item label="生成类型" prop="typeEnumValue" borderBottom>
<u-radio-group v-model="model.typeEnumValue" inputAlign="right" placement="row">
<u-radio style="margin-left: 20px;" v-for="item in model.typeEnum" :name="item.value"
:key="item.value" :label="item.name">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item v-if="model.typeEnumValue" label="生成类型" prop="downEnumValue" borderBottom>
<u-radio-group v-model="model.downEnumValue" inputAlign="right" placement="row">
<u-radio style="margin-left: 20px;" v-for="item in model.downEnum" :name="item.value"
:key="item.value" :label="item.name">
</u-radio>
</u-radio-group>
</u-form-item> -->
<u-form-item label="班组名称" prop="DEPARTMENT_NAME" borderBottom ref="item1"
@click="handleShowSheet({title: '班组名称',name:'DEPARTMENT_NAME'})">
<u--input v-model="model.DEPARTMENT_NAME" border="none" suffixIcon="arrow-right"
customStyle="margin:0px;display:flex;padding:3px 9px"
suffixIconStyle="font-size:12px"></u--input>
</u-form-item>
<u-form-item label="岗位名称" prop="POST_NAME" borderBottom ref="item1"
@click="handleShowSheet({title: '岗位名称',name:'POST_NAME'})">
<u--input v-model="model.POST_NAME" border="none" suffixIcon="arrow-right"
customStyle="margin:0px;display:flex;padding:3px 9px"
suffixIconStyle="font-size:12px"></u--input>
</u-form-item>
<u-form-item label="链接(Url)" prop="url" borderBottom @click="showSex = true;" ref="item1">
<u--input v-model="model.Url" disabled disabledColor="#ffffff" placeholder="链接(Url)"
border="none" fontSize="14px"
customStyle="margin:0px;display:flex;padding:3px 9px"></u--input>
</u-form-item>
<u-form-item style="margin-bottom: 30px;">
<u-list key="qb">
<u-list-item v-for=" item in model.listQrCode">
<u--input v-model="item.TITle" style="text-align: center;" disabled border="none"
customStyle="margin:0px;display:flex;padding:3px 9px"
suffixIconStyle="font-size:12px"></u--input>
<image :src="item.qrCode" mode="widthFix" class="qr-code"></image>
</u-list-item>
</u-list>
</u-form-item>
</u-form>
<view style="display: flex;flex-direction: row;" class="bottom-button">
<u-button type="primary" @click="generateQRCode" color="#3d4b70"
style="margin-left: 5px;">生成</u-button>
</view>
<query-selector :show="selectorInfo.showPopup" :defaultChecked="selectorInfo.defaultChecked"
:title="selectorInfo.title" :lists="selectorInfo.dataLists" @search="handleSearch"
@select="handleSelected" @close="selectorInfo.showPopup=false" :total="selectorInfo.totalCount" />
</view>
</view>
</view>
</template>
<script>
import QRCode from 'qrcode';
import {
WorkerScheduling
} from '../../services/apply'
import {
DepartmentOrderPaged,
UserPostOrderPaged,
DepartmentPostEntities
} from '../../services/common'
import {
initFilter,
extendRule
} from '../../utils/common'
import config from '../../config/common'
export default {
data() {
return {
qrCodeSrc: '',
OrgId: '',
sourceUrl: config.uni_app_web_source_url,
model: {
OrgId: '',
DEPARTMENT_ID: '',
POST_ID: '',
Nav_Post: {},
Nav_Department: {},
Url:config.uni_app_web_local_api_url,
listQrCode: [{
TITLE: '',
qrCode: ''
}]
// typeEnum: [{
// value: true,
// name: ''
// }, {
// value: false,
// name: ''
// }],
// downEnum: [{
// value: true,
// name: ''
// }, {
// value: false,
// name: ''
// }],
// typeEnumValue: true,
// downEnumValue: true,
},
selectorInfo: {
showPopup: false,
totalCount: 0,
title: '组织名称',
// itemData: {},
index: 0,
dataLists: [],
defaultText: '',
defaultValue: '',
name: '',
defaultChecked: []
},
}
},
onLoad(option) {
// this.model.DEPARTMENT_ID = option.DEPARTMENT_ID // 'B18F95F4-572A-E521-1412-FA8CE50DC98A'
this.OrgId = option.OrgId // 'B043B28B-BBC3-C452-6052-4FBA1457ABFA'
},
onReady() {
//setRules
// this.$refs.uForm.setRules(this.rules)
},
methods: {
async generateQRCode() {
try {
if (!this.model.DEPARTMENT_ID || this.model.DEPARTMENT_ID.length < 2) {
uni.showToast({
title: '请选择班组!',
icon: 'none'
})
return false
}
var url = this.model.Url + '?OrgId=' + this.OrgId
if (this.model.POST_ID && this.model.POST_ID.length > 2) {
url += '&DEPARTMENT_ID=' + this.model.DEPARTMENT_ID + "&POST_ID=" + this.model.POST_ID
const qrCodeData = await QRCode.toDataURL(url);
this.model.listQrCode = []
this.model.listQrCode.push({
TITle: this.model.Nav_Department.NAME + '' + this.model.Nav_Post.NAME,
qrCode: qrCodeData
})
} else {
const json = initFilter(this.OrgId, null, "NAME");
extendRule(json, "STATUS", 1, 1)
json.IgnoreDataRule = true
json.Keyword = this.model.DEPARTMENT_ID
var listResult = await DepartmentPostEntities(json).then(res => {
// this.selectorInfo.totalCount = res.TotalCount
if (res != undefined && res.Data.length > 0) {
return res.Data
} else {
uni.showToast({
title: '该班组没有有效岗位!',
icon: 'none'
})
}
});
if (listResult && listResult.length > 0) {
this.model.listQrCode = []
for (let i = 0; i < listResult.length; i++) {
var qrCodeData = await QRCode.toDataURL(url + '&DEPARTMENT_ID=' +
this.model.DEPARTMENT_ID + "&POST_ID=" + listResult[i].ID);
this.model.listQrCode.push({
TITle: this.model.Nav_Department.NAME + "" + listResult[i].NAME,
qrCode: qrCodeData
})
}
}
}
} catch (error) {
console.error('生成二维码失败:', error);
}
},
closePicker() {
this.comPickerInfo = {
showSheet: false,
columns: [],
title: '',
name: '',
formIndex: undefined
}
},
//
handleChange() {
this.selectorInfo.showPopup = true
this.selectorInfo.title = '班组名称'
this.handleSearch()
},
//
handleSearch(val, pageIndex) {
var p = {
name: this.selectorInfo.name,
title: this.selectorInfo.title,
val: val,
pageIndex: pageIndex
}
this.handleShowSheet(p)
},
async handleShowSheet(p) {
const json = initFilter(this.OrgId, null, "NAME", 0, (p.pageIndex ?? 1));
json.IgnoreDataRule = true
json.Limit = 20
if (p.val) {
extendRule(json, "NAME", 9, p.val)
}
let dataSelect = []
if (p.name == 'DEPARTMENT_NAME') {
extendRule(json, "ENABLE_STATUS", 1, 0)
extendRule(json, "DEPARTMENT_TYPE", 1, 2)
dataSelect = await DepartmentOrderPaged(json).then(res => {
this.selectorInfo.totalCount = res.TotalCount
if (res != undefined && res.Data.length > 0) {
for (let i = 0; i < res.Data.length; i++) {
res.Data[i].name = res.Data[i].NAME
res.Data[i].code = res.Data[i].CODE
}
}
return res.Data
})
} else if (p.name == 'POST_NAME') {
extendRule(json, "STATUS", 1, 1)
if (!this.model.DEPARTMENT_ID || this.model.DEPARTMENT_ID.length < 2) {
uni.showToast({
title: '请选择班组!',
icon: 'none'
})
return false
}
json.Keyword = this.model.DEPARTMENT_ID
dataSelect = await DepartmentPostEntities(json).then(res => {
this.selectorInfo.totalCount = res.TotalCount
if (res != undefined && res.Data.length > 0) {
for (let i = 0; i < res.Data.length; i++) {
res.Data[i].name = res.Data[i].NAME
res.Data[i].code = res.Data[i].CODE
}
} else {
uni.showToast({
title: '该班组没有有效岗位!',
icon: 'none'
})
}
return res.Data
})
}
if (dataSelect.length) {
this.selectorInfo = {
totalCount: this.selectorInfo.totalCount,
showPopup: true,
title: p.title,
name: p.name,
dataLists: dataSelect,
}
} else {
//
}
},
handleSelected(e) {
this.selectorInfo.showPopup = false
if (this.selectorInfo.name == 'DEPARTMENT_NAME') {
this.model.DEPARTMENT_NAME = e.NAME
this.model.DEPARTMENT_ID = e.ID
this.model.Nav_Department = e
this.model.POST_ID = ''
this.model.Nav_Post = {}
this.model.listQrCode = []
} else if (this.selectorInfo.name == 'POST_NAME') {
this.model.POST_NAME = e.NAME
this.model.POST_ID = e.ID
this.model.Nav_Post = e
}
}
}
}
</script>
<style>
.content {
background-color: #f4f7ff;
width: 100%;
/* #ifndef APP-PLUS */
height: calc(100vh - 44px - 50px); // APP
/* #endif */
/* #ifdef APP-PLUS */
height: calc(100vh); // APP
/* #endif */
}
.container {
padding: 20px 16px 10px 16px;
}
.form-sub {
/* margin: 20px 16px 10px 16px; */
/* border: 1px solid #EBEEF5; */
padding: 20px 30px 10px 30px;
/* box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 3px 1px; */
background-color: #ffffff;
border-radius: 10px;
}
.demo-ruleForm>>>.u-form-item__body__left__content__label {
font-size: 14px;
color: #8e8b9c;
/* justify-content: flex-start; */
}
.demo-ruleForm>>>.u-form-item__body__left__content__ {
left: -11px;
top: 0px
}
.demo-ruleForm>>>.u-textarea__field {
font-size: 14px;
}
.demo-ruleForm>>>.u-cell__title-text {
font-size: 14px;
}
.demo-ruleForm-thr>>>.u-textarea {
padding: 9px 9px 25px 9px;
}
.demo-ruleForm-thr>>>.u-form-item__body__left__content__label {
font-size: 14px;
color: #8e8b9c;
/* justify-content: flex-start; */
}
.demo-ruleForm-thr>>>.u-form-item__body__left__content__ {
left: -11px;
top: 0px
}
.demo-ruleForm-thr>>>.u-textarea__field {
font-size: 14px;
}
.demo-ruleForm-thr>>>.u-cell__title-text {
font-size: 14px;
}
.bottom-button {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 10px 16px;
box-sizing: border-box;
background: #f4f7ff;
z-index: 999;
}
</style>

350
pages/apply/viewCheck.vue Normal file
View File

@ -0,0 +1,350 @@
<template>
<!-- 检查查看 待开发-->
<view class="content">
<view class="container">
<view class="form-sub">
<u-form :model="model" ref="uForm" label-width="90px" class="demo-ruleForm" size="mini">
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;">隐患信息</view>
<u-form-item label="区域名称" prop="RISK_AREA_NAME" borderBottom ref="item1"
@click="handleShowSheet({title: '区域名称'})">
<u--input v-model="model.RISK_AREA_NAME" border="none" suffixIcon="arrow-right"
customStyle="margin:0px;display:flex;padding:3px 9px"
suffixIconStyle="font-size:12px"></u--input>
</u-form-item>
<u-form-item label="包含下级区域" prop="ISDOWN" borderBottom>
<u-radio-group v-model="model.ISDOWN" style="display: flex;flex-direction: row"
placement="column">
<u-radio :customStyle="{marginBottom: '4px',marginTop: '4px' ,marginLeft:'15px' }"
v-for="(item, index) in radiolist" :key="index" :label="item.name" :name="item.name"
@change="doTrueOrFalse()" />
</u-radio-group>
</u-form-item>
</u-form>
<!-- 动态加载隐患信息 -->
<u-sticky offset-top="20">
<view class="sub-form">
<view class="sub-form-wrap">
<u--form labelPosition="left" labelWidth="auto" labelAlign="center"
errorType="border-bottom" style="margin-bottom: 50px;" ref="sForm">
<uni-collapse :border="false" accordion>
<uni-card style="margin-bottom: 5px;" margin="0" spacing="0" :is-shadow="false"
v-for="(item, index) in model.ListShow">
<uni-collapse-item :title="(index+1) + '. ' + item.CHECKCONTENT" name="1">
<u-form-item label="检查内容" prop="CHECKCONTENT" borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.CHECKCONTENT"
border="none" inputAlign="right"></u--input>
</u-form-item>
<u-form-item v-if="model.ISDOWN==''" label="区域" prop="Nav_RiskArea.NAME"
borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.Nav_RiskArea.NAME"
border="none" inputAlign="right"></u--input>
</u-form-item>
<u-form-item label="问题等级" prop="QUESTION_LEVE_DESCRIPTION" borderBottom>
<u--input disabled disabledColor="#fff"
v-model="item.QUESTION_LEVE_DESCRIPTION" border="none"
inputAlign="right"></u--input>
</u-form-item>
<!-- <u-form-item label="上报时间" prop="CREATE_TIME" borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.CREATE_TIME"
border="none" inputAlign="right"></u--input>
</u-form-item> -->
</uni-collapse-item>
</uni-card>
</uni-collapse>
</u--form>
</view>
</view>
</u-sticky>
<query-selector :show="selectorInfo.showPopup" :defaultChecked="selectorInfo.defaultChecked"
:title="selectorInfo.title" :lists="selectorInfo.dataLists" @search="handleSearch"
@select="handleSelected" @close="selectorInfo.showPopup=false" :total="selectorInfo.totalCount" />
</view>
</view>
</view>
</template>
<script>
import {
OrderPagedRiskArea,
PagedCheckMain
} from '../../services/apply'
import {
initFilter,
extendRule
} from '../../utils/common'
export default {
data() {
return {
OrgId: '',
pageIndex: 0,
pageSize: 20,
total: 0,
model: {
RISK_AREA_NAME: '请选择区域',
RISK_AREA_ID: '',
ISDOWN: '否',
SchedulingType: '',
COUNT_WORKER: '',
COUNT_LEVEL: '',
START_TIME: '',
END_TIME: '',
SchedulingNEXTTIME: '',
LISTPERSON_SCHEDULING: [{
NAME: ''
}],
LISTUSER_LEAVE: [{
NAME: ''
}],
ListShow: []
},
radiolist: [{
value: false,
name: '否'
}, {
value: true,
name: '是'
}],
selectorInfo: {
showPopup: false,
totalCount: 0,
title: '班组名称',
// itemData: {},
index: 0,
dataLists: [],
defaultText: '',
defaultValue: '',
name: '',
defaultChecked: []
},
}
},
onLoad(option) {
if (option.RISK_AREA_ID)
this.model.RISK_AREA_ID = option.RISK_AREA_ID // 'FA89F8DA-0B46-4665-A8DD-3675829F6D6F'
this.OrgId = option.OrgId // 'B043B28B-BBC3-C452-6052-4FBA1457ABFA'
if (this.model.RISK_AREA_ID != undefined && this.model.RISK_AREA_ID != '') {
this.PagedCheckMain() //
const json = initFilter(this.OrgId, null, "NAME", 0, 1);
json.IgnoreDataRule = true
json.Limit = 2
extendRule(json, "ID", 1, this.model.RISK_AREA_ID)
OrderPagedRiskArea(json).then(res => {
if (res != undefined && res.Data.length > 0) {
this.model.RISK_AREA_NAME = res.Data[0].NAME
}
})
}
},
onReady() {
//setRules
this.$refs.uForm.setRules(this.rules)
},
methods: {
PagedCheckMain(paginate) {
this.pageIndex++
const json = initFilter(this.OrgId, this.model.RISK_AREA_ID, "QUESTION_LEVEL", 0, this.pageIndex, ((
this.model.ISDOWN == '否' || this.model.ISDOWN == '') ? false : true))
json.IgnoreDataRule = true
json.Limit = this.pageSize
if (this.model.ISDOWN == '是') {
json.SelectField = ["CHECKCONTENT", "QUESTION_LEVEL", "Nav_RiskArea.NAME", "CREATE_TIME"]
} else {
json.SelectField = ["CHECKCONTENT", "QUESTION_LEVEL", "CREATE_TIME"]
}
PagedCheckMain(json).then(res => {
if (res.IsSuccessful) {
this.total = res.TotalCount
if (paginate) {
this.model.ListShow = this.model.ListShow.concat(res.Data)
} else {
this.model.ListShow = res.Data
}
} else {
this.model.ListShow = [{
CHECKCONTENT: ''
}]
}
})
},
doTrueOrFalse() {
if (this.model.RISK_AREA_ID != undefined && this.model.RISK_AREA_ID.length > 0)
this.PagedCheckMain();
},
closePicker() {
this.comPickerInfo = {
showSheet: false,
columns: [],
title: '',
name: '',
formIndex: undefined
}
},
//
handleChange() {
this.selectorInfo.showPopup = true
this.selectorInfo.title = '班组名称'
this.handleSearch()
},
//
handleSearch(val, pageIndex) {
var p = {
name: this.selectorInfo.name,
title: this.selectorInfo.title,
val: val,
pageIndex: pageIndex
}
this.handleShowSheet(p)
},
async handleShowSheet(p) {
var defaultChecked = []
const json = initFilter(this.OrgId, null, "NAME", 0, (p.pageIndex ?? 1));
json.IgnoreDataRule = true
json.Limit = 20
if (p.val) {
extendRule(json, "NAME", 9, p.val)
}
let dataSelect = await OrderPagedRiskArea(json).then(res => {
this.selectorInfo.totalCount = res.TotalCount
if (res != undefined && res.Data.length > 0) {
for (let i = 0; i < res.Data.length; i++) {
res.Data[i].name = res.Data[i].NAME
res.Data[i].code = res.Data[i].CODE
}
}
return res.Data
})
if (defaultChecked == null)
defaultChecked = []
if (dataSelect.length) {
this.selectorInfo = {
totalCount: this.selectorInfo.totalCount,
showPopup: true,
title: p.title,
name: p.name,
dataLists: dataSelect,
defaultChecked: defaultChecked
}
} else {
//
}
},
handleSelected(e) {
this.selectorInfo.showPopup = false
this.model.RISK_AREA_NAME = e.NAME
this.model.RISK_AREA_ID = e.ID
this.PagedCheckMain()
// this.WorkerScheduling()
}
},
onReachBottom() {
if (this.total > this.pageSize * this.pageIndex)
this.PagedCheckMain(true)
}
// watch: {
// keyword(n, o) {
// this.pageIndex = 0
// this.keyword = n
// this.PagedCheckMain()
// },
// searchStartTime(n, o) {
// this.pageIndex = 0
// this.searchStartTime = n
// this.PagedCheckMain()
// },
// filterStatus(n, o) {
// this.pageIndex = 0
// this.filterStatus = n
// this.PagedCheckMain()
// }
// }
}
</script>
<style>
.content {
background-color: #f4f7ff;
width: 100%;
/* #ifndef APP-PLUS */
height: calc(100vh - 44px - 50px); // APP
/* #endif */
/* #ifdef APP-PLUS */
height: calc(100vh); // APP
/* #endif */
}
.container {
padding: 20px 16px 10px 16px;
}
.form-sub {
/* margin: 20px 16px 10px 16px; */
/* border: 1px solid #EBEEF5; */
padding: 20px 30px 10px 30px;
/* box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 3px 1px; */
background-color: #ffffff;
border-radius: 10px;
}
.demo-ruleForm>>>.u-form-item__body__left__content__label {
font-size: 14px;
color: #8e8b9c;
/* justify-content: flex-start; */
}
.demo-ruleForm>>>.u-form-item__body__left__content__ {
left: -11px;
top: 0px
}
.demo-ruleForm>>>.u-textarea__field {
font-size: 14px;
}
.demo-ruleForm>>>.u-cell__title-text {
font-size: 14px;
}
.demo-ruleForm-thr>>>.u-textarea {
padding: 9px 9px 25px 9px;
}
.demo-ruleForm-thr>>>.u-form-item__body__left__content__label {
font-size: 14px;
color: #8e8b9c;
/* justify-content: flex-start; */
}
.demo-ruleForm-thr>>>.u-form-item__body__left__content__ {
left: -11px;
top: 0px
}
.demo-ruleForm-thr>>>.u-textarea__field {
font-size: 14px;
}
.demo-ruleForm-thr>>>.u-cell__title-text {
font-size: 14px;
}
.bottom-button {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 10px 16px;
box-sizing: border-box;
background: #f4f7ff;
z-index: 999;
}
</style>

View File

@ -0,0 +1,345 @@
<template>
<!-- 风险查看 待开发-->
<view class="content">
<view class="container">
<view class="form-sub">
<u-form :model="model" ref="uForm" label-width="90px" class="demo-ruleForm" size="mini">
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;">隐患信息</view>
<u-form-item label="区域名称" prop="RISK_AREA_NAME" borderBottom ref="item1"
@click="handleShowSheet({title: '区域名称'})">
<u--input v-model="model.RISK_AREA_NAME" border="none" suffixIcon="arrow-right"
customStyle="margin:0px;display:flex;padding:3px 9px"
suffixIconStyle="font-size:12px"></u--input>
</u-form-item>
<u-form-item label="包含下级区域" prop="ISDOWN" borderBottom>
<u-radio-group v-model="model.ISDOWN" style="display: flex;flex-direction: row"
placement="column">
<u-radio :customStyle="{marginBottom: '4px',marginTop: '4px' ,marginLeft:'15px' }"
v-for="(item, index) in radiolist" :key="index" :label="item.name" :name="item.name"
@change="doTrueOrFalse()" />
</u-radio-group>
</u-form-item>
</u-form>
<!-- 动态加载隐患信息 -->
<u-sticky offset-top="20">
<view class="sub-form">
<view class="sub-form-wrap">
<u--form labelPosition="left" labelWidth="auto" labelAlign="center"
errorType="border-bottom" style="margin-bottom: 50px;" ref="sForm">
<uni-collapse :border="false" accordion>
<uni-card style="margin-bottom: 5px;" margin="0"
spacing="0" :is-shadow="false" v-for="(item, index) in model.ListShow">
<uni-collapse-item :title="(index+1) + '. ' + item.CHECKCONTENT" name="1">
<u-form-item label="检查内容" prop="CHECKCONTENT" borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.CHECKCONTENT"
border="none" inputAlign="right"></u--input>
</u-form-item>
<u-form-item v-if="model.ISDOWN==''" label="区域" prop="Nav_RiskArea.NAME" borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.Nav_RiskArea.NAME"
border="none" inputAlign="right"></u--input>
</u-form-item>
<u-form-item label="地址" prop="DESCREPTION" borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.DESCREPTION"
border="none" inputAlign="right"></u--input>
</u-form-item>
<!-- <u-form-item label="上报时间" prop="CREATE_TIME" borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.CREATE_TIME"
border="none" inputAlign="right"></u--input>
</u-form-item> -->
</uni-collapse-item>
</uni-card>
</uni-collapse>
</u--form>
</view>
</view>
</u-sticky>
<query-selector :show="selectorInfo.showPopup" :defaultChecked="selectorInfo.defaultChecked"
:title="selectorInfo.title" :lists="selectorInfo.dataLists" @search="handleSearch"
@select="handleSelected" @close="selectorInfo.showPopup=false" :total="selectorInfo.totalCount" />
</view>
</view>
</view>
</template>
<script>
import {
OrderPagedRiskArea,
PagedCheckMain
} from '../../services/apply'
import {
initFilter,
extendRule
} from '../../utils/common'
export default {
data() {
return {
OrgId: '',
pageIndex:0,
pageSize:20,
total:0,
model: {
RISK_AREA_NAME: '请选择区域',
RISK_AREA_ID: '',
ISDOWN: '否',
SchedulingType: '',
COUNT_WORKER: '',
COUNT_LEVEL: '',
START_TIME: '',
END_TIME: '',
SchedulingNEXTTIME: '',
LISTPERSON_SCHEDULING: [{
NAME: ''
}],
LISTUSER_LEAVE: [{
NAME: ''
}],
ListShow: []
},
radiolist: [{
value: false,
name: '否'
}, {
value: true,
name: '是'
}],
selectorInfo: {
showPopup: false,
totalCount: 0,
title: '班组名称',
// itemData: {},
index: 0,
dataLists: [],
defaultText: '',
defaultValue: '',
name: '',
defaultChecked: []
},
}
},
onLoad(option) {
if (option.RISK_AREA_ID)
this.model.RISK_AREA_ID = option.RISK_AREA_ID // 'FA89F8DA-0B46-4665-A8DD-3675829F6D6F'
this.OrgId = option.OrgId // 'B043B28B-BBC3-C452-6052-4FBA1457ABFA'
if (this.model.RISK_AREA_ID != undefined && this.model.RISK_AREA_ID != '') {
// this.PagedCheckMain()//
const json = initFilter(this.OrgId, null, "NAME", 0, 1);
json.IgnoreDataRule = true
json.Limit = 2
extendRule(json, "ID", 1, this.model.RISK_AREA_ID)
OrderPagedRiskArea(json).then(res => {
if (res != undefined && res.Data.length > 0) {
this.model.RISK_AREA_NAME = res.Data[0].NAME
}
})
}
},
onReady() {
//setRules
this.$refs.uForm.setRules(this.rules)
},
methods: {
PagedCheckMain(paginate) {
this.pageIndex++
const json = initFilter(this.OrgId, this.model.RISK_AREA_ID, "CREATE_TIME", 1, this.pageIndex, ((
this.model.ISDOWN == '否' || this.model.ISDOWN == '') ? false : true))
json.IgnoreDataRule = true
json.Limit = this.pageSize
json.SelectField = ["CHECKCONTENT", "DESCREPTION","Nav_RiskArea.NAME", "CREATE_TIME"]
PagedCheckMain(json).then(res => {
if (res.IsSuccessful) {
this.total=res.TotalCount
// this.model.ListShow = res.Data
if (paginate) {
this.model.ListShow= this.model.ListShow.concat(res.Data)
} else {
this.model.ListShow = res.Data
}
} else {
this.model.ListShow = [{
CHECKCONTENT: '',
DESCREPTION: ''
}]
}
})
},
doTrueOrFalse() {
if (this.model.RISK_AREA_ID != undefined && this.model.RISK_AREA_ID.length > 0)
this.PagedCheckMain();
},
closePicker() {
this.comPickerInfo = {
showSheet: false,
columns: [],
title: '',
name: '',
formIndex: undefined
}
},
//
handleChange() {
this.selectorInfo.showPopup = true
this.selectorInfo.title = '班组名称'
this.handleSearch()
},
//
handleSearch(val, pageIndex) {
var p = {
name: this.selectorInfo.name,
title: this.selectorInfo.title,
val: val,
pageIndex: pageIndex
}
this.handleShowSheet(p)
},
async handleShowSheet(p) {
var defaultChecked = []
const json = initFilter(this.OrgId, null, "NAME", 0, (p.pageIndex ?? 1));
json.IgnoreDataRule = true
json.Limit = 20
if (p.val) {
extendRule(json, "NAME", 9, p.val)
}
let dataSelect = await OrderPagedRiskArea(json).then(res => {
this.selectorInfo.totalCount = res.TotalCount
if (res != undefined && res.Data.length > 0) {
for (let i = 0; i < res.Data.length; i++) {
res.Data[i].name = res.Data[i].NAME
res.Data[i].code = res.Data[i].CODE
}
}
return res.Data
})
if (defaultChecked == null)
defaultChecked = []
if (dataSelect.length) {
this.selectorInfo = {
totalCount: this.selectorInfo.totalCount,
showPopup: true,
title: p.title,
name: p.name,
dataLists: dataSelect,
defaultChecked: defaultChecked
}
} else {
//
}
},
handleSelected(e) {
this.selectorInfo.showPopup = false
this.model.RISK_AREA_NAME = e.NAME
this.model.RISK_AREA_ID = e.ID
this.PagedCheckMain()
// this.WorkerScheduling()
}
},
onReachBottom() {
if (this.total > this.pageSize * this.pageIndex)
this.PagedCheckMain(true)
}
// watch: {
// keyword(n, o) {
// this.pageIndex = 0
// this.keyword = n
// this.PagedCheckMain()
// },
// searchStartTime(n, o) {
// this.pageIndex = 0
// this.searchStartTime = n
// this.PagedCheckMain()
// },
// filterStatus(n, o) {
// this.pageIndex = 0
// this.filterStatus = n
// this.PagedCheckMain()
// }
// }
}
</script>
<style>
.content {
background-color: #f4f7ff;
width: 100%;
/* #ifndef APP-PLUS */
height: calc(100vh - 44px - 50px); // APP
/* #endif */
/* #ifdef APP-PLUS */
height: calc(100vh); // APP
/* #endif */
}
.container {
padding: 20px 16px 10px 16px;
}
.form-sub {
/* margin: 20px 16px 10px 16px; */
/* border: 1px solid #EBEEF5; */
padding: 20px 30px 10px 30px;
/* box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 3px 1px; */
background-color: #ffffff;
border-radius: 10px;
}
.demo-ruleForm>>>.u-form-item__body__left__content__label {
font-size: 14px;
color: #8e8b9c;
/* justify-content: flex-start; */
}
.demo-ruleForm>>>.u-form-item__body__left__content__ {
left: -11px;
top: 0px
}
.demo-ruleForm>>>.u-textarea__field {
font-size: 14px;
}
.demo-ruleForm>>>.u-cell__title-text {
font-size: 14px;
}
.demo-ruleForm-thr>>>.u-textarea {
padding: 9px 9px 25px 9px;
}
.demo-ruleForm-thr>>>.u-form-item__body__left__content__label {
font-size: 14px;
color: #8e8b9c;
/* justify-content: flex-start; */
}
.demo-ruleForm-thr>>>.u-form-item__body__left__content__ {
left: -11px;
top: 0px
}
.demo-ruleForm-thr>>>.u-textarea__field {
font-size: 14px;
}
.demo-ruleForm-thr>>>.u-cell__title-text {
font-size: 14px;
}
.bottom-button {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 10px 16px;
box-sizing: border-box;
background: #f4f7ff;
z-index: 999;
}
</style>

333
pages/apply/viewRisk.vue Normal file
View File

@ -0,0 +1,333 @@
<template>
<!-- 隐患查看 -->
<view class="content">
<view class="container">
<view class="form-sub">
<u-form :model="model" ref="uForm" label-width="90px" class="demo-ruleForm" size="mini">
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;">隐患信息</view>
<u-form-item label="区域名称" prop="RISK_AREA_NAME" borderBottom ref="item1"
@click="handleShowSheet({title: '区域名称'})">
<u--input v-model="model.RISK_AREA_NAME" border="none" suffixIcon="arrow-right"
customStyle="margin:0px;display:flex;padding:3px 9px"
suffixIconStyle="font-size:12px"></u--input>
</u-form-item>
<u-form-item label="包含下级区域" prop="ISDOWN" borderBottom>
<u-radio-group v-model="model.ISDOWN" style="display: flex;flex-direction: row"
placement="column">
<u-radio :customStyle="{marginBottom: '4px',marginTop: '4px' ,marginLeft:'15px' }"
v-for="(item, index) in radiolist" :key="index" :label="item.name" :name="item.name"
@change="doTrueOrFalse()" />
</u-radio-group>
</u-form-item>
</u-form>
<!-- 动态加载隐患信息 -->
<u-sticky offset-top="20">
<view class="sub-form">
<view class="sub-form-wrap">
<u--form labelPosition="left" labelWidth="auto" labelAlign="center"
errorType="border-bottom" style="margin-bottom: 50px;" ref="sForm">
<uni-collapse :border="false" accordion>
<uni-card style="margin-bottom: 5px;" margin="0" spacing="0" :is-shadow="false"
v-for="(item, index) in model.ListShow">
<uni-collapse-item :title="(index+1) + '. ' + item.CHECKCONTENT" name="1">
<u-form-item label="检查内容" prop="CHECKCONTENT" borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.CHECKCONTENT"
border="none" inputAlign="right"></u--input>
</u-form-item>
<u-form-item v-if="model.ISDOWN==''" label="区域" prop="Nav_RiskArea.NAME"
borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.Nav_RiskArea.NAME"
border="none" inputAlign="right"></u--input>
</u-form-item>
<u-form-item label="地址" prop="ADDRESS" borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.ADDRESS"
border="none" inputAlign="right"></u--input>
</u-form-item>
<u-form-item label="上报时间" prop="CREATE_TIME" borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.CREATE_TIME"
border="none" inputAlign="right"></u--input>
</u-form-item>
</uni-collapse-item>
</uni-card>
</uni-collapse>
</u--form>
</view>
</view>
</u-sticky>
<query-selector :show="selectorInfo.showPopup" :defaultChecked="selectorInfo.defaultChecked"
:title="selectorInfo.title" :lists="selectorInfo.dataLists" @search="handleSearch"
@select="handleSelected" @close="selectorInfo.showPopup=false" :total="selectorInfo.totalCount" />
</view>
</view>
</view>
</template>
<script>
import {
OrderPagedRiskArea,
PagedRisk
} from '../../services/apply'
import {
initFilter,
extendRule
} from '../../utils/common'
export default {
data() {
return {
OrgId: '',
pageIndex: 0,
pageSize: 20,
total: 0,
model: {
RISK_AREA_NAME: '请选择区域',
RISK_AREA_ID: '',
ISDOWN: '否',
SchedulingType: '',
COUNT_WORKER: '',
COUNT_LEVEL: '',
START_TIME: '',
END_TIME: '',
SchedulingNEXTTIME: '',
LISTPERSON_SCHEDULING: [{
NAME: ''
}],
LISTUSER_LEAVE: [{
NAME: ''
}],
ListShow: []
},
radiolist: [{
value: false,
name: '否'
}, {
value: true,
name: '是'
}],
selectorInfo: {
showPopup: false,
totalCount: 0,
title: '班组名称',
// itemData: {},
index: 0,
dataLists: [],
defaultText: '',
defaultValue: '',
name: '',
defaultChecked: []
},
}
},
onLoad(option) {
if (option.RISK_AREA_ID)
this.model.RISK_AREA_ID = option.RISK_AREA_ID // 'FA89F8DA-0B46-4665-A8DD-3675829F6D6F'
this.OrgId = option.OrgId // 'B043B28B-BBC3-C452-6052-4FBA1457ABFA'
if (this.model.RISK_AREA_ID != undefined && this.model.RISK_AREA_ID != '') {
this.PagedRisk() //
const json = initFilter(this.OrgId, null, "NAME", 0, 1);
json.IgnoreDataRule = true
json.Limit = 2
extendRule(json, "ID", 1, this.model.RISK_AREA_ID)
OrderPagedRiskArea(json).then(res => {
if (res != undefined && res.Data.length > 0) {
this.model.RISK_AREA_NAME = res.Data[0].NAME
}
})
}
},
onReady() {
//setRules
this.$refs.uForm.setRules(this.rules)
},
methods: {
PagedRisk(paginate) {
this.pageIndex++
const json = initFilter(this.OrgId, this.model.RISK_AREA_ID, "CREATE_TIME", 1, this.pageIndex, ((
this.model.ISDOWN == '否' || this.model.ISDOWN == '') ? false : true))
json.IgnoreDataRule = true
json.Limit = 20
json.SelectField = ["CHECKCONTENT", "ADDRESS", "CREATE_TIME", "Nav_RiskArea.NAME"]
PagedRisk(json).then(res => {
if (res.IsSuccessful) {
// this.model.ListShow = res.Data
this.total = res.TotalCount
if (paginate) {
this.model.ListShow = this.model.ListShow.concat(res.Data)
} else {
this.model.ListShow = res.Data
}
} else {
this.model.ListShow = [{
CHECKCONTENT: '',
ADDRESS: '',
CREATE_TIME: ''
}]
}
})
},
doTrueOrFalse() {
if (this.model.RISK_AREA_ID != undefined && this.model.RISK_AREA_ID.length > 0) {
this.pageIndex = 0
this.PagedRisk();
}
},
closePicker() {
this.comPickerInfo = {
showSheet: false,
columns: [],
title: '',
name: '',
formIndex: undefined
}
},
//
handleChange() {
this.selectorInfo.showPopup = true
this.selectorInfo.title = '班组名称'
this.handleSearch()
},
//
handleSearch(val, pageIndex) {
var p = {
name: this.selectorInfo.name,
title: this.selectorInfo.title,
val: val,
pageIndex: pageIndex
}
this.handleShowSheet(p)
},
async handleShowSheet(p) {
var defaultChecked = []
const json = initFilter(this.OrgId, null, "NAME", 0, (p.pageIndex ?? 1));
json.IgnoreDataRule = true
json.Limit = 20
if (p.val) {
extendRule(json, "NAME", 9, p.val)
}
let dataSelect = await OrderPagedRiskArea(json).then(res => {
this.selectorInfo.totalCount = res.TotalCount
if (res != undefined && res.Data.length > 0) {
for (let i = 0; i < res.Data.length; i++) {
res.Data[i].name = res.Data[i].NAME
res.Data[i].code = res.Data[i].CODE
}
}
return res.Data
})
if (defaultChecked == null)
defaultChecked = []
if (dataSelect.length) {
this.selectorInfo = {
totalCount: this.selectorInfo.totalCount,
showPopup: true,
title: p.title,
name: p.name,
dataLists: dataSelect,
defaultChecked: defaultChecked
}
} else {
//
}
},
handleSelected(e) {
this.selectorInfo.showPopup = false
this.model.RISK_AREA_NAME = e.NAME
this.model.RISK_AREA_ID = e.ID
this.PagedRisk()
// this.WorkerScheduling()
}
},
onReachBottom() {
if (this.total > this.pageSize * this.pageIndex)
this.PagedCheckMain(true)
}
}
</script>
<style>
.content {
background-color: #f4f7ff;
width: 100%;
/* #ifndef APP-PLUS */
height: calc(100vh - 44px - 50px); // APP
/* #endif */
/* #ifdef APP-PLUS */
height: calc(100vh); // APP
/* #endif */
}
.container {
padding: 20px 16px 10px 16px;
}
.form-sub {
/* margin: 20px 16px 10px 16px; */
/* border: 1px solid #EBEEF5; */
padding: 20px 30px 10px 30px;
/* box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 3px 1px; */
background-color: #ffffff;
border-radius: 10px;
}
.demo-ruleForm>>>.u-form-item__body__left__content__label {
font-size: 14px;
color: #8e8b9c;
/* justify-content: flex-start; */
}
.demo-ruleForm>>>.u-form-item__body__left__content__ {
left: -11px;
top: 0px
}
.demo-ruleForm>>>.u-textarea__field {
font-size: 14px;
}
.demo-ruleForm>>>.u-cell__title-text {
font-size: 14px;
}
.demo-ruleForm-thr>>>.u-textarea {
padding: 9px 9px 25px 9px;
}
.demo-ruleForm-thr>>>.u-form-item__body__left__content__label {
font-size: 14px;
color: #8e8b9c;
/* justify-content: flex-start; */
}
.demo-ruleForm-thr>>>.u-form-item__body__left__content__ {
left: -11px;
top: 0px
}
.demo-ruleForm-thr>>>.u-textarea__field {
font-size: 14px;
}
.demo-ruleForm-thr>>>.u-cell__title-text {
font-size: 14px;
}
.bottom-button {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 10px 16px;
box-sizing: border-box;
background: #f4f7ff;
z-index: 999;
}
</style>

345
pages/apply/viewVideo.vue Normal file
View File

@ -0,0 +1,345 @@
<template>
<!-- 视频查看 待开发-->
<view class="content">
<view class="container">
<view class="form-sub">
<u-form :model="model" ref="uForm" label-width="90px" class="demo-ruleForm" size="mini">
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;">隐患信息</view>
<u-form-item label="区域名称" prop="RISK_AREA_NAME" borderBottom ref="item1"
@click="handleShowSheet({title: '区域名称'})">
<u--input v-model="model.RISK_AREA_NAME" border="none" suffixIcon="arrow-right"
customStyle="margin:0px;display:flex;padding:3px 9px"
suffixIconStyle="font-size:12px"></u--input>
</u-form-item>
<u-form-item label="包含下级区域" prop="ISDOWN" borderBottom>
<u-radio-group v-model="model.ISDOWN" style="display: flex;flex-direction: row"
placement="column">
<u-radio :customStyle="{marginBottom: '4px',marginTop: '4px' ,marginLeft:'15px' }"
v-for="(item, index) in radiolist" :key="index" :label="item.name" :name="item.name"
@change="doTrueOrFalse()" />
</u-radio-group>
</u-form-item>
</u-form>
<!-- 动态加载隐患信息 -->
<u-sticky offset-top="20">
<view class="sub-form">
<view class="sub-form-wrap">
<u--form labelPosition="left" labelWidth="auto" labelAlign="center"
errorType="border-bottom" style="margin-bottom: 50px;" ref="sForm">
<uni-collapse :border="false" accordion>
<uni-card style="margin-bottom: 5px;" margin="0"
spacing="0" :is-shadow="false" v-for="(item, index) in model.ListShow">
<uni-collapse-item :title="(index+1) + '. ' + item.CHECKCONTENT" name="1">
<u-form-item label="检查内容" prop="CHECKCONTENT" borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.CHECKCONTENT"
border="none" inputAlign="right"></u--input>
</u-form-item>
<u-form-item v-if="model.ISDOWN==''" label="区域" prop="Nav_RiskArea.NAME" borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.Nav_RiskArea.NAME"
border="none" inputAlign="right"></u--input>
</u-form-item>
<u-form-item label="地址" prop="DESCREPTION" borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.DESCREPTION"
border="none" inputAlign="right"></u--input>
</u-form-item>
<!-- <u-form-item label="上报时间" prop="CREATE_TIME" borderBottom>
<u--input disabled disabledColor="#fff" v-model="item.CREATE_TIME"
border="none" inputAlign="right"></u--input>
</u-form-item> -->
</uni-collapse-item>
</uni-card>
</uni-collapse>
</u--form>
</view>
</view>
</u-sticky>
<query-selector :show="selectorInfo.showPopup" :defaultChecked="selectorInfo.defaultChecked"
:title="selectorInfo.title" :lists="selectorInfo.dataLists" @search="handleSearch"
@select="handleSelected" @close="selectorInfo.showPopup=false" :total="selectorInfo.totalCount" />
</view>
</view>
</view>
</template>
<script>
import {
OrderPagedRiskArea,
PagedCheckMain
} from '../../services/apply'
import {
initFilter,
extendRule
} from '../../utils/common'
export default {
data() {
return {
OrgId: '',
pageIndex:0,
pageSize:20,
total:0,
model: {
RISK_AREA_NAME: '请选择区域',
RISK_AREA_ID: '',
ISDOWN: '否',
SchedulingType: '',
COUNT_WORKER: '',
COUNT_LEVEL: '',
START_TIME: '',
END_TIME: '',
SchedulingNEXTTIME: '',
LISTPERSON_SCHEDULING: [{
NAME: ''
}],
LISTUSER_LEAVE: [{
NAME: ''
}],
ListShow: []
},
radiolist: [{
value: false,
name: '否'
}, {
value: true,
name: '是'
}],
selectorInfo: {
showPopup: false,
totalCount: 0,
title: '班组名称',
// itemData: {},
index: 0,
dataLists: [],
defaultText: '',
defaultValue: '',
name: '',
defaultChecked: []
},
}
},
onLoad(option) {
if (option.RISK_AREA_ID)
this.model.RISK_AREA_ID = option.RISK_AREA_ID // 'FA89F8DA-0B46-4665-A8DD-3675829F6D6F'
this.OrgId = option.OrgId // 'B043B28B-BBC3-C452-6052-4FBA1457ABFA'
if (this.model.RISK_AREA_ID != undefined && this.model.RISK_AREA_ID != '') {
// this.PagedCheckMain()//
const json = initFilter(this.OrgId, null, "NAME", 0, 1);
json.IgnoreDataRule = true
json.Limit = 2
extendRule(json, "ID", 1, this.model.RISK_AREA_ID)
OrderPagedRiskArea(json).then(res => {
if (res != undefined && res.Data.length > 0) {
this.model.RISK_AREA_NAME = res.Data[0].NAME
}
})
}
},
onReady() {
//setRules
this.$refs.uForm.setRules(this.rules)
},
methods: {
PagedCheckMain(paginate) {
this.pageIndex++
const json = initFilter(this.OrgId, this.model.RISK_AREA_ID, "CREATE_TIME", 1, this.pageIndex, ((
this.model.ISDOWN == '否' || this.model.ISDOWN == '') ? false : true))
json.IgnoreDataRule = true
json.Limit = this.pageSize
json.SelectField = ["CHECKCONTENT", "DESCREPTION","Nav_RiskArea.NAME", "CREATE_TIME"]
PagedCheckMain(json).then(res => {
if (res.IsSuccessful) {
this.total=res.TotalCount
// this.model.ListShow = res.Data
if (paginate) {
this.model.ListShow= this.model.ListShow.concat(res.Data)
} else {
this.model.ListShow = res.Data
}
} else {
this.model.ListShow = [{
CHECKCONTENT: '',
DESCREPTION: ''
}]
}
})
},
doTrueOrFalse() {
if (this.model.RISK_AREA_ID != undefined && this.model.RISK_AREA_ID.length > 0)
this.PagedCheckMain();
},
closePicker() {
this.comPickerInfo = {
showSheet: false,
columns: [],
title: '',
name: '',
formIndex: undefined
}
},
//
handleChange() {
this.selectorInfo.showPopup = true
this.selectorInfo.title = '班组名称'
this.handleSearch()
},
//
handleSearch(val, pageIndex) {
var p = {
name: this.selectorInfo.name,
title: this.selectorInfo.title,
val: val,
pageIndex: pageIndex
}
this.handleShowSheet(p)
},
async handleShowSheet(p) {
var defaultChecked = []
const json = initFilter(this.OrgId, null, "NAME", 0, (p.pageIndex ?? 1));
json.IgnoreDataRule = true
json.Limit = 20
if (p.val) {
extendRule(json, "NAME", 9, p.val)
}
let dataSelect = await OrderPagedRiskArea(json).then(res => {
this.selectorInfo.totalCount = res.TotalCount
if (res != undefined && res.Data.length > 0) {
for (let i = 0; i < res.Data.length; i++) {
res.Data[i].name = res.Data[i].NAME
res.Data[i].code = res.Data[i].CODE
}
}
return res.Data
})
if (defaultChecked == null)
defaultChecked = []
if (dataSelect.length) {
this.selectorInfo = {
totalCount: this.selectorInfo.totalCount,
showPopup: true,
title: p.title,
name: p.name,
dataLists: dataSelect,
defaultChecked: defaultChecked
}
} else {
//
}
},
handleSelected(e) {
this.selectorInfo.showPopup = false
this.model.RISK_AREA_NAME = e.NAME
this.model.RISK_AREA_ID = e.ID
this.PagedCheckMain()
// this.WorkerScheduling()
}
},
onReachBottom() {
if (this.total > this.pageSize * this.pageIndex)
this.PagedCheckMain(true)
}
// watch: {
// keyword(n, o) {
// this.pageIndex = 0
// this.keyword = n
// this.PagedCheckMain()
// },
// searchStartTime(n, o) {
// this.pageIndex = 0
// this.searchStartTime = n
// this.PagedCheckMain()
// },
// filterStatus(n, o) {
// this.pageIndex = 0
// this.filterStatus = n
// this.PagedCheckMain()
// }
// }
}
</script>
<style>
.content {
background-color: #f4f7ff;
width: 100%;
/* #ifndef APP-PLUS */
height: calc(100vh - 44px - 50px); // APP
/* #endif */
/* #ifdef APP-PLUS */
height: calc(100vh); // APP
/* #endif */
}
.container {
padding: 20px 16px 10px 16px;
}
.form-sub {
/* margin: 20px 16px 10px 16px; */
/* border: 1px solid #EBEEF5; */
padding: 20px 30px 10px 30px;
/* box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 3px 1px; */
background-color: #ffffff;
border-radius: 10px;
}
.demo-ruleForm>>>.u-form-item__body__left__content__label {
font-size: 14px;
color: #8e8b9c;
/* justify-content: flex-start; */
}
.demo-ruleForm>>>.u-form-item__body__left__content__ {
left: -11px;
top: 0px
}
.demo-ruleForm>>>.u-textarea__field {
font-size: 14px;
}
.demo-ruleForm>>>.u-cell__title-text {
font-size: 14px;
}
.demo-ruleForm-thr>>>.u-textarea {
padding: 9px 9px 25px 9px;
}
.demo-ruleForm-thr>>>.u-form-item__body__left__content__label {
font-size: 14px;
color: #8e8b9c;
/* justify-content: flex-start; */
}
.demo-ruleForm-thr>>>.u-form-item__body__left__content__ {
left: -11px;
top: 0px
}
.demo-ruleForm-thr>>>.u-textarea__field {
font-size: 14px;
}
.demo-ruleForm-thr>>>.u-cell__title-text {
font-size: 14px;
}
.bottom-button {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 10px 16px;
box-sizing: border-box;
background: #f4f7ff;
z-index: 999;
}
</style>

View File

@ -26,13 +26,10 @@
export default {
data() {
return {
DEPARTMENT_ID: 'B18F95F4-572A-E521-1412-FA8CE50DC98A',
DEPARTMENT_ID: '',//'B18F95F4-572A-E521-1412-FA8CE50DC98A',
RISK_AREA_ID: '',//8EB0A653-E785-46D9-B65E-17F49E77121E',
OrgId: '',
baseList: [
{
baseList: [{
name: "新增用户",
iconName: "man-add"
},
@ -48,8 +45,6 @@
// name: "",
// iconName: "info-circle"
// },
],
company: ''
}
@ -85,7 +80,7 @@
menuClick(menuInfo) {
uni.navigateTo({
url: menuInfo.url +'?DEPARTMENT_ID='+this.DEPARTMENT_ID+'&OrgId='+menuInfo.ORG_ID
url: menuInfo.url + '?DEPARTMENT_ID=' + this.DEPARTMENT_ID + '&OrgId=' + menuInfo.ORG_ID+'&RISK_AREA_ID='+this.RISK_AREA_ID
})
},
goCamera() {

View File

@ -36,3 +36,29 @@ export const WorkerScheduling = (params) => {
}
//获取区域
export const OrderPagedRiskArea = (params) => {
return request.send({
url: '/BI/H5Controller/OrderPagedRiskArea',
method: 'post',
data: params,
})
}
//隐患查看
export const PagedRisk = (params) => {
return request.send({
url: '/BI/H5Controller/PagedRisk',
method: 'post',
data: params,
})
}
//隐患查看
export const PagedCheckMain = (params) => {
return request.send({
url: '/BI/H5Controller/PagedCheckMain',
method: 'post',
data: params,
})
}

29
services/common.js Normal file
View File

@ -0,0 +1,29 @@
import request from '../utils/request.js'
//部门信息
export const DepartmentOrderPaged = (params) => {
params.isAll=true
return request.send({
url: '/BI/H5Controller/DepartmentOrderPaged',
method: 'post',
data: params,
})
}
//岗位
export const UserPostOrderPaged = (params) => {
params.isAll=true
return request.send({
url: '/BI/H5Controller/UserPostOrderPaged',
method: 'post',
data: params,
})
}
//组织岗位
export const DepartmentPostEntities = (params) => {
params.isAll=true
return request.send({
url: '/BI/H5Controller/DepartmentPostEntities',
method: 'post',
data: params,
})
}

View File

@ -24,20 +24,18 @@ export default {
let url = params.url;
let method = params.method || "get";
let data = params.data || {};
let isAll = false
if (params.isAll)
isAll = params.isAll
let header = {
// 'Blade-Auth': uni.getStorageSync('token') || '',
'Content-Type': 'application/json;charset=UTF-8',
// 'Content-Type': type === 'post' ? 'application/json' : 'application/x-www-form-urlencoded',// 'Content-Type': 'application/json;charset=UTF-8',
// 'Content-Type': 'application/json;charset=UTF-8',
'Content-Type': params.method === 'post' ? 'application/json' : 'application/json;charset=UTF-8',
// 'Authorization': 'Basic c2FiZXI6c2FiZXJfc2VjcmV0',
'Tenant': tenantId, // avue配置相关
...params.header
}
// if (method == "post") {
// header = {
// 'Content-Type': 'application/x-www-form-urlencoded',
// 'Tenant': tenantId,
// ...params.header
// };
// }
return new Promise((resolve, reject) => {
uni.request({
url: config.serviceHost(url),
@ -51,7 +49,10 @@ export default {
//获取成功
// console.log(res.statusCode);
if (res.statusCode == 200) {
resolve(res.data);
if (isAll)
resolve(res);
else
resolve(res.data);
} else {
uni.clearStorageSync()
switch (res.statusCode) {