小程序开发

dev_xd
lj7788@126.com 2025-08-02 15:44:20 +08:00
parent e9653574d6
commit daf407f5af
16 changed files with 1293 additions and 929 deletions

View File

@ -1,6 +1,6 @@
{
"files.associations": {
"*.wxml": "xml",
"*.wxml": "html",
"*.wxss": "css",
"*.wxs": "javascript"
},

View File

@ -1,123 +1,123 @@
{
"pages": [
"pages/login/login",
"pages/project_qr/index"
],
"subpackages": [
{
"root": "pageage",
"name": "pageage",
"pages": [
"project_flowable/approveTask/index",
"project_flowable/detailTask/index",
"project_flowable/subDepts/index",
"project_flowable/subDeptsUsers/index",
"project_video/list/index",
"project_video/info/index",
"project_list/index",
"project_info/index",
"project_more/index",
"project_safety/index",
"project_quality/index",
"sign_mags/index",
"project_problemmodify/list/index",
"project_problemmodify/info/index",
"project_problemmodify/modify/index",
"project_problemmodify/check/index",
"project_problemmodify/add/index",
"project_problemmodify/draft/index",
"project_subdepts/list/index",
"project_subdepts/add/index",
"project_subdepts/info/index",
"project_subgroups/list/index",
"project_subgroups/add/index",
"project_subgroups/info/index",
"project_subusers/list/index",
"project_subusers/add/index",
"project_subusers/info/index",
"project_magusers/list/index",
"project_magusers/add/index",
"project_magusers/info/index",
"project_schedule/list/index",
"project_schedule/add/index",
"project_schedule/info/index",
"project_checked/list/index",
"project_checked/add/index",
"project_checked/info/index",
"project_checked/handle/index"
],
"independent": false
}
],
"usingComponents": {
"van-row": "@vant/weapp/row",
"van-col": "@vant/weapp/col",
"van-popup": "@vant/weapp/popup/index",
"van-picker": "@vant/weapp/picker/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-radio": "@vant/weapp/radio/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-toast": "@vant/weapp/toast/index",
"ec-canvas": "ec-canvas/ec-canvas",
"van-sticky": "@vant/weapp/sticky",
"van-calendar": "@vant/weapp/calendar/index",
"van-icon": "@vant/weapp/icon/index",
"van-image": "@vant/weapp/image/index",
"pie-chart": "pages/components/pie-chart/index",
"deep-select": "pages/components/deep-select/index",
"select-btn": "pages/components/select-btn/index",
"bar-chart": "pages/components/bar-chart/index",
"bar-chart-warning": "pages/components/bar-chart-warning/index",
"pz-screen": "pages/components/pz-screen/index",
"pz-screen-training": "pages/components/pz-screen-training/index",
"pz-screen-training-index": "pages/components/pz-screen-training-index/index",
"select-date": "pages/components/select-date/index",
"voucher-select": "pages/components/voucher-select/index",
"voucher-selects": "pages/components/voucher-selects/index",
"voucher-selected": "pages/components/voucher-selected/index",
"voucher-date": "pages/components/voucher-date/index",
"voucher-datetime": "pages/components/voucher-datetime/index",
"file-uploader": "pages/components/file-uploader/index",
"file-uploader-all": "pages/components/file-uploader-all/index",
"project-select": "pages/components/project-select/index",
"safety-pie-chart": "./components/safety-pie-chart/index",
"safety-pie-charts": "./components/safety-pie-charts/index",
"safety-bar-chart": "./components/safety-bar-chart/index",
"safety-bar-charts": "./components/safety-bar-charts/index",
"safety-bar-chartss": "./components/safety-bar-chartss/index",
"voucher-many-select": "pages/components/voucher-many-select/index",
"sign": "pages/components/sign/sign",
"jyq-result": "pages/components/jyq-result/index",
"safety-number": "./components/number/index",
"select-person": "./components/select-person/index",
"select-roles": "./components/select-roles/index",
"select-group-person": "./components/select-group-person/index",
"select-group-position": "./components/select-group-position/index",
"select-group-plan": "./components/select-group-plan/index",
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
"van-dropdown-item": "@vant/weapp/dropdown-item/index",
"curve-echarts": "pages/components/curve-echarts/index",
"user-infos": "pages/components/user-infos/index"
},
"plugins": {
"ezplayer": {
"version": "1.0.9",
"provider": "wxf2b3a0262975d8c2"
}
},
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#191d28",
"navigationBarTextStyle": "white"
},
"style": "v2",
"sitemapLocation": "sitemap.json",
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"requiredPrivateInfos": [
"getLocation"
]
"pages": [
"pages/login/login",
"pages/project_qr/index"
],
"subpackages": [
{
"root": "pageage",
"name": "pageage",
"pages": [
"project_flowable/approveTask/index",
"project_flowable/detailTask/index",
"project_flowable/subDepts/index",
"project_flowable/subDeptsUsers/index",
"project_video/list/index",
"project_video/info/index",
"project_list/index",
"project_info/index",
"project_more/index",
"project_safety/index",
"project_quality/index",
"sign_mags/index",
"project_problemmodify/list/index",
"project_problemmodify/info/index",
"project_problemmodify/modify/index",
"project_problemmodify/check/index",
"project_problemmodify/add/index",
"project_problemmodify/draft/index",
"project_subdepts/list/index",
"project_subdepts/add/index",
"project_subdepts/info/index",
"project_subgroups/list/index",
"project_subgroups/add/index",
"project_subgroups/info/index",
"project_subusers/list/index",
"project_subusers/add/index",
"project_subusers/info/index",
"project_magusers/list/index",
"project_magusers/add/index",
"project_magusers/info/index",
"project_schedule/list/index",
"project_schedule/add/index",
"project_schedule/info/index",
"project_checked/list/index",
"project_checked/add/index",
"project_checked/info/index",
"project_checked/handle/index"
],
"independent": false
}
],
"usingComponents": {
"van-row": "@vant/weapp/row",
"van-col": "@vant/weapp/col",
"van-popup": "@vant/weapp/popup/index",
"van-picker": "@vant/weapp/picker/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-radio": "@vant/weapp/radio/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-toast": "@vant/weapp/toast/index",
"ec-canvas": "ec-canvas/ec-canvas",
"van-sticky": "@vant/weapp/sticky",
"van-calendar": "@vant/weapp/calendar/index",
"van-icon": "@vant/weapp/icon/index",
"van-image": "@vant/weapp/image/index",
"pie-chart": "pages/components/pie-chart/index",
"deep-select": "pages/components/deep-select/index",
"select-btn": "pages/components/select-btn/index",
"bar-chart": "pages/components/bar-chart/index",
"bar-chart-warning": "pages/components/bar-chart-warning/index",
"pz-screen": "pages/components/pz-screen/index",
"pz-screen-training": "pages/components/pz-screen-training/index",
"pz-screen-training-index": "pages/components/pz-screen-training-index/index",
"select-date": "pages/components/select-date/index",
"voucher-select": "pages/components/voucher-select/index",
"voucher-selects": "pages/components/voucher-selects/index",
"voucher-selected": "pages/components/voucher-selected/index",
"voucher-date": "pages/components/voucher-date/index",
"voucher-datetime": "pages/components/voucher-datetime/index",
"file-uploader": "pages/components/file-uploader/index",
"file-uploader-all": "pages/components/file-uploader-all/index",
"project-select": "pages/components/project-select/index",
"safety-pie-chart": "./components/safety-pie-chart/index",
"safety-pie-charts": "./components/safety-pie-charts/index",
"safety-bar-chart": "./components/safety-bar-chart/index",
"safety-bar-charts": "./components/safety-bar-charts/index",
"safety-bar-chartss": "./components/safety-bar-chartss/index",
"voucher-many-select": "pages/components/voucher-many-select/index",
"sign": "pages/components/sign/sign",
"jyq-result": "pages/components/jyq-result/index",
"safety-number": "./components/number/index",
"select-person": "./components/select-person/index",
"select-roles": "./components/select-roles/index",
"select-group-person": "./components/select-group-person/index",
"select-group-position": "./components/select-group-position/index",
"select-group-plan": "./components/select-group-plan/index",
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
"van-dropdown-item": "@vant/weapp/dropdown-item/index",
"curve-echarts": "pages/components/curve-echarts/index",
"user-infos": "pages/components/user-infos/index"
},
"plugins": {
"ezplayer": {
"version": "1.0.9",
"provider": "wxf2b3a0262975d8c2"
}
},
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#191d28",
"navigationBarTextStyle": "white"
},
"style": "v2",
"sitemapLocation": "sitemap.json",
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"requiredPrivateInfos": [
"getLocation"
]
}

View File

@ -1,4 +1,4 @@
<!--components/bar-chart/index.wxml-->
<view class="chart_canvas" style="height:{{height+'rpx'}}">
<ec-canvas id="{{ chartId }}" ec="{{ ec }}"></ec-canvas>
</view>
<ec-canvas id="{{ chartId }}" ec="{{ ec }}" force-use-old-canvas="true"></ec-canvas>
</view>

View File

@ -1,227 +1,240 @@
Component({
/**
* 组件的属性列表
*/
properties: {
dataTree: {
type: Array,
value: []
},
treeListIndex: { // 当期树形列表的索引
type: Number,
value: 1
},
isOpenAll: { // 是否展开全部节点
type: Boolean,
value: false
},
showCheckBox: { // 是否显示选择框
type: Boolean,
value: true
}
/**
* 组件的属性列表
*/
properties: {
dataTree: {
type: Array,
value: []
},
observers: {
'dataTree': function (params) {
this.setData({
tree: this._initSourceData(params)
})
}
treeListIndex: { // 当期树形列表的索引
type: Number,
value: 1
},
/**
* 组件的初始数据
*/
data: {
tree: [],
allChoiceIdList: [] // 所有选中的id数组
isOpenAll: { // 是否展开全部节点
type: Boolean,
value: false
},
/**
* 组件的方法列表
*/
methods: {
isOpen(e) {
const open = 'tree[' + e.currentTarget.dataset.index + '].open'
this.setData({
[open]: !this.data.tree[e.currentTarget.dataset.index].open
})
},
_initSourceData(nodes) {
nodes.forEach(element => {
if (element.checked === undefined) element.checked = 0
element.open = this.properties.isOpenAll // 是否展开
if (element.children && element.children.length > 0) element.children = this._initSourceData(element.children)
})
return nodes
},
/**
* 选择节点
* @param {*} e
*/
select(e) {
this._initSourceData(this.data.tree);
let item = e.currentTarget.dataset.item
if(item.children && item.children.length>0){
wx.showToast({
title: "请选择进度计划任务!",
icon: 'none',
duration: 600,
mask: true
});
return false;
}
item = this._handleClickItem(item)
this.data.tree = this._updateTree(this.data.tree, item)
this.setData({
tree: this.data.tree
})
this.data.allChoiceIdList = this.getAllChoiceId(this.data.tree)
this.triggerEvent('select', {
item: item,
idList: this.data.allChoiceIdList
}, {
bubbles: true,
composed: true
})
this.triggerEvent('clickItem', {
item: item
}, {
bubbles: true,
composed: true
})
},
// 选择冒泡事件
handleSelect(e) {
let parent = e.currentTarget.dataset.parent
let currentTap = e.detail.item
console.log('parent节点:', parent)
console.log('currentTap节点:', currentTap)
// 修正它的父节点
parent.children = this._updateTree(parent.children, currentTap)
const {
half,
all,
none
} = this.getChildState(parent.children)
// console.log(`half:${half},all:${all},none:${none}`)
if (half) parent.checked = -1
if (all) parent.checked = 1
if (none) parent.checked = 0
// 修正整个tree
this.data.tree = this._updateTree(this.data.tree, parent)
this.setData({
tree: this.data.tree
})
this.data.allChoiceIdList = this.getAllChoiceId(this.data.tree)
this.triggerEvent('select', {
item: parent,
idList: this.data.allChoiceIdList
}, {
bubbles: true,
composed: true
})
},
/**
* @method 处理点击选择
* @param {Object} node 节点对象
* @returns {Object} node 处理完毕的节点
* @description 有子节点则全选中或全取消当前为最底层单节点则选中或单取消
*/
_handleClickItem(node) {
switch (node.checked) {
case 0:
node.checked = 1
if (node.children && node.children.length > 0) node.children = this._allChoice(node.children)
break;
case 1:
node.checked = 0
if (node.children && node.children.length > 0) node.children = this._allCancel(node.children)
break;
default:
node.checked = 1
if (node.children && node.children.length > 0) node.children = this._allChoice(node.children)
break;
}
return node
},
/**
* @method 全选
* @param {Array} nodes 节点数组
* @returns {Array} nodes 处理完毕的节点数组
*/
_allChoice(nodes) {
if (nodes.length <= 0) return
for (let i = 0; i < nodes.length; i++) {
nodes[i].checked = 1
if (nodes[i].children && nodes[i].children.length > 0) nodes[i].children = this._allChoice(nodes[i].children)
}
return nodes
},
/**
* @method 全取消
* @param {Array} nodes 节点数组
* @returns {Array} nodes 处理完毕的节点数组
*/
_allCancel(nodes) {
if (nodes.length <= 0) return
for (let i = 0; i < nodes.length; i++) {
nodes[i].checked = 0
if (nodes[i].children && nodes[i].children.length > 0) nodes[i].children = this._allCancel(nodes[i].children)
}
return nodes
},
/**
* @method 更新tree
* @param {Array} tree 节点树
* @param {Object} newItem 需要替换新节点
* @description 找到tree中目标进行替换
*/
_updateTree(tree, newItem) {
if (!tree || tree.length <= 0) return
for (let i = 0; i < tree.length; i++) {
if (tree[i].id === newItem.id) {
tree[i] = newItem
break
} else {
if (tree[i].children && tree[i].children.length > 0) {
tree[i].children = this._updateTree(tree[i].children, newItem)
}
}
}
return tree
},
/**
* @method 获取子节点的状态
* @param {Array} node 节点数组
*/
getChildState(node) {
let all = true;
let none = true;
for (let i = 0, j = node.length; i < j; i++) {
const n = node[i];
if (n.checked === 1 || n.checked === -1) {
none = none && false;
}
if (n.checked === 0 || n.checked === -1) {
all = all && false
}
}
return {
all,
none,
half: !all && !none
};
},
// 获取所有选中的节点id
getAllChoiceId(nodes, res = []) {
for (let i = 0; i < nodes.length; i++) {
if (nodes[i].checked === 1) {
var obj = {}
obj.planId = nodes[i].id
obj.planName = nodes[i].taskName
res.push(obj)
}
if (nodes[i].children && nodes[i].children.length > 0) this.getAllChoiceId(nodes[i].children, res)
}
return res
}
showCheckBox: { // 是否显示选择框
type: Boolean,
value: true
},
multiple: { // 是否多选
type: Boolean,
value: true
}
},
observers: {
'dataTree': function (params) {
this.setData({
tree: this._initSourceData(params)
})
}
},
/**
* 组件的初始数据
*/
data: {
tree: [],
allChoiceIdList: [] // 所有选中的id数组
},
/**
* 组件的方法列表
*/
methods: {
isOpen(e) {
const open = 'tree[' + e.currentTarget.dataset.index + '].open'
this.setData({
[open]: !this.data.tree[e.currentTarget.dataset.index].open
})
},
_initSourceData(nodes) {
nodes.forEach(element => {
if (element.checked === undefined) element.checked = 0
element.open = this.properties.isOpenAll // 是否展开
if (element.children && element.children.length > 0) element.children = this._initSourceData(element.children)
})
return nodes
},
/**
* 选择节点
* @param {*} e
*/
select(e) {
this._initSourceData(this.data.tree);
let item = e.currentTarget.dataset.item
if (item.children && item.children.length > 0) {
wx.showToast({
title: "请选择进度计划任务!",
icon: 'none',
duration: 600,
mask: true
});
return false;
}
item = this._handleClickItem(item)
this.data.tree = this._updateTree(this.data.tree, item)
this.setData({
tree: this.data.tree
})
this.data.allChoiceIdList = this.getAllChoiceId(this.data.tree)
this.triggerEvent('select', {
item: item,
idList: this.data.allChoiceIdList
}, {
bubbles: true,
composed: true
})
this.triggerEvent('clickItem', {
item: item
}, {
bubbles: true,
composed: true
})
},
// 选择冒泡事件
handleSelect(e) {
let parent = e.currentTarget.dataset.parent
let currentTap = e.detail.item
console.log('parent节点:', parent)
console.log('currentTap节点:', currentTap)
// 修正它的父节点
parent.children = this._updateTree(parent.children, currentTap)
const {
half,
all,
none
} = this.getChildState(parent.children)
// console.log(`half:${half},all:${all},none:${none}`)
if (half) parent.checked = -1
if (all) parent.checked = 1
if (none) parent.checked = 0
// 修正整个tree
this.data.tree = this._updateTree(this.data.tree, parent)
this.setData({
tree: this.data.tree
})
this.data.allChoiceIdList = this.getAllChoiceId(this.data.tree)
this.triggerEvent('select', {
item: parent,
idList: this.data.allChoiceIdList
}, {
bubbles: true,
composed: true
})
},
handleClickItem(e) {
let item = e.detail.item;
this.triggerEvent('clickItem', {
item: item
}, {
bubbles: true,
composed: true
})
},
/**
* @method 处理点击选择
* @param {Object} node 节点对象
* @returns {Object} node 处理完毕的节点
* @description 有子节点则全选中或全取消当前为最底层单节点则选中或单取消
*/
_handleClickItem(node) {
switch (node.checked) {
case 0:
node.checked = 1
if (node.children && node.children.length > 0) node.children = this._allChoice(node.children)
break;
case 1:
node.checked = 0
if (node.children && node.children.length > 0) node.children = this._allCancel(node.children)
break;
default:
node.checked = 1
if (node.children && node.children.length > 0) node.children = this._allChoice(node.children)
break;
}
return node
},
/**
* @method 全选
* @param {Array} nodes 节点数组
* @returns {Array} nodes 处理完毕的节点数组
*/
_allChoice(nodes) {
if (nodes.length <= 0) return
for (let i = 0; i < nodes.length; i++) {
nodes[i].checked = 1
if (nodes[i].children && nodes[i].children.length > 0) nodes[i].children = this._allChoice(nodes[i].children)
}
return nodes
},
/**
* @method 全取消
* @param {Array} nodes 节点数组
* @returns {Array} nodes 处理完毕的节点数组
*/
_allCancel(nodes) {
if (nodes.length <= 0) return
for (let i = 0; i < nodes.length; i++) {
nodes[i].checked = 0
if (nodes[i].children && nodes[i].children.length > 0) nodes[i].children = this._allCancel(nodes[i].children)
}
return nodes
},
/**
* @method 更新tree
* @param {Array} tree 节点树
* @param {Object} newItem 需要替换新节点
* @description 找到tree中目标进行替换
*/
_updateTree(tree, newItem) {
if (!tree || tree.length <= 0) return
for (let i = 0; i < tree.length; i++) {
if (tree[i].id === newItem.id) {
tree[i] = newItem
break
} else {
if (tree[i].children && tree[i].children.length > 0) {
tree[i].children = this._updateTree(tree[i].children, newItem)
}
}
}
return tree
},
/**
* @method 获取子节点的状态
* @param {Array} node 节点数组
*/
getChildState(node) {
let all = true;
let none = true;
for (let i = 0, j = node.length; i < j; i++) {
const n = node[i];
if (n.checked === 1 || n.checked === -1) {
none = none && false;
}
if (n.checked === 0 || n.checked === -1) {
all = all && false
}
}
return {
all,
none,
half: !all && !none
};
},
// 获取所有选中的节点id
getAllChoiceId(nodes, res = []) {
for (let i = 0; i < nodes.length; i++) {
if (nodes[i].checked === 1) {
var obj = {}
obj.planId = nodes[i].id
obj.planName = nodes[i].taskName
res.push(obj)
}
if (nodes[i].children && nodes[i].children.length > 0) this.getAllChoiceId(nodes[i].children, res)
}
return res
}
}
})

View File

@ -1,22 +1,28 @@
<view wx:for="{{tree}}" wx:key="id" class="tree_container">
<!-- 一级菜单 -->
<view style="margin-left: {{treeListIndex*20}}rpx" class="tree-item">
<view class="tree-item-onOff" wx:if="{{item.children && item.children.length > 0}}" bindtap="isOpen" data-index="{{index}}">
<van-icon name="arrow-down" s class="{{item.open ? 'expand' : 'collapse'}}" />
</view>
<view class="tree-item-onOff" wx:else></view>
<view class="block_" bindtap="select" data-item="{{item}}" data-index="{{index}}">
<block wx:if="{{showCheckBox}}">
<image wx:if="{{item.checked === 1}}" src="https://xiangguan.sxyanzhu.com/profile/static/images/choice.png" class="check-box"></image>
<image wx:if="{{item.checked === 0}}" src="/images/unchoice.png" class="check-box"></image>
<image wx:if="{{item.checked === -1}}" src="/images/unfullChoice.png" class="check-box"></image>
</block>
<view class="tree-item-name">
<text class="tree-item-title {{item.checked === 1 ? 'tree-item-name-select' : '' }}">{{item.taskName}}<text class="tree-item-suffix"> {{item.scheduleNode}} % </text></text>
</view>
</view>
<!-- 一级菜单 -->
<view style="margin-left: {{treeListIndex*20}}rpx" class="tree-item">
<view class="tree-item-onOff" wx:if="{{item.children && item.children.length > 0}}" bindtap="isOpen"
data-index="{{index}}">
<van-icon name="arrow-down" s class="{{item.open ? 'expand' : 'collapse'}}" />
</view>
<!-- 二级菜单 -->
<categoryTree wx:if="{{item.children && item.children.length > 0 && item.open}}" data-parent="{{item}}" dataTree='{{ item.children }}' isOpenAll="{{isOpenAll}}" showCheckBox="{{showCheckBox}}" treeListIndex="{{treeListIndex+1}}" catch:select="handleSelect" />
<view class="tree-item-onOff" wx:else></view>
<view class="block_" bindtap="select" data-item="{{item}}" data-index="{{index}}">
<block wx:if="{{showCheckBox}}">
<image wx:if="{{item.checked === 1}}" src="https://xiangguan.sxyanzhu.com/profile/static/images/choice.png"
class="check-box"></image>
<image wx:if="{{item.checked === 0}}" src="/images/unchoice.png" class="check-box"></image>
<image wx:if="{{item.checked === -1}}" src="/images/unfullChoice.png" class="check-box"></image>
</block>
<view class="tree-item-name">
<text
class="tree-item-title {{item.checked === 1 && multiple ? 'tree-item-name-select' : '' }}">{{item.taskName}}<text
class="tree-item-suffix"> {{item.scheduleNode}} % </text></text>
</view>
</view>
</view>
<!-- 二级菜单 -->
<categoryTree wx:if="{{item.children && item.children.length > 0 && item.open}}" multiple="{{multiple}}"
data-parent="{{item}}" dataTree='{{ item.children }}' isOpenAll="{{isOpenAll}}" showCheckBox="{{showCheckBox}}"
treeListIndex="{{treeListIndex+1}}" catch:select="handleSelect" catch:clickItem="handleClickItem" />
</view>

View File

@ -1,66 +1,209 @@
// pageage/project_checked/add/index.js
import config from '../../../config'
import fmt from '../../../utils/date.js'
import {
getToken,
getUserInfo
} from '../../../utils/auth'
import {
projectCheckedList,
projectCheckedListCount
} from '../../../api/project'
import {
findPlanDatas,
findRecursionPlan,
findPreviousSchedule,
submitPlanSchedule
} from '../../../api/project'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
/**
* 页面的初始数据
*/
data: {
maxDate: new Date(2088, 1, 1).getTime(),
minDate: new Date().getTime() + (3600 * 48 * 1000),
form: {
taskName: '',
task: null,
intro: '',//验收描述
imageUrls: [],
groupDeptUser: '',//班组长
checkingDate: '',//验收时间
technicianUser: '',//技术专员
superviseUser: '',//监理专员
},
projectUserInfo: {},
projectId: "",
projectName: "",
initData: {},
pageNum: 1,
pageSize: 10,
total: 0,
listData: [],
//任务计划
picker: false,
planOptions: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../../pages/login/login',
})
}
const proUserInfo = getUserInfo();
this.setData({
projectUserInfo: proUserInfo.projectUserInfo,
projectId: app.globalData.useProjectId,
projectName: app.globalData.useProjectName,
initData: {
id: app.globalData.useProjectId,
text: app.globalData.useProjectName,
},
pageNum: 1,
pageSize: 10,
listData: [],
total: 0,
form: {
taskName: '',
task: null,
intro: '',
checkingDate: fmt(new Date()).format("YYYY-MM-DD HH:mm:ss"),
}
});
this.initPlanDatas();
},
//项目切换 返回值
onProjectSelect(e) {
let projectId = e.detail.id;
let projectName = e.detail.text;
app.globalData.useProjectId = projectId;
app.globalData.useProjectName = projectName;
this.onLoad();
},
/**
* 初始化计划
*/
initPlanDatas() {
findPlanDatas(app.globalData.useProjectId).then((res) => {
let treeDatas = this.buildTree(res.data, 1, "");
this.setData({
planOptions: treeDatas
})
});
},
closePicker() {
this.setData({
picker: false
})
},
/**
* 打开选择窗
*/
openPicker() {
this.setData({
picker: true
})
},
/**
* 构建树结构
* @param {*} all
* @param {*} id
*/
buildTree(all, id, path) {
let tmps = all.filter((d) => d.parentId == id);
if (tmps.length > 0) {
tmps.forEach((it) => {
it.fullPath = path ? path + "/" + it.taskName : it.taskName;
it.children = this.buildTree(all, it.taskId, it.fullPath);
});
}
return tmps;
},
handleClick: function (e) {
let item = e.detail.item;
if (item) {
this.setData({
form: {
task: item,
taskName: item.fullPath
},
picker: false
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
returnToPage: function () {
/*关闭当前页面,跳转到其它页面。*/
wx.redirectTo({
url: '../list/index',
})
},
onScrollToLower() {
let nal = Math.ceil(this.data.total / this.data.pageSize);
if (this.data.pageNum < nal) {
this.setData({
//pageNum: this.data.pageNum + 1
});
//this.getListData(this.data.activeState);
} else {
console.log("已经到底了,没有数据可加载!!!");
}
},
})

View File

@ -1,3 +1,4 @@
{
"usingComponents": {}
"usingComponents": {},
"navigationStyle": "custom"
}

View File

@ -0,0 +1,47 @@
/* pageage/project_checked/add/index.wxss */
.project-checked-add {
.max_content_scroll {
color: #89a4eb;
font-size: 28rpx;
padding: 60rpx 30rpx 30rpx;
width: calc(100% - 60rpx);
position: relative;
top: 140rpx;
.mt40 {
margin-top: 40rpx;
}
.add-info {
background-color: #514f4f8a;
color: #888;
margin-top: 16rpx;
line-height: 60rpx;
border-radius: 30rpx;
padding: 0rpx 30rpx;
}
.rectifier_title {
position: relative;
background: #27304f;
border-radius: 15rpx;
text-align: center;
padding: 20rpx 15rpx;
}
.rectifier_close {
position: absolute;
width: 50rpx;
height: 50rpx;
right: 20rpx;
top: 12rpx;
line-height: 60rpx;
text-align: center;
}
.add_textarea {
height: 60rpx;
}
}
}

View File

@ -1,2 +1,124 @@
<!--pageage/project_checked/add/index.wxml-->
<text>pageage/project_checked/add/index.wxml</text>
<wxs module="format" src="/utils/format.wxs"></wxs>
<view class="project-checked-add">
<view class="header_title ">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
</view>
</van-col>
<van-col span="15">
<view class="header_name">增加项目举牌验收</view>
</van-col>
</van-row>
</view>
</view>
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower"
style="padding:30rpx">
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
<view class="mt40">分包单位</view>
<view class="add-info">{{projectUserInfo.subDeptName}}</view>
<view class="mt40 markers inspect_info_title">工程部位</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写选择工程计划" placeholder-style="color:#6777aa;" bindtap="openPicker"
disabled model:value="{{form.taskName}}" />
<van-popup show="{{ picker }}" bind:close="closePicker" position="bottom">
<view class="rectifier_max">
<view class="rectifier_title">
<view class="rectifier_text">选择工程计划</view>
<view class="rectifier_close" bindtap="closePicker">
<van-icon name="cross" />
</view>
</view>
<view class="rectifier_list">
<view class="rectifier_list_height">
<select-group-plan dataTree="{{planOptions}}" isOpenAll="{{fales}}" showCheckBox="{{fales}}"
multiple="{{false}}" bind:clickItem="handleClick" />
</view>
</view>
</view>
</van-popup>
</view>
<view class="mt40 markers inspect_info_title">技术专员</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写选择工程计划" placeholder-style="color:#6777aa;" bindtap="openPicker"
disabled model:value="{{form.taskName}}" />
<van-popup show="{{ picker }}" bind:close="closePicker" position="bottom">
<view class="rectifier_max">
<view class="rectifier_title">
<view class="rectifier_text">选择工程计划</view>
<view class="rectifier_close" bindtap="closePicker">
<van-icon name="cross" />
</view>
</view>
<view class="rectifier_list">
<view class="rectifier_list_height">
<select-group-plan dataTree="{{planOptions}}" isOpenAll="{{fales}}" showCheckBox="{{fales}}"
multiple="{{false}}" bind:clickItem="handleClick" />
</view>
</view>
</view>
</van-popup>
</view>
<view class="mt40 markers inspect_info_title">监理员</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写选择工程计划" placeholder-style="color:#6777aa;" bindtap="openPicker"
disabled model:value="{{form.taskName}}" />
<van-popup show="{{ picker }}" bind:close="closePicker" position="bottom">
<view class="rectifier_max">
<view class="rectifier_title">
<view class="rectifier_text">选择工程计划</view>
<view class="rectifier_close" bindtap="closePicker">
<van-icon name="cross" />
</view>
</view>
<view class="rectifier_list">
<view class="rectifier_list_height">
<select-group-plan dataTree="{{planOptions}}" isOpenAll="{{fales}}" showCheckBox="{{fales}}"
multiple="{{false}}" bind:clickItem="handleClick" />
</view>
</view>
</view>
</van-popup>
</view>
<view class="mt40 markers inspect_info_title">结果描述</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写结果描述" placeholder-style="color:#6777aa;"
model:value="{{form.intro}}" />
</view>
<view class="mt40 markers inspect_info_title">验收时间</view>
<view class="inspect_info_content">
<voucher-datetime counts="5" placeholder="请选择完成时间" minDate="{{minDate}}" maxDate="{{maxDate}}"
model:value="{{form.checkingDate}}" currentDate="{{form.checkingDate}}"></voucher-datetime>
</view>
<view class="mt40 markers inspect_info_title">验收照片</view>
<view class="inspect_info_content">
<view class="inspect_info_content" style="margin-left: 10px;">
<file-uploader bindimages="onImagesArr"></file-uploader>
</view>
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="returnToPage">取消</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="submitSave">确认</view>
</view>
</scroll-view>
</view>

View File

@ -1 +1,39 @@
/* pageage/project_checked/add/index.wxss */
/* pageage/project_checked/add/index.wxss */
.project-checked-add .max_content_scroll {
color: #89a4eb;
font-size: 28rpx;
padding: 60rpx 30rpx 30rpx;
width: calc(100% - 60rpx);
position: relative;
top: 140rpx;
}
.project-checked-add .max_content_scroll .mt40 {
margin-top: 40rpx;
}
.project-checked-add .max_content_scroll .add-info {
background-color: #514f4f8a;
color: #888;
margin-top: 16rpx;
line-height: 60rpx;
border-radius: 30rpx;
padding: 0rpx 30rpx;
}
.project-checked-add .max_content_scroll .rectifier_title {
position: relative;
background: #27304f;
border-radius: 15rpx;
text-align: center;
padding: 20rpx 15rpx;
}
.project-checked-add .max_content_scroll .rectifier_close {
position: absolute;
width: 50rpx;
height: 50rpx;
right: 20rpx;
top: 12rpx;
line-height: 60rpx;
text-align: center;
}
.project-checked-add .max_content_scroll .add_textarea {
height: 60rpx;
}

View File

@ -19,269 +19,298 @@
</view>
<!-- 中间内容 -->
<view class="max_content">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<view class="gk_open" style="margin-top: 5rpx;border: 1px solid transparent;">
<van-collapse value="{{activeNames}}" bind:change="onCollChange">
<van-collapse-item title="项目基本信息" name="base">
<view class="gk_open_con">
<view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_12.png"></image>项目单位:<text>{{projectInfo.comName}}</text>
</view>
<view wx:if="{{projectInfo.province && projectInfo.city}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_1.png"></image>所属区域:<text>{{projectInfo.province+' - '+projectInfo.city}}</text>
</view>
<view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_2.png"></image>详细地址:<text>{{projectInfo.projectAddress}}</text>
</view>
<view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_3.png"></image>项目类型:<text>{{projectInfo.projectTypeName}}</text>
</view>
<view wx:if="{{false}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_4.png"></image>总建筑面积:<text>{{projectInfo.totalBuildingArea}}</text>
</view>
<view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_5.png"></image>计划开工日期:<text>{{projectInfo.scheduledStartTime}}</text>
</view>
<view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_6.png"></image>实际开工日期:<text>{{projectInfo.actualOperatingTime}}</text>
</view>
<view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_7.png"></image>计划竣工日期:<text>{{projectInfo.plannedCompletionTime}}</text>
</view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_8.png"></image>总工期:<text>{{projectInfo.projectTimeLimit + ' 天'}}</text>
</view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_10.png"></image>项目负责人:<text>{{projectInfo.projectPerson}}</text>
</view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_11.png"></image>负责人手机号:<text>{{projectInfo.projectPersonPhone}}</text>
</view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_15.png"></image>项目概述:<text>{{projectInfo.projectSummarize}}</text>
</view>
</view>
</van-collapse-item>
<van-collapse-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" title="建设及管理单位信息" name="dept">
<view class="construction_unit" wx:for="{{projectDeptsList}}" wx:key="index">
<view class="construction_unit_image">
<image src="https://xiangguan.sxyanzhu.com/profile/static/icon/web_zbdw.png"></image>
</view>
<view class="construction_unit_list">
<view class="construction_unit_title">{{item.deptType}}</view>
<view class="construction_unit_name">{{item.deptName}}</view>
<view class="construction_unit_phone" bindtap="calling" data-phone="{{item.phone}}">{{item.leader}} {{item.phone}}</view>
</view>
</view>
</van-collapse-item>
</van-collapse>
</view>
<view class="echarts_max" wx:if="{{(subDeptUserInfo.subDeptType=='1' || subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='6' && subDeptUserInfo.userPost!='8'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
劳务人员
<!-- <view class="module_see_info" bindtap="goLWGL">查看详情
<view class="max_content" style="max-height: calc(100% - 360rpx);overflow-y: auto;">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<view class="gk_open" style="margin-top: 5rpx;border: 1px solid transparent;">
<van-collapse value="{{activeNames}}" bind:change="onCollChange">
<van-collapse-item title="项目基本信息" name="base">
<view class="gk_open_con">
<view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_12.png"></image>
项目单位:<text>{{projectInfo.comName}}</text>
</view>
<view wx:if="{{projectInfo.province && projectInfo.city}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_1.png"></image>
所属区域:<text>{{projectInfo.province+' - '+projectInfo.city}}</text>
</view>
<view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_2.png"></image>
详细地址:<text>{{projectInfo.projectAddress}}</text>
</view>
<view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_3.png"></image>
项目类型:<text>{{projectInfo.projectTypeName}}</text>
</view>
<view wx:if="{{false}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_4.png"></image>
总建筑面积:<text>{{projectInfo.totalBuildingArea}}</text>
</view>
<view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_5.png"></image>
计划开工日期:<text>{{projectInfo.scheduledStartTime}}</text>
</view>
<view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_6.png"></image>
实际开工日期:<text>{{projectInfo.actualOperatingTime}}</text>
</view>
<view>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_7.png"></image>
计划竣工日期:<text>{{projectInfo.plannedCompletionTime}}</text>
</view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_8.png"></image>
总工期:<text>{{projectInfo.projectTimeLimit + ' 天'}}</text>
</view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_10.png"></image>
项目负责人:<text>{{projectInfo.projectPerson}}</text>
</view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_11.png"></image>
负责人手机号:<text>{{projectInfo.projectPersonPhone}}</text>
</view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/s_15.png"></image>
项目概述:<text>{{projectInfo.projectSummarize}}</text>
</view>
</view>
</van-collapse-item>
<van-collapse-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" title="建设及管理单位信息" name="dept">
<view class="construction_unit" wx:for="{{projectDeptsList}}" wx:key="index">
<view class="construction_unit_image">
<image src="https://xiangguan.sxyanzhu.com/profile/static/icon/web_zbdw.png"></image>
</view>
<view class="construction_unit_list">
<view class="construction_unit_title">{{item.deptType}}</view>
<view class="construction_unit_name">{{item.deptName}}</view>
<view class="construction_unit_phone" bindtap="calling" data-phone="{{item.phone}}">{{item.leader}}
{{item.phone}}</view>
</view>
</view>
</van-collapse-item>
</van-collapse>
</view>
<view class="echarts_max"
wx:if="{{(subDeptUserInfo.subDeptType=='1' || subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='6' && subDeptUserInfo.userPost!='8'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
劳务人员
<!-- <view class="module_see_info" bindtap="goLWGL">查看详情
<van-icon name="arrow" />
</view> -->
</view>
<!-- tab栏切换 -->
<view class="information-review-tab" bindtap="selectedTab">
<view class="{{nactive===index?'active':''}}" data-set="{{index}}" wx:for="{{labourTypeList}}" wx:key="index">
{{item.name}}({{item.total}})
</view>
</view>
<view class="video_ai_survey">
<van-row>
<van-col span="8">
<view class="survey_content">
<view class="survey_content_img">
<image animation="{{animationData}}" src="{{labourImg}}" />
</view>
</view>
<view class="survey_content_number labour-survey_content_number">
<view class="survey_content_value">
<text>{{ labourTotal }}</text> 人
</view>
</view>
</van-col>
<van-col span="16">
<safety-bar-chart id="userChart" chart-id="userChart" data="{{labourData}}" height="350"></safety-bar-chart>
</van-col>
</van-row>
</view>
</view>
</view>
</view>
<!-- tab栏切换 -->
<view class="information-review-tab" bindtap="selectedTab">
<view class="{{nactive===index?'active':''}}" data-set="{{index}}" wx:for="{{labourTypeList}}" wx:key="index">
{{item.name}}({{item.total}})
</view>
</view>
<view class="video_ai_survey">
<van-row>
<van-col span="8">
<view class="survey_content">
<view class="survey_content_img">
<image animation="{{animationData}}" src="{{labourImg}}" />
</view>
</view>
<view class="survey_content_number labour-survey_content_number">
<view class="survey_content_value">
<text>{{ labourTotal }}</text> 人
</view>
</view>
</van-col>
<van-col span="16">
<safety-bar-chart id="userChart" chart-id="userChart" data="{{labourData}}" height="350"></safety-bar-chart>
</van-col>
</van-row>
</view>
</view>
</view>
<view class="echarts_max" wx:if="{{(subDeptUserInfo.subDeptType=='1' || subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='6' && subDeptUserInfo.userPost!='8'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
今日出勤
<!-- <view class="module_see_info" bindtap="goLWGL">查看详情
<view class="echarts_max"
wx:if="{{(subDeptUserInfo.subDeptType=='1' || subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='6' && subDeptUserInfo.userPost!='8'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
今日出勤
<!-- <view class="module_see_info" bindtap="goLWGL">查看详情
<van-icon name="arrow" />
</view> -->
</view>
<view class="video_ai_survey">
<van-row>
<van-col span="8">
<view class="survey_content">
<view class="survey_content_img">
<image animation="{{animationData}}" src="https://szgcwx.jhncidg.com/staticFiles/icon/dw.png" />
</view>
</view>
<view class="survey_content_number labour-survey_content_number">
<view class="survey_content_value">
<text>{{ labourDaysTotal }}</text> 人
</view>
</view>
</van-col>
<van-col span="16">
<safety-bar-chart id="attsChart" chart-id="attsChart" data="{{labourDays}}" height="350"></safety-bar-chart>
</van-col>
</van-row>
</view>
</view>
</view>
<view class="echarts_max bt30" wx:if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='5' && subDeptUserInfo.userPost!='6' && subDeptUserInfo.userPost!='8'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
我的二维码
</view>
<view class="video_ai_survey">
<van-row>
<van-col span="10" class="qrcode">
<image bindtap='showImg' data-set="{{subDeptUserInfo.qrCode}}" src="{{imgBaseUrl+subDeptUserInfo.qrCode}}"></image>
</van-col>
<van-col span="14">
<view wx:if="{{subDeptUserInfo.userPost=='1'}}" class="qrtext"><text class="zz">项目经理 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
<view wx:if="{{subDeptUserInfo.userPost=='2'}}" class="qrtext"><text class="zz">班组组长 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
<view wx:if="{{subDeptUserInfo.userPost=='3'}}" class="qrtext"><text class="zz">劳务人员 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
</van-col>
</van-row>
</view>
</view>
</view>
</view>
<view class="video_ai_survey">
<van-row>
<van-col span="8">
<view class="survey_content">
<view class="survey_content_img">
<image animation="{{animationData}}" src="https://szgcwx.jhncidg.com/staticFiles/icon/dw.png" />
</view>
</view>
<view class="survey_content_number labour-survey_content_number">
<view class="survey_content_value">
<text>{{ labourDaysTotal }}</text> 人
</view>
</view>
</van-col>
<van-col span="16">
<safety-bar-chart id="attsChart" chart-id="attsChart" data="{{labourDays}}" height="350"></safety-bar-chart>
</van-col>
</van-row>
</view>
</view>
</view>
<view class="echarts_max bt30"
wx:if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='5' && subDeptUserInfo.userPost!='6' && subDeptUserInfo.userPost!='8'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
我的二维码
</view>
<view class="video_ai_survey">
<van-row>
<van-col span="10" class="qrcode">
<image bindtap='showImg' data-set="{{subDeptUserInfo.qrCode}}" src="{{imgBaseUrl+subDeptUserInfo.qrCode}}">
</image>
</van-col>
<van-col span="14">
<view wx:if="{{subDeptUserInfo.userPost=='1'}}" class="qrtext"><text class="zz">项目经理
</text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
<view wx:if="{{subDeptUserInfo.userPost=='2'}}" class="qrtext"><text class="zz">班组组长
</text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
<view wx:if="{{subDeptUserInfo.userPost=='3'}}" class="qrtext"><text class="zz">劳务人员
</text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
</van-col>
</van-row>
</view>
</view>
</view>
<view class="echarts_max" wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
最近出勤
<!-- <view class="module_see_info" bindtap="goZJCQ">查看详情
<view class="echarts_max" wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
最近出勤
<!-- <view class="module_see_info" bindtap="goZJCQ">查看详情
<van-icon name="arrow" />
</view> -->
</view>
<view class="video_ai_survey">
<bar-chart id="chartBar" chartId="chartBar" chartData="{{labourDatas}}"></bar-chart>
</view>
</view>
</view>
</view>
<view class="video_ai_survey">
<bar-chart id="chartBar" chartId="chartBar" chartData="{{labourDatas}}"></bar-chart>
</view>
</view>
</view>
<view class="echarts_max" wx:if="{{subDeptUserInfo.userPost=='4' || subDeptUserInfo.userPost=='5' || subDeptUserInfo.userPost=='6' || subDeptUserInfo.userPost=='8'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
最近出勤
<!-- <view class="module_see_info" bindtap="goZJCQ">查看详情
<view class="echarts_max"
wx:if="{{subDeptUserInfo.userPost=='4' || subDeptUserInfo.userPost=='5' || subDeptUserInfo.userPost=='6' || subDeptUserInfo.userPost=='8'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
最近出勤
<!-- <view class="module_see_info" bindtap="goZJCQ">查看详情
<van-icon name="arrow" />
</view> -->
</view>
<view class="video_ai_survey">
<view class="inspect_max_scroll">
<view class="safety_prop module_title_flex summury">
<text class="color_orange">默认展示近7天考勤数据</text>
</view>
<view class="inspect_for_scroll" v-if="{{ attendanceListData.length>0 }}" wx:for="{{attendanceListData}}" wx:key="index">
<view class="inspect_for_bgd">
<view class="inspect_list_title">
<view class="inspect_list_title_label inspect_list_title_width">
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title module_title_flex inspect_list_title_label">考勤时间:{{format.dateStrEv(item.inTime,item.outTime)}}</view>
</view>
</view>
<view class="inspect_list_info">
<view class="inspect_list_info_details">
<view class="inspect_list_info_img">
<van-image wx:if="{{item.inPhoto}}" width="120rpx" height="120rpx" fit="cover" src="{{imgBaseUrl+item.inPhoto}}" />
<van-image wx:else width="120rpx" height="120rpx" fit="cover" src="{{imgBaseUrl+item.outPhoto}}" />
</view>
<view class="inspect_list_info_data">
<view class="inspect_list_info_data_prop color_blue">人员姓名:<text>{{item.userName}}</text></view>
<view class="inspect_list_info_data_prop">入场时间:
<text wx:if="{{item.inTime}}">{{format.timeStr(item.inTime)}}</text>
<text wx:else class="color_red">未打卡</text>
</view>
<view class="inspect_list_info_data_prop">离场时间:
<text wx:if="{{item.outTime}}">{{format.timeStr(item.outTime)}}</text>
<text wx:else class="color_red">未打卡</text>
</view>
</view>
</view>
<view class="inspect_list_info_position">
<text class="color_purple">单位名称:{{item.subDeptName}}</text>
</view>
</view>
</view>
</view>
<view wx:if="{{attendanceListData.length==0}}">
<view style="padding-top: 5px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="video_ai_survey">
<view class="inspect_max_scroll">
<view class="safety_prop module_title_flex summury">
<text class="color_orange">默认展示近7天考勤数据</text>
</view>
<view class="inspect_for_scroll" v-if="{{ attendanceListData.length>0 }}" wx:for="{{attendanceListData}}"
wx:key="index">
<view class="inspect_for_bgd">
<view class="inspect_list_title">
<view class="inspect_list_title_label inspect_list_title_width">
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title module_title_flex inspect_list_title_label">
考勤时间:{{format.dateStrEv(item.inTime,item.outTime)}}</view>
</view>
</view>
<view class="inspect_list_info">
<view class="inspect_list_info_details">
<view class="inspect_list_info_img">
<van-image wx:if="{{item.inPhoto}}" width="120rpx" height="120rpx" fit="cover"
src="{{imgBaseUrl+item.inPhoto}}" />
<van-image wx:else width="120rpx" height="120rpx" fit="cover"
src="{{imgBaseUrl+item.outPhoto}}" />
</view>
<view class="inspect_list_info_data">
<view class="inspect_list_info_data_prop color_blue">人员姓名:<text>{{item.userName}}</text></view>
<view class="inspect_list_info_data_prop">入场时间:
<text wx:if="{{item.inTime}}">{{format.timeStr(item.inTime)}}</text>
<text wx:else class="color_red">未打卡</text>
</view>
<view class="inspect_list_info_data_prop">离场时间:
<text wx:if="{{item.outTime}}">{{format.timeStr(item.outTime)}}</text>
<text wx:else class="color_red">未打卡</text>
</view>
</view>
</view>
<view class="inspect_list_info_position">
<text class="color_purple">单位名称:{{item.subDeptName}}</text>
</view>
</view>
</view>
</view>
<view wx:if="{{attendanceListData.length==0}}">
<view style="padding-top: 5px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;">
</image>
<view style="color: #a5abbb;">暂无数据</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 底部导航 -->
<van-tabbar wx:if="{{subDeptUserInfo.subDeptType=='1'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item>
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
项目概况
</van-tabbar-item>
<van-tabbar-item bindtap="XMSP">
<image slot="icon" src="/images/footer_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
安全管理
<span class="tabNum" wx:if="{{aqglDB>0}}">{{aqglDB}}</span>
</van-tabbar-item>
<!-- 底部导航 -->
<van-tabbar wx:if="{{subDeptUserInfo.subDeptType=='1'}}" active="{{ active }}" bind:change="onChange"
active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item>
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
项目概况
</van-tabbar-item>
<van-tabbar-item bindtap="ZLGL">
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
质量管理
<span class="tabNum" wx:if="{{zlglDB>0}}">{{zlglDB}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="XMSP">
<image slot="icon" src="/images/footer_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
安全管理
<span class="tabNum" wx:if="{{aqglDB>0}}">{{aqglDB}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="JDGL">
<image slot="icon" src="/images/footer_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
进度管理
</van-tabbar-item>
<van-tabbar-item bindtap="ZLGL">
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
质量管理
<span class="tabNum" wx:if="{{zlglDB>0}}">{{zlglDB}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="XMGL">
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>
<van-tabbar-item bindtap="JDGL">
<image slot="icon" src="/images/footer_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
进度管理
</van-tabbar-item>
<!-- 底部导航 -->
<van-tabbar wx:if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='5'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item>
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
项目概况
</van-tabbar-item>
<van-tabbar-item bindtap="XMGL">
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>
<van-tabbar-item bindtap="XMGL">
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>
<!-- 底部导航 -->
<van-tabbar
wx:if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='5'}}"
active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item>
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
项目概况
</van-tabbar-item>
<van-tabbar-item bindtap="XMGL">
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>

View File

@ -1,63 +1,64 @@
// pages/components/voucher-select/index.js
import fmt from '../../../utils/date.js'
Component({
/**
* 组件的属性列表
*/
properties: {
width:{
type:String
width: {
type: String
},
counts:{
type:Number
counts: {
type: Number
},
placeholder:{
type:String
placeholder: {
type: String
},
time:{
type:String
time: {
type: String
},
maxDate:{
type:Number,
value:new Date().getTime()
maxDate: {
type: Number,
value: new Date().getTime()
},
value:{
type:String,
value:''
value: {
type: String,
value: ''
},
currentDate:{
type:Number
currentDate: {
type: Number
}
},
/**数据监听 */
observers: {
counts: function (val) {
this.setData({
item:val[0],
item: val[0],
})
},
time:function(val){
time: function (val) {
var that = this
that.setData({
value:val,
value: val,
// date:val
})
// that.onConfirm()
}
},
lifetimes: {
created: function(){
created: function () {
//在组件实例刚刚被创建时执行,注意此时不能调用 setData
},
attached: function () {
//在组件实例进入页面节点树时执行
//在组件实例进入页面节点树时执行
},
ready: function () {
// 在组件在视图层布局完成后执行
// 在组件在视图层布局完成后执行
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
// 在组件实例被从页面节点树移除时执行
},
},
/**
@ -65,9 +66,10 @@ Component({
*/
data: {
show: false,
date:'',
minDate: new Date(2022,1,1).getTime(),
counts:'5',
date: '',
currDate: 0,
minDate: new Date(2022, 1, 1).getTime(),
counts: '5',
formatter(type, value) {
if (type === 'year') {
return `${value}`;
@ -85,51 +87,54 @@ Component({
*/
methods: {
showPopup() {
this.setData({
show: true
});
},
onClose() {
this.setData({
show: false
});
},
onConfirm() {
this.setData({
value: this.data.date
})
this.triggerEvent('change', this.data.date)
this.setData({
show: false
});
},
formatter(type, value) {
if (type === 'year') {
return `${value}`;
}
if (type === 'month') {
return `${value}`;
}
return value;
},
/**
* 组件的方法列表
*/
onInput(event) {
let date = new Date(event.detail)
let Y = date.getFullYear();
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + '';
let H = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + '';
let I = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + '';
var lot = Y + '-' + M + '-' + D + ' ' + H + ':' + I +':00';
this.setData({
date: lot,
});
},
debugger
let cDate = this.properties.currentDate ? this.properties.currentDate : this.properties.value ? +fmt(this.properties.value) : +(new Date())
this.setData({
currDate: cDate,
show: true
});
},
onClose() {
this.setData({
show: false
});
},
onConfirm() {
this.setData({
value: this.data.date
})
this.triggerEvent('change', this.data.date)
this.setData({
show: false
});
},
formatter(type, value) {
if (type === 'year') {
return `${value}`;
}
if (type === 'month') {
return `${value}`;
}
return value;
},
/**
* 组件的方法列表
*/
onInput(event) {
let date = new Date(event.detail)
let Y = date.getFullYear();
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + '';
let H = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + '';
let I = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + '';
var lot = Y + '-' + M + '-' + D + ' ' + H + ':' + I + ':00';
this.setData({
date: lot,
});
},
},
})

View File

@ -1,68 +1,24 @@
<!--pages/components/voucher-select/index.wxml-->
<view class="voucher_select_max" bindtap="showPopup" style="width: {{width}};">
<view class="voucher_select_min">
<input class="celect_frame_min" placeholder="{{placeholder}}" placeholder-style="color:#6777aa;" value="{{value}}" disabled="true"/>
</view>
<view class="voucher_select_icon">
<image src="../../../images/web_select_date.png"></image>
</view>
<view class="voucher_select_min">
<input class="celect_frame_min" placeholder="{{placeholder}}" placeholder-style="color:#6777aa;" value="{{value}}"
disabled="true" />
</view>
<view class="voucher_select_icon">
<image src="../../../images/web_select_date.png"></image>
</view>
</view>
<van-popup show="{{ show }}" bind:close="onClose" position="bottom" custom-class="popup_style">
<view class="option_list_title">
<view class="option_list_title_btn" bindtap="onClose">取消</view>
<view>{{placeholder}}</view>
<view class="option_list_title_btn" bindtap="onConfirm">确认</view>
</view>
<van-datetime-picker
type="datetime"
show-toolbar="{{fales}}"
value="{{ currentDate }}"
bind:input="onInput"
min-date="{{ minDate }}"
max-date="{{ maxDate }}"
formatter="{{ formatter }}"
visible-item-count="{{counts}}"
custom-class="time_select_style"
column-class="time_list_style"
active-class="time_active_style"
/>
<!-- <select-date-copy bindchange="onChangeDate" maxDate="{{maxDate}}" currentDate="{{newCurrentDate}}" counts="{{counts}}"></select-date-copy> -->
</van-popup>
<view class="option_list_title">
<view class="option_list_title_btn" bindtap="onClose">取消</view>
<view>{{placeholder}}</view>
<view class="option_list_title_btn" bindtap="onConfirm">确认</view>
</view>
<van-datetime-picker type="datetime" show-toolbar="{{fales}}" value="{{ currDate }}" bind:input="onInput"
min-date="{{ minDate }}" max-date="{{ maxDate }}" formatter="{{ formatter }}" visible-item-count="{{counts}}"
custom-class="time_select_style" column-class="time_list_style" active-class="time_active_style" />
<!-- <select-date-copy bindchange="onChangeDate" maxDate="{{maxDate}}" currentDate="{{newCurrentDate}}" counts="{{counts}}"></select-date-copy> -->
</van-popup>

View File

@ -0,0 +1,2 @@
var moment = require('./moment.min.js');
export default moment;

View File

@ -3,36 +3,36 @@
* @param num
*/
function indexNumFormat(num) {
switch (num) {
case 0:
num = "";
break;
case 1:
num = "Ⅱ";
break;
case 2:
num = "Ⅲ";
break;
case 3:
num = "Ⅳ";
break;
case 4:
num = "";
break;
case 5:
num = "Ⅵ";
break;
case 6:
num = "Ⅶ";
break;
case 7:
num = "Ⅷ";
break;
case 8:
num = "Ⅸ";
break;
}
return num;
switch (num) {
case 0:
num = "";
break;
case 1:
num = "Ⅱ";
break;
case 2:
num = "Ⅲ";
break;
case 3:
num = "Ⅳ";
break;
case 4:
num = "";
break;
case 5:
num = "Ⅵ";
break;
case 6:
num = "Ⅶ";
break;
case 7:
num = "Ⅷ";
break;
case 8:
num = "Ⅸ";
break;
}
return num;
}
/**
@ -40,96 +40,96 @@ function indexNumFormat(num) {
* @param val
*/
function findDurationDate(val) {
// 计算出相差天数
let days = Math.floor(val / (24 * 3600 * 1000))
// 计算出小时数
let leave1 = val % (24 * 3600 * 1000) // 计算天数后剩余的毫秒数
let hours = Math.floor(leave1 / (3600 * 1000))
// 计算相差分钟数
let leave2 = leave1 % (3600 * 1000) // 计算小时数后剩余的毫秒数
let minutes = Math.floor(leave2 / (60 * 1000))
// 计算相差秒数
let leave3 = leave2 % (60 * 1000) // 计算分钟数后剩余的毫秒数
let seconds = Math.round(leave3 / 1000)
if (days > 0) {
if (days < 10) days = "0" + days;
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return days + '天' + hours + '小时' + minutes + '分钟' + seconds + '秒';
}
if (hours > 0) {
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return hours + '小时' + minutes + '分钟' + seconds + '秒';
}
if (minutes > 0) {
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return minutes + '分钟' + seconds + '秒';
}
if (seconds > 0) {
if (seconds < 10) seconds = "0" + seconds;
return seconds + '秒';
}
// 计算出相差天数
let days = Math.floor(val / (24 * 3600 * 1000))
// 计算出小时数
let leave1 = val % (24 * 3600 * 1000) // 计算天数后剩余的毫秒数
let hours = Math.floor(leave1 / (3600 * 1000))
// 计算相差分钟数
let leave2 = leave1 % (3600 * 1000) // 计算小时数后剩余的毫秒数
let minutes = Math.floor(leave2 / (60 * 1000))
// 计算相差秒数
let leave3 = leave2 % (60 * 1000) // 计算分钟数后剩余的毫秒数
let seconds = Math.round(leave3 / 1000)
if (days > 0) {
if (days < 10) days = "0" + days;
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return days + '天' + hours + '小时' + minutes + '分钟' + seconds + '秒';
}
if (hours > 0) {
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return hours + '小时' + minutes + '分钟' + seconds + '秒';
}
if (minutes > 0) {
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return minutes + '分钟' + seconds + '秒';
}
if (seconds > 0) {
if (seconds < 10) seconds = "0" + seconds;
return seconds + '秒';
}
}
module.exports = {
indexNumFormat: indexNumFormat,
findDurationDate: findDurationDate,
split:function(str,sign){
return str.split(sign);
},
parseStr:function(str){
return JSON.parse(str);
},
evalStr:function(str){
return eval(str);
},
dateStrEv:function(startDate,endDate){
if(startDate){
return startDate.split(" ")[0];
}else if(endDate){
return endDate.split(" ")[0];
}else{
return "未找到记录";
}
},
dateStr:function(str){
if(str){
return str.split(" ")[0];
}else{
return "";
}
},
timeStr:function(str){
return str.split(" ")[1];
},
isHttpImg:function(str){
if(str.indexOf("http:")>-1 || str.indexOf("https:")>-1){
return true;
}else{
return false;
}
},
httpImg:function(str){
if(str.indexOf("https:")>-1){
return str;
}else{
return "https://xiangguan.sxyanzhu.com"+str;
}
},
birthDate:function(timestamp){
var date = getDate(parseInt(timestamp));
var mm = date.getMonth()+1;
if(mm<10){
mm = '0'+mm;
}
var dd = date.getDate();
if(dd<10){
dd = '0'+dd;
}
return date.getFullYear()+"-"+mm+"-"+dd;
}
indexNumFormat: indexNumFormat,
findDurationDate: findDurationDate,
split: function (str, sign) {
return str.split(sign);
},
parseStr: function (str) {
return JSON.parse(str);
},
evalStr: function (str) {
return eval(str);
},
dateStrEv: function (startDate, endDate) {
if (startDate) {
return startDate.split(" ")[0];
} else if (endDate) {
return endDate.split(" ")[0];
} else {
return "未找到记录";
}
},
dateStr: function (str) {
if (str) {
return str.split(" ")[0];
} else {
return "";
}
},
timeStr: function (str) {
return str.split(" ")[1];
},
isHttpImg: function (str) {
if (str.indexOf("http:") > -1 || str.indexOf("https:") > -1) {
return true;
} else {
return false;
}
},
httpImg: function (str) {
if (str.indexOf("https:") > -1) {
return str;
} else {
return "https://xiangguan.sxyanzhu.com" + str;
}
},
birthDate: function (timestamp) {
var date = getDate(parseInt(timestamp));
var mm = date.getMonth() + 1;
if (mm < 10) {
mm = '0' + mm;
}
var dd = date.getDate();
if (dd < 10) {
dd = '0' + dd;
}
return date.getFullYear() + "-" + mm + "-" + dd;
}
}

File diff suppressed because one or more lines are too long