flx:修改

This commit is contained in:
Rain_ 2025-10-16 09:18:43 +08:00
parent b10a6dd639
commit 6850d543f7
7 changed files with 438 additions and 422 deletions

View File

@ -3,11 +3,12 @@
// export const BASE_URL = "http://42.180.188.17:11211/" // export const BASE_URL = "http://42.180.188.17:11211/"
//export const BASE_URL = "http://192.168.8.100:10000" //export const BASE_URL = "http://192.168.8.100:10000"
//export const BASE_URL = "http://106.13.16.28:10000" //export const BASE_URL = "http://106.13.16.28:10000"
export const BASE_URL = "http://219.147.96.219:9809" // 包头 // export const BASE_URL = "http://219.147.96.219:9809" // 包头
// export const BASE_URL = process.env.NODE_ENV === 'development' ? "http://192.168.34.221:9111" : "http://jxj.zhgdyun.com:18000" // 包头 // export const BASE_URL = process.env.NODE_ENV === 'development' ? "http://192.168.34.221:9111" : "http://jxj.zhgdyun.com:18000" // 包头
// export const BASE_URL = process.env.NODE_ENV === 'development' ? "http://192.168.34.221:9111" : "http://219.147.96.219:9809" // 包头线上地址(正式) // export const BASE_URL = process.env.NODE_ENV === 'development' ? "http://192.168.34.221:9111" : "http://219.147.96.219:9809" // 包头线上地址(正式)
//是否已显示未登录弹窗 export const BASE_URL = process.env.NODE_ENV === 'development' ? "http://192.168.34.221:9111" : "http://192.168.3.9:39809" // 包头线上地址(内网)
//是否已显示未登录弹窗
let showNoLoginTip = false let showNoLoginTip = false
/** /**

813
main.js
View File

@ -1,7 +1,7 @@
import App from './App' import App from './App'
import { import {
createSSRApp createSSRApp
} from 'vue' } from 'vue'
import './uni.promisify.adaptor' import './uni.promisify.adaptor'
// import VueResource from "vue-resource"; // import VueResource from "vue-resource";
@ -40,437 +40,440 @@ import WFormItem from '@/components/WFormItem.vue'
import RoutingPopup from '@/components/form/routingPopup/routingPopup'; import RoutingPopup from '@/components/form/routingPopup/routingPopup';
import PreviewIframe from '@/components/previewIframe/previewIframe.vue'; import PreviewIframe from '@/components/previewIframe/previewIframe.vue';
import { import {
Row, Row,
Col, Col,
Popup, Popup,
Icon, Icon,
Field Field
} from 'vant'; } from 'vant';
export function createApp() { export function createApp() {
const app = createSSRApp(App) const app = createSSRApp(App)
app.component('WFormItem', WFormItem); app.component('WFormItem', WFormItem);
app.component('RoutingPopup', RoutingPopup); app.component('RoutingPopup', RoutingPopup);
app.component('PreviewIframe', PreviewIframe); app.component('PreviewIframe', PreviewIframe);
app.use(Popup); app.use(Popup);
app.use(Field); app.use(Field);
app.use(Icon); app.use(Icon);
app.use(Row); app.use(Row);
app.use(Col); app.use(Col);
app.use(uView); app.use(uView);
// 如此配置即可 // 如此配置即可
// uni.$u.config.unit = 'rpx' // uni.$u.config.unit = 'rpx'
app.component('uni-icons2', uniIcons2) app.component('uni-icons2', uniIcons2)
//全局变量 //全局变量
// app.config.globalProperties.mobileTopHeight = uni.getMenuButtonBoundingClientRect()?uni.getMenuButtonBoundingClientRect().top:0; // app.config.globalProperties.mobileTopHeight = uni.getMenuButtonBoundingClientRect()?uni.getMenuButtonBoundingClientRect().top:0;
// app.config.globalProperties.url_config = '' // app.config.globalProperties.url_config = ''
// app.config.globalProperties.COMPANY = "longguang" // app.config.globalProperties.COMPANY = "longguang"
// app.config.globalProperties.COMPANY = "nanchang" // app.config.globalProperties.COMPANY = "nanchang"
// app.config.globalProperties.COMPANY = "sanjiang" //部署三江h5需要打开/pages/projectManage/projectManage页面onload内容 // app.config.globalProperties.COMPANY = "sanjiang" //部署三江h5需要打开/pages/projectManage/projectManage页面onload内容
// app.config.globalProperties.COMPANY = "zjwj" // app.config.globalProperties.COMPANY = "zjwj"
// app.config.globalProperties.COMPANY = "sccr" // app.config.globalProperties.COMPANY = "sccr"
// app.config.globalProperties.COMPANY = "agjt" // 鞍钢集团环境 // app.config.globalProperties.COMPANY = "agjt" // 鞍钢集团环境
// app.config.globalProperties.COMPANY = "cpgs" // 成平高速环境 // app.config.globalProperties.COMPANY = "cpgs" // 成平高速环境
app.config.globalProperties.COMPANY = "" // 标准版 app.config.globalProperties.COMPANY = "" // 标准版
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// 开发环境 // 开发环境
console.log('开发环境') console.log('开发环境')
// app.config.globalProperties.url_config = "http://219.147.96.219:9809/" // 包头(正式) // app.config.globalProperties.url_config = "http://219.147.96.219:9809/" // 包头(正式)
// app.config.globalProperties.work_url = "http://219.147.96.219:19997" // 包头工作流线上地址(正式) // app.config.globalProperties.work_url = "http://219.147.96.219:19997" // 包头工作流线上地址(正式)
// app.config.globalProperties.url_config = "http://jxj.zhgdyun.com:18000/" // 包头 // app.config.globalProperties.url_config = "http://jxj.zhgdyun.com:18000/" // 包头
// app.config.globalProperties.work_url = "http://jxj.zhgdyun.com:18004" // 工作流线上地址 // app.config.globalProperties.work_url = "http://jxj.zhgdyun.com:18004" // 工作流线上地址
// app.config.globalProperties.url_config = 'http://47.93.215.234:9809/' // 鞍钢正式地址(弃用) // app.config.globalProperties.url_config = 'http://47.93.215.234:9809/' // 鞍钢正式地址(弃用)
// app.config.globalProperties.url_config = 'http://42.180.188.17:9809/' // 鞍钢正式地址 // app.config.globalProperties.url_config = 'http://42.180.188.17:9809/' // 鞍钢正式地址
// app.config.globalProperties.url_config = 'http://42.180.188.17:11211/' // 鞍钢测试地址 // app.config.globalProperties.url_config = 'http://42.180.188.17:11211/' // 鞍钢测试地址
// app.config.globalProperties.url_config = 'http://182.90.224.237:51234/' //雄哥内网穿透地址 // app.config.globalProperties.url_config = 'http://182.90.224.237:51234/' //雄哥内网穿透地址
// app.config.globalProperties.url_config = 'http://jxj.zhgdyun.com:61212/' //杰哥内网穿透地址 // app.config.globalProperties.url_config = 'http://jxj.zhgdyun.com:61212/' //杰哥内网穿透地址
// app.config.globalProperties.url_config = 'http://192.168.34.221:28888/' //郭圣雄本地 // app.config.globalProperties.url_config = 'http://192.168.34.221:28888/' //郭圣雄本地
app.config.globalProperties.url_config = 'http://192.168.34.221:9111/' //郭圣雄本地 // app.config.globalProperties.url_config = 'http://192.168.34.221:9111/' //郭圣雄本地
app.config.globalProperties.work_url = 'http://192.168.34.133:5173' // 工作流地址 app.config.globalProperties.url_config = 'http://101.43.164.214:11000/' //包头映射
// app.config.globalProperties.url_config = 'http://182.90.224.237:51234/' //郭圣雄本地 app.config.globalProperties.work_url = 'http://192.168.34.133:5173/wflowApp/#/' // 工作流地址
// app.config.globalProperties.url_config = 'http://192.168.34.155:19111/' //彭洁本地 // app.config.globalProperties.url_config = 'http://182.90.224.237:51234/' //郭圣雄本地
// app.config.globalProperties.work_url = 'http://47.93.215.234:19997' // 工作流线上地址(弃用) // app.config.globalProperties.url_config = 'http://192.168.34.155:19111/' //彭洁本地
// app.config.globalProperties.work_url = 'http://42.180.188.17:19997' // 工作流线上地址 // app.config.globalProperties.work_url = 'http://47.93.215.234:19997' // 工作流线上地址(弃用)
// app.config.globalProperties.work_url = 'http://42.180.188.17:19097' // 工作流测试地址 // app.config.globalProperties.work_url = 'http://42.180.188.17:19997' // 工作流线上地址
// app.config.globalProperties.work_url = 'http://42.180.188.17:19097' // 工作流测试地址
// app.config.globalProperties.work_url = 'http://192.168.34.138:5173' // 工作流地址 // app.config.globalProperties.work_url = 'http://192.168.34.138:5173' // 工作流地址
// app.config.globalProperties.work_url = 'http://139.9.66.234:5173' // 工作流地址 // app.config.globalProperties.work_url = 'http://139.9.66.234:5173' // 工作流地址
// app.config.globalProperties.work_url = 'http://192.168.34.126:5173' // 工作流地址 // app.config.globalProperties.work_url = 'http://192.168.34.126:5173' // 工作流地址
// app.config.globalProperties.url_config = 'http://8.142.139.165:7080/' // 湖里 // app.config.globalProperties.url_config = 'http://8.142.139.165:7080/' // 湖里
// app.config.globalProperties.url_config = 'http://139.9.66.234:5173/' // app.config.globalProperties.url_config = 'http://139.9.66.234:5173/'
// app.config.globalProperties.url_config = 'http://192.168.34.125:6023/' // app.config.globalProperties.url_config = 'http://192.168.34.125:6023/'
// app.config.globalProperties.url_config = 'http://182.90.224.237:7000/' //广西联通 // app.config.globalProperties.url_config = 'http://182.90.224.237:7000/' //广西联通
// app.config.globalProperties.url_config = 'http://124.71.67.160:8088/'//中建四局 // app.config.globalProperties.url_config = 'http://124.71.67.160:8088/'//中建四局
// app.config.globalProperties.url_config = 'http://192.168.34.148:6023' //广西联通/本地 // app.config.globalProperties.url_config = 'http://192.168.34.148:6023' //广西联通/本地
// app.config.globalProperties.url_config = 'http://223.82.100.80:9000/' // app.config.globalProperties.url_config = 'http://223.82.100.80:9000/'
// app.config.globalProperties.url_config = 'http://120.236.247.200:9000/' // app.config.globalProperties.url_config = 'http://120.236.247.200:9000/'
// app.config.globalProperties.url_config = 'http://zhgd.loganwy.com/' // app.config.globalProperties.url_config = 'http://zhgd.loganwy.com/'
// app.config.globalProperties.url_config = 'http://183.60.227.61:30249/' // app.config.globalProperties.url_config = 'http://183.60.227.61:30249/'
// app.config.globalProperties.url_config = 'http://183.60.227.61:30249/' // app.config.globalProperties.url_config = 'http://183.60.227.61:30249/'
// app.config.globalProperties.url_config = 'http://124.71.178.44:9000/' // app.config.globalProperties.url_config = 'http://124.71.178.44:9000/'
// app.config.globalProperties.url_config = "http://58.34.63.88:9090/" // app.config.globalProperties.url_config = "http://58.34.63.88:9090/"
// app.config.globalProperties.url_config = "http://183.95.84.34:7185/" // app.config.globalProperties.url_config = "http://183.95.84.34:7185/"
// app.config.globalProperties.url_config = "http://218.92.215.138:9090/" //新佳城小区 123456 // app.config.globalProperties.url_config = "http://218.92.215.138:9090/" //新佳城小区 123456
// app.config.globalProperties.url_config = "http://36.137.53.203:9090/" //南昌地铁 gdjt 123456 // app.config.globalProperties.url_config = "http://36.137.53.203:9090/" //南昌地铁 gdjt 123456
// app.config.globalProperties.url_config = 'http://124.71.178.44:8/' // app.config.globalProperties.url_config = 'http://124.71.178.44:8/'
// app.config.globalProperties.url_config = 'http://124.71.87.250/' // app.config.globalProperties.url_config = 'http://124.71.87.250/'
// app.config.globalProperties.url_config = 'http://124.71.178.44:8012' // 河南 // app.config.globalProperties.url_config = 'http://124.71.178.44:8012' // 河南
// app.config.globalProperties.url_config = 'http://182.90.224.147:100/' //演示平台 // app.config.globalProperties.url_config = 'http://182.90.224.147:100/' //演示平台
// app.config.globalProperties.url_config = 'http://192.168.34.116:6023/'//邱平毅本地 // app.config.globalProperties.url_config = 'http://192.168.34.116:6023/'//邱平毅本地
// app.config.globalProperties.url_config = 'http://182.90.224.147:18170'//瑞士恒通 // app.config.globalProperties.url_config = 'http://182.90.224.147:18170'//瑞士恒通
// app.config.globalProperties.url_config = 'https://jxjzhgd.yyvtl.com:8443/'//三江 // app.config.globalProperties.url_config = 'https://jxjzhgd.yyvtl.com:8443/'//三江
// app.config.globalProperties.url_config = 'http://192.168.34.221:30002'//郭圣熊本地 // app.config.globalProperties.url_config = 'http://192.168.34.221:30002'//郭圣熊本地
// app.config.globalProperties.url_config = 'http://192.168.34.221:8188'//中建四局本地 // app.config.globalProperties.url_config = 'http://192.168.34.221:8188'//中建四局本地
// app.config.globalProperties.url_config = 'http://101.43.164.214:12350'//中建五局 // app.config.globalProperties.url_config = 'http://101.43.164.214:12350'//中建五局
// app.config.globalProperties.url_config = 'http://42.194.144.62:8088'//新中建四局地址 // app.config.globalProperties.url_config = 'http://42.194.144.62:8088'//新中建四局地址
// app.config.globalProperties.url_config = 'http://192.168.34.221:11111/'//郭圣雄三江本地 // app.config.globalProperties.url_config = 'http://192.168.34.221:11111/'//郭圣雄三江本地
// app.config.globalProperties.url_config = 'http://182.90.224.147:15551'//成润线上 // app.config.globalProperties.url_config = 'http://182.90.224.147:15551'//成润线上
// app.config.globalProperties.url_config = 'http://118.121.198.147:23232'//成润正式 // app.config.globalProperties.url_config = 'http://118.121.198.147:23232'//成润正式
// app.config.globalProperties.url_config = 'http://huli.zjzhiliao.com/jxjgdapi'//金林湾测试 // app.config.globalProperties.url_config = 'http://huli.zjzhiliao.com/jxjgdapi'//金林湾测试
// app.config.globalProperties.url_config = 'http://8.136.222.164:8808/'//中科安信 // app.config.globalProperties.url_config = 'http://8.136.222.164:8808/'//中科安信
// app.config.globalProperties.url_config = 'http://101.43.164.214:11111/'// 百色三标段 // app.config.globalProperties.url_config = 'http://101.43.164.214:11111/'// 百色三标段
} else { } else {
// 生产环境 // 生产环境
console.log('生产环境') console.log('生产环境')
app.config.globalProperties.url_config = "http://219.147.96.219:9809/" // 包头(正式) app.config.globalProperties.url_config = "http://192.168.3.9:39809/" // 包头(内网)
app.config.globalProperties.work_url = "http://219.147.96.219:19997" // 包头工作流线上地址(正式) app.config.globalProperties.work_url = "http://192.168.3.9:39809/wflowApp/#/" // 包头工作流线上地址(内网)
// app.config.globalProperties.url_config = "http://jxj.zhgdyun.com:18000/" // 包头 // app.config.globalProperties.url_config = "http://219.147.96.219:9809/" // 包头(正式)
// app.config.globalProperties.work_url = "http://jxj.zhgdyun.com:18004" // 包头工作流线上地址 // app.config.globalProperties.work_url = "http://219.147.96.219:19997" // 包头工作流线上地址(正式)
// app.config.globalProperties.url_config = 'http://10.168.1.105:11111/' // 线上地址 // app.config.globalProperties.url_config = "http://jxj.zhgdyun.com:18000/" // 包头
// app.config.globalProperties.url_config = 'http://10.168.1.104:11111/' // 线上地址 // app.config.globalProperties.work_url = "http://jxj.zhgdyun.com:18004" // 包头工作流线上地址
// app.config.globalProperties.url_config = 'http://47.93.215.234:9809/' // 鞍钢线上地址(弃用) // app.config.globalProperties.url_config = 'http://10.168.1.105:11111/' // 线上地址
// app.config.globalProperties.url_config = 'http://42.180.188.17:9809/' // 鞍钢线上地址 // app.config.globalProperties.url_config = 'http://10.168.1.104:11111/' // 线上地址
// app.config.globalProperties.url_config = 'http://42.180.188.17:11211/' // 鞍钢线上测试地址 // app.config.globalProperties.url_config = 'http://47.93.215.234:9809/' // 鞍钢线上地址(弃用)
// app.config.globalProperties.url_config = 'http://182.90.224.237:51234/' // 百色三标段 // app.config.globalProperties.url_config = 'http://42.180.188.17:9809/' // 鞍钢线上地址
// app.config.globalProperties.url_config = 'http://192.168.34.221:9111/' // 百色三标段 // app.config.globalProperties.url_config = 'http://42.180.188.17:11211/' // 鞍钢线上测试地址
// app.config.globalProperties.work_url = 'http://47.93.215.234:19997' // 工作流线上地址(弃用) // app.config.globalProperties.url_config = 'http://182.90.224.237:51234/' // 百色三标段
// app.config.globalProperties.work_url = 'http://42.180.188.17:19997' // 工作流线上地址 // app.config.globalProperties.url_config = 'http://192.168.34.221:9111/' // 百色三标段
// app.config.globalProperties.work_url = 'http://42.180.188.17:19097' // 工作流测试地址 // app.config.globalProperties.work_url = 'http://47.93.215.234:19997' // 工作流线上地址(弃用)
// app.config.globalProperties.work_url = 'http://192.168.34.139:5173' // 工作流地址 // app.config.globalProperties.work_url = 'http://42.180.188.17:19997' // 工作流线上地址
// app.config.globalProperties.url_config = 'http://182.90.224.147:100/' //演示平台 // app.config.globalProperties.work_url = 'http://42.180.188.17:19097' // 工作流测试地址
// app.config.globalProperties.url_config ='http://124.71.178.44:8012/' // 河南 // app.config.globalProperties.work_url = 'http://192.168.34.139:5173' // 工作流地址
// app.config.globalProperties.url_config = 'http://8.142.139.165:7080/' //湖里 // app.config.globalProperties.url_config = 'http://182.90.224.147:100/' //演示平台
// app.config.globalProperties.url_config = 'http://139.9.66.234:8/' // app.config.globalProperties.url_config ='http://124.71.178.44:8012/' // 河南
// app.config.globalProperties.url_config = 'http://192.168.34.125:6023/' // app.config.globalProperties.url_config = 'http://8.142.139.165:7080/' //湖里
// app.config.globalProperties.url_config = 'http://182.90.224.237:7000/' //广西联通 // app.config.globalProperties.url_config = 'http://139.9.66.234:8/'
// app.config.globalProperties.url_config = 'http://124.71.67.160:8088/' //中建四局 // app.config.globalProperties.url_config = 'http://192.168.34.125:6023/'
// app.config.globalProperties.url_config = 'http://192.168.34.148:6023' //广西联通/本地 // app.config.globalProperties.url_config = 'http://182.90.224.237:7000/' //广西联通
// app.config.globalProperties.url_config = 'http://223.82.100.80:9000/' // app.config.globalProperties.url_config = 'http://124.71.67.160:8088/' //中建四局
// app.config.globalProperties.url_config = 'http://120.236.247.200:9000/' // app.config.globalProperties.url_config = 'http://192.168.34.148:6023' //广西联通/本地
// app.config.globalProperties.url_config = "http://58.34.63.88:9090/" // app.config.globalProperties.url_config = 'http://223.82.100.80:9000/'
// app.config.globalProperties.url_config = 'http://124.71.178.44:9000/' // app.config.globalProperties.url_config = 'http://120.236.247.200:9000/'
// app.config.globalProperties.url_config = "http://183.95.84.34:7185/" // app.config.globalProperties.url_config = "http://58.34.63.88:9090/"
// app.config.globalProperties.url_config = "http://36.137.53.203:9090/" // app.config.globalProperties.url_config = 'http://124.71.178.44:9000/'
// app.config.globalProperties.url_config = 'http://192.168.34.125:6023/' // app.config.globalProperties.url_config = "http://183.95.84.34:7185/"
// app.config.globalProperties.url_config = 'http://183.60.227.61:30249/' // app.config.globalProperties.url_config = "http://36.137.53.203:9090/"
// app.config.globalProperties.url_config = 'http://zhgd.loganwy.com/' // app.config.globalProperties.url_config = 'http://192.168.34.125:6023/'
// app.config.globalProperties.url_config = "http://36.137.53.203:9090/" // app.config.globalProperties.url_config = 'http://183.60.227.61:30249/'
// app.config.globalProperties.url_config = 'http://124.71.87.250/' // app.config.globalProperties.url_config = 'http://zhgd.loganwy.com/'
// app.config.globalProperties.url_config = 'http://192.168.34.116:6023/'//邱平毅本地 // app.config.globalProperties.url_config = "http://36.137.53.203:9090/"
// app.config.globalProperties.url_config = 'http://182.90.224.147:18170/'//瑞士恒通 // app.config.globalProperties.url_config = 'http://124.71.87.250/'
// app.config.globalProperties.url_config = 'https://jxjzhgd.yyvtl.com:8443/'//三江 // app.config.globalProperties.url_config = 'http://192.168.34.116:6023/'//邱平毅本地
// app.config.globalProperties.url_config = 'http://192.168.34.221:8188/'//中建四局本地 // app.config.globalProperties.url_config = 'http://182.90.224.147:18170/'//瑞士恒通
// app.config.globalProperties.url_config= 'http://101.43.164.214:12350/'//中建五局 // app.config.globalProperties.url_config = 'https://jxjzhgd.yyvtl.com:8443/'//三江
// app.config.globalProperties.url_config = 'http://42.194.144.62:8088/'//新中建四局地址 // app.config.globalProperties.url_config = 'http://192.168.34.221:8188/'//中建四局本地
// app.config.globalProperties.url_config = 'http://192.168.34.221:11111/'//郭圣雄三江本地 // app.config.globalProperties.url_config= 'http://101.43.164.214:12350/'//中建五局
// app.config.globalProperties.url_config = 'http://182.90.224.147:15551/'//成润线上 // app.config.globalProperties.url_config = 'http://42.194.144.62:8088/'//新中建四局地址
// app.config.globalProperties.url_config = 'http://118.121.198.147:23232/'//成润正式 // app.config.globalProperties.url_config = 'http://192.168.34.221:11111/'//郭圣雄三江本地
// app.config.globalProperties.url_config = 'http://192.168.34.221:30002/'//郭圣雄本地 // app.config.globalProperties.url_config = 'http://182.90.224.147:15551/'//成润线上
// app.config.globalProperties.url_config = 'http://101.43.164.214:45022/'//盘锦 // app.config.globalProperties.url_config = 'http://118.121.198.147:23232/'//成润正式
// app.config.globalProperties.url_config = 'http://183.249.224.118:9000/'// 嘉兴项目 // app.config.globalProperties.url_config = 'http://192.168.34.221:30002/'//郭圣雄本地
// app.config.globalProperties.url_config = 'http://jxj.zhgdyun.com:30250/#/'// 演示平台H5 // app.config.globalProperties.url_config = 'http://101.43.164.214:45022/'//盘锦
// app.config.globalProperties.url_config = 'http://101.43.164.214:11111/'// 百色三标段 // app.config.globalProperties.url_config = 'http://183.249.224.118:9000/'// 嘉兴项目
// app.config.globalProperties.url_config = 'http://8.136.222.164:8808/'//中科安信 // app.config.globalProperties.url_config = 'http://jxj.zhgdyun.com:30250/#/'// 演示平台H5
} // app.config.globalProperties.url_config = 'http://101.43.164.214:11111/'// 百色三标段
// app.config.globalProperties.url_config = 'http://8.136.222.164:8808/'//中科安信
}
app.config.globalProperties.$formatDates = formatDates; app.config.globalProperties.$formatDates = formatDates;
//时间戳转换方法 date:时间戳数字 //时间戳转换方法 date:时间戳数字
function formatDates(date, fmt = 'yyyy-MM-dd HH:mm:ss') { function formatDates(date, fmt = 'yyyy-MM-dd HH:mm:ss') {
if (!date) { if (!date) {
return '' return ''
} }
if (date.length == 10) { if (date.length == 10) {
date = date * 1000; date = date * 1000;
} }
if (typeof date === 'string') { if (typeof date === 'string') {
date = date.replace('T', ' ').replace('Z', ''); date = date.replace('T', ' ').replace('Z', '');
date = new Date(date.replace(/-/g, '/')) date = new Date(date.replace(/-/g, '/'))
} }
if (typeof date === 'number') { if (typeof date === 'number') {
date = new Date(date) date = new Date(date)
} }
var o = { var o = {
'M+': date.getMonth() + 1, 'M+': date.getMonth() + 1,
'd+': date.getDate(), 'd+': date.getDate(),
'h+': date.getHours() % 12 === 0 ? 12 : date.getHours() % 12, 'h+': date.getHours() % 12 === 0 ? 12 : date.getHours() % 12,
'H+': date.getHours(), 'H+': date.getHours(),
'm+': date.getMinutes(), 'm+': date.getMinutes(),
's+': date.getSeconds(), 's+': date.getSeconds(),
'q+': Math.floor((date.getMonth() + 3) / 3), 'q+': Math.floor((date.getMonth() + 3) / 3),
'S': date.getMilliseconds() 'S': date.getMilliseconds()
} }
var week = { var week = {
'0': '\u65e5', '0': '\u65e5',
'1': '\u4e00', '1': '\u4e00',
'2': '\u4e8c', '2': '\u4e8c',
'3': '\u4e09', '3': '\u4e09',
'4': '\u56db', '4': '\u56db',
'5': '\u4e94', '5': '\u4e94',
'6': '\u516d' '6': '\u516d'
} }
if (/(y+)/.test(fmt)) { if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
} }
if (/(E+)/.test(fmt)) { if (/(E+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, ((RegExp.$1.length > 1) ? (RegExp.$1.length > 2 ? '\u661f\u671f' : '\u5468') : fmt = fmt.replace(RegExp.$1, ((RegExp.$1.length > 1) ? (RegExp.$1.length > 2 ? '\u661f\u671f' : '\u5468') :
'') + '') +
week[date.getDay() + '']) week[date.getDay() + ''])
} }
for (var k in o) { for (var k in o) {
if (new RegExp('(' + k + ')').test(fmt)) { if (new RegExp('(' + k + ')').test(fmt)) {
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k])
.length))) .length)))
} }
} }
return fmt return fmt
} }
function recursiveSearchFn(dataList, resultList = []) { function recursiveSearchFn(dataList, resultList = []) {
dataList.forEach(item => { dataList.forEach(item => {
if (item.appShow == 1) { if (item.appShow == 1) {
// return item; // return item;
item.operation = true; item.operation = true;
resultList.push(item); resultList.push(item);
} }
if (Array.isArray(item.menuList) && item.menuList.length > 0) { if (Array.isArray(item.menuList) && item.menuList.length > 0) {
return recursiveSearchFn(item.menuList, resultList); return recursiveSearchFn(item.menuList, resultList);
} }
}); });
return resultList; return resultList;
}; };
app.config.globalProperties.$recursiveSearchFn = recursiveSearchFn; app.config.globalProperties.$recursiveSearchFn = recursiveSearchFn;
function recursiveSearch(dataList, appPath) { function recursiveSearch(dataList, appPath) {
return dataList.find(item => { return dataList.find(item => {
// console.log(item.path, appPath, item.menuName) // console.log(item.path, appPath, item.menuName)
const path = item.path ? item.path : item.modulePath; const path = item.path ? item.path : item.modulePath;
if (path == appPath) { if (path == appPath) {
return item; return item;
} }
if (Array.isArray(item.menuList) && item.menuList.length > 0) { if (Array.isArray(item.menuList) && item.menuList.length > 0) {
return recursiveSearch(item.menuList, appPath); return recursiveSearch(item.menuList, appPath);
} }
return false; return false;
}); });
}; };
app.config.globalProperties.$recursiveSearch = recursiveSearch; app.config.globalProperties.$recursiveSearch = recursiveSearch;
let reqNum = 0; let reqNum = 0;
app.config.globalProperties.sendRequest = function(param) { app.config.globalProperties.sendRequest = function(param) {
var _self = this, var _self = this,
url = param.url, url = param.url,
method = param.method, method = param.method,
header = param.header || { header = param.header || {
'content-type': "application/json" 'content-type': "application/json"
}, },
data = param.data || {}, data = param.data || {},
token = "", token = "",
isalert = param.isalert || false, isalert = param.isalert || false,
hideLoading = param.hideLoading || false; hideLoading = param.hideLoading || false;
//拼接完整请求地址 //拼接完整请求地址
var requestUrl = app.config.globalProperties.url_config + url + '?lang=' + uni.getStorageSync('language'); var requestUrl = app.config.globalProperties.url_config + url + '?lang=' + uni.getStorageSync('language');
if (uni.getStorageSync('userInfo') && url != 'xmgl/base/login' && url != if (uni.getStorageSync('userInfo') && url != 'xmgl/base/login' && url !=
'xmgl/wirelessEducationQuestionSubject/getDeviceRandomEducationQuestion' && url != 'xmgl/wirelessEducationQuestionSubject/getDeviceRandomEducationQuestion' && url !=
'xmgl/wirelessEducationQuestionAnswer/add' && url != 'xmgl/wirelessEducationQuestionAnswer/add' && url !=
'xmgl/safeEducationQuestionAnswer/getAnswerWorkerInfo' && url != 'xmgl/safeEducationQuestionAnswer/getAnswerWorkerInfo' && url !=
'xmgl/safeEducationQuestionAnswer/add' && 'xmgl/safeEducationQuestionAnswer/add' &&
url != 'xmgl/safeEducationQuestion/selectSafeEducationQuestionInfo') { url != 'xmgl/safeEducationQuestion/selectSafeEducationQuestionInfo') {
if (JSON.parse(uni.getStorageSync('userInfo')).token) { if (JSON.parse(uni.getStorageSync('userInfo')).token) {
token = "Bearer " + JSON.parse(uni.getStorageSync('userInfo')).token; token = "Bearer " + JSON.parse(uni.getStorageSync('userInfo')).token;
header["Authorization"] = token header["Authorization"] = token
console.log("网络请求 token :" + token); console.log("网络请求 token :" + token);
} }
} }
// var timestamp = Date.parse(new Date());//时间戳 // var timestamp = Date.parse(new Date());//时间戳
// data["timestamp"] = timestamp; // data["timestamp"] = timestamp;
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
// data["device"] = "wxapp"; // data["device"] = "wxapp";
// data["ver"] = "1.1.30"; // data["ver"] = "1.1.30";
// #endif // #endif
// #ifdef APP-PLUS || H5 // #ifdef APP-PLUS || H5
// data["device"] = "iosapp"; // data["device"] = "iosapp";
// data["ver"] = "1.0.0"; // data["ver"] = "1.0.0";
// #endif // #endif
if (method) { if (method) {
method = method.toUpperCase(); //小写改为大写 method = method.toUpperCase(); //小写改为大写
} }
//加密sessionStorage.getItem("loginData") //加密sessionStorage.getItem("loginData")
// if (uni.getStorageSync("loginData") && data != {}) { // if (uni.getStorageSync("loginData") && data != {}) {
// console.log(url+"参数"); // console.log(url+"参数");
// console.log(data); // console.log(data);
// data = encryptByDES(data); // data = encryptByDES(data);
// } // }
//用户交互:加载圈 //用户交互:加载圈
if (!hideLoading && reqNum == 0) { if (!hideLoading && reqNum == 0) {
// uni.setLoadingOptions({ // uni.setLoadingOptions({
// title: '加载中...', // title: '加载中...',
// customLoading: '<img src="/static/bthgIcon/loading.gif">' // customLoading: '<img src="/static/bthgIcon/loading.gif">'
// }); // });
uni.showLoading({ uni.showLoading({
title: '加载中...', title: '加载中...',
}); });
// return // return
} }
reqNum++; reqNum++;
console.log("网络请求start", reqNum); console.log("网络请求start", reqNum);
// console.log(requestUrl, "网络请求start"); // console.log(requestUrl, "网络请求start");
// console.log(data, "网络请求data===================="); // console.log(data, "网络请求data====================");
//网络请求 //网络请求
uni.request({ uni.request({
url: requestUrl, url: requestUrl,
method: method, method: method,
header: header, header: header,
data: data, data: data,
success: res => { success: res => {
// console.log("网络请求success:" + JSON.stringify(res.data)); // console.log("网络请求success:" + JSON.stringify(res.data));
if (res.data.code && res.data.code != 200) { if (res.data.code && res.data.code != 200) {
if (res.data.code == 401 || res.data.code == 403) { if (res.data.code == 401 || res.data.code == 403) {
uni.showToast({ uni.showToast({
title: '登录过期,请重新登录', title: '登录过期,请重新登录',
icon: "none" icon: "none"
}) })
setTimeout(function() { setTimeout(function() {
uni.removeStorageSync('userInfo') uni.removeStorageSync('userInfo')
// uni.redirectTo({ // uni.redirectTo({
// url: '/pages/login/compatibleLogin?type=user' // url: '/pages/login/compatibleLogin?type=user'
// }) // })
uni.redirectTo({ uni.redirectTo({
url: '/pages/login/login' url: '/pages/login/login'
}) })
}, 1000) }, 1000)
} else { } else {
setTimeout(function() { setTimeout(function() {
if (!isalert) { if (!isalert) {
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,
icon: "none" icon: "none"
}) })
} }
}, 200) }, 200)
} }
typeof param.error == "function" && param.error(Data); typeof param.error == "function" && param.error(Data);
return; return;
} }
let Data = res.data; let Data = res.data;
// if (res.data.data && res.data.data.requestData) { // if (res.data.data && res.data.data.requestData) {
// let data = decryptByDES( // let data = decryptByDES(
// res.data.data.requestData, // res.data.data.requestData,
// res.data.data.encrypted // res.data.data.encrypted
// ); // );
// Data.data = JSON.parse(data); // Data.data = JSON.parse(data);
// console.log(url + "解密后的数据"); // console.log(url + "解密后的数据");
// console.log(Data); // console.log(Data);
// } // }
typeof param.success == "function" && param.success(Data); typeof param.success == "function" && param.success(Data);
}, },
fail: (e) => { fail: (e) => {
console.log("网络请求fail:" + JSON.stringify(e)); console.log("网络请求fail:" + JSON.stringify(e));
console.log(requestUrl, "requestUrl"); console.log(requestUrl, "requestUrl");
// uni.showModal({ // uni.showModal({
// content: "" + e.errMsg // content: "" + e.errMsg
// }); // });
uni.showToast({ uni.showToast({
title: '服务器开小差了呢,请您稍后再试', title: '服务器开小差了呢,请您稍后再试',
icon: 'none' icon: 'none'
}) })
typeof param.fail == "function" && param.fail(e.data); typeof param.fail == "function" && param.fail(e.data);
}, },
complete: () => { complete: () => {
typeof param.complete == "function" && param.complete(); typeof param.complete == "function" && param.complete();
console.log("网络请求end", reqNum); console.log("网络请求end", reqNum);
if (reqNum <= 0) return; if (reqNum <= 0) return;
reqNum--; reqNum--;
if (!hideLoading && reqNum == 0) { if (!hideLoading && reqNum == 0) {
uni.hideLoading(); uni.hideLoading();
} }
return; return;
} }
}); });
} }
const delayering = (dataList, newResult = []) => { const delayering = (dataList, newResult = []) => {
dataList.forEach((item) => { dataList.forEach((item) => {
if (Array.isArray(item.menuList) && item.menuList.length > 0) { if (Array.isArray(item.menuList) && item.menuList.length > 0) {
delayering(item.menuList, newResult) delayering(item.menuList, newResult)
} }
if (item.menuEquipment == 0 && item.actionList) { if (item.menuEquipment == 0 && item.actionList) {
newResult.unshift(item) newResult.unshift(item)
} }
}) })
return newResult; return newResult;
} }
// 判断按钮权限的函数 // 判断按钮权限的函数
app.config.globalProperties.checkBtnPermission = function(permission) { app.config.globalProperties.checkBtnPermission = function(permission) {
var permissions = delayering(JSON.parse(uni.getStorageSync("userInfo")).menuAuthority.menuList); var permissions = delayering(JSON.parse(uni.getStorageSync("userInfo")).menuAuthority.menuList);
// var permissions = store.state.userInfo.menuAuthority.menuList; // var permissions = store.state.userInfo.menuAuthority.menuList;
// console.log(111, permission.menuPath, permissions) // console.log(111, permission.menuPath, permissions)
permissions = permissions.filter( permissions = permissions.filter(
(x) => x.path == permission.menuPath (x) => x.path == permission.menuPath
)[0]; )[0];
console.log(permissions, '按钮权限') console.log(permissions, '按钮权限')
if (!permissions || !permissions.actionList) { if (!permissions || !permissions.actionList) {
return false; return false;
} }
let index = permissions.actionList.findIndex( let index = permissions.actionList.findIndex(
(x) => x.actionCode == permission.key (x) => x.actionCode == permission.key
) )
return index != -1 ? true : false; return index != -1 ? true : false;
} }
app.config.globalProperties.checkMenuPermission = function(permission) { app.config.globalProperties.checkMenuPermission = function(permission) {
var permissions = JSON.parse(uni.getStorageSync("userInfo")).menuAuthority.menuList; var permissions = JSON.parse(uni.getStorageSync("userInfo")).menuAuthority.menuList;
// var permissions = store.state.userInfo.menuAuthority.menuList; // var permissions = store.state.userInfo.menuAuthority.menuList;
permissions = permissions.filter( permissions = permissions.filter(
(x) => x.path == permission.menuPath (x) => x.path == permission.menuPath
)[0]; )[0];
if (!permissions) { if (!permissions) {
return false; return false;
} else { } else {
return true; return true;
} }
} }
function sizeFun() { function sizeFun() {
let scale = 0; let scale = 0;
uni.getSystemInfo({ uni.getSystemInfo({
success: function(res) { success: function(res) {
console.log(res.windowWidth) console.log(res.windowWidth)
const width = (res.windowWidth > 760 ? 1920 : 1520) const width = (res.windowWidth > 760 ? 1920 : 1520)
scale = res.windowWidth / width; scale = res.windowWidth / width;
} }
}) })
console.log(888444888, 58 * Math.min(scale, 2), scale) console.log(888444888, 58 * Math.min(scale, 2), scale)
return 58 * Math.min(scale, 2) return 58 * Math.min(scale, 2)
} }
//配置到全局方便使用 //配置到全局方便使用
app.config.globalProperties.$pageSize = sizeFun(); app.config.globalProperties.$pageSize = sizeFun();
return { return {
app app
} }
} }

View File

@ -2,8 +2,8 @@
"name" : "智慧工地系统", "name" : "智慧工地系统",
"appid" : "__UNI__4AA4101", "appid" : "__UNI__4AA4101",
"description" : "", "description" : "",
"versionName" : "1.3.2", "versionName" : "1.3.3",
"versionCode" : 132, "versionCode" : 133,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
@ -36,10 +36,10 @@
"VideoPlayer" : {}, "VideoPlayer" : {},
"Bluetooth" : {}, "Bluetooth" : {},
"SQLite" : {}, "SQLite" : {},
"Push" : {},
"FaceID" : {}, "FaceID" : {},
"Fingerprint" : {}, "Fingerprint" : {},
"Maps" : {} "Maps" : {},
"Push" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {
@ -192,7 +192,8 @@
"maps" : {} "maps" : {}
}, },
"router" : { "router" : {
"mode" : "hash" "mode" : "hash",
"base" : "/app/"
}, },
"optimization" : { "optimization" : {
"gpuAccelerated" : true, // GPU "gpuAccelerated" : true, // GPU

View File

@ -24,7 +24,7 @@
</picker> </picker>
</view> </view>
</view> </view>
<view class="alarm_main" :style="{paddingTop: (mobileTopHeight + 90) * 1.5 + 'rpx'}"> <view class="alarm_main" :style="{paddingTop: (mobileTopHeight + 90) * 1.8 + 'rpx'}">
<!-- <view class="alarm-item" v-for="(item,index) in listData" :key="index" @click="goHiidden()"> --> <!-- <view class="alarm-item" v-for="(item,index) in listData" :key="index" @click="goHiidden()"> -->
<view class="alarm-item" v-for="(item,index) in listData" :key="index"> <view class="alarm-item" v-for="(item,index) in listData" :key="index">
<view class="item-bottom"> <view class="item-bottom">
@ -54,7 +54,7 @@
<!-- <view class="header-info">未戴安全帽</view> --> <!-- <view class="header-info">未戴安全帽</view> -->
<!-- <view class="header-info">{{}}</view> --> <!-- <view class="header-info">{{}}</view> -->
<view class="header-info"> <view class="header-info">
{{ item.alarmType ? showType[item.alarmType].value : '' }} {{ item.alarmType ? (item.alarmType <= showType.length ? showType[item.alarmType].value : '') : '' }}
</view> </view>
<view class="logo"> <view class="logo">
<image src="/static/aiWarn/aiWarn.png"></image> <image src="/static/aiWarn/aiWarn.png"></image>
@ -106,6 +106,7 @@
import { import {
GetDateStr GetDateStr
} from "@/static/js/util.js" } from "@/static/js/util.js"
import dayjs from 'dayjs';
export default { export default {
data() { data() {
return { return {
@ -157,7 +158,7 @@
userInfo: {}, userInfo: {},
personTypeIndex: 0, personTypeIndex: 0,
searchForm: { searchForm: {
personType: 1, //1 2 personType: '', //1 2
attendanceDate: '' attendanceDate: ''
}, },
} }
@ -208,12 +209,14 @@
methods: { methods: {
changeDate(e) { changeDate(e) {
this.searchForm.attendanceDate = e.target.value console.log(e)
this.searchForm.attendanceDate = e.detail.value
this.pageNo = 1 this.pageNo = 1
this.getListData() this.getListData()
}, },
changePersonType(e) { changePersonType(e) {
this.personTypeIndex = e.target.value console.log(e)
this.personTypeIndex = e.detail.value
this.searchForm.personType = this.showType[this.personTypeIndex].id this.searchForm.personType = this.showType[this.personTypeIndex].id
this.pageNo = 1 this.pageNo = 1
this.getListData() this.getListData()
@ -227,8 +230,8 @@
projectSn: this.projectSn, projectSn: this.projectSn,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
startTime: this.searchForm.attendanceDate, startTime: dayjs(this.searchForm.attendanceDate).format('YYYY-MM-DD') + ' 00:00:00',
endTime: this.searchForm.attendanceDate, endTime: dayjs(this.searchForm.attendanceDate).format('YYYY-MM-DD') + ' 23:59:59',
alarmType: this.searchForm.personType, alarmType: this.searchForm.personType,
isPushed: 1 isPushed: 1
}, },
@ -247,7 +250,14 @@
} }
// console.log('--------') // console.log('--------')
// this.listData = res.result.records // this.listData = res.result.records
this.listData = [...this.listData, ...res.result.records] const resultList = res.result.records.map(item => {
return {
...item,
imageUrl: this.url_config.includes("http") ? this.url_config + 'image/' + item.imageUrl : item.imageUrl,
}
})
console.log('resultList', resultList)
this.listData = [...this.listData, ...resultList]
uni.hideLoading() // uni.hideLoading() //
} }
} }

View File

@ -78,6 +78,7 @@
pxToRpx, pxToRpx,
dateformat dateformat
} from "@/utils/tool.js"; } from "@/utils/tool.js";
import dayjs from "dayjs";
export default { export default {
components: { components: {
uCharts, uCharts,

View File

@ -62,7 +62,7 @@
}, { }, {
id: 2, id: 2,
urlImage: thematicActivitie, urlImage: thematicActivitie,
appName: "监造报", appName: "监造报",
appPath: '/project/purchasingManage/supervisionDaily' appPath: '/project/purchasingManage/supervisionDaily'
}] }]
}; };

View File

@ -3,7 +3,7 @@
<view class="fixedheader"> <view class="fixedheader">
<headers :showBack="true"> <headers :showBack="true">
<view class="headerName"> <view class="headerName">
监造 监造
</view> </view>
<view class="right" @click="screenData()"> <view class="right" @click="screenData()">
<image class="scancode" src="@/static/bthgIcon/screen.png" mode=""></image> <image class="scancode" src="@/static/bthgIcon/screen.png" mode=""></image>