代码优化以及作业计划部分页面开发

This commit is contained in:
BianLzhaoMin 2024-10-22 10:52:39 +08:00
parent ff7bf743f6
commit 6ff00770fc
12 changed files with 1154 additions and 25 deletions

View File

@ -261,7 +261,8 @@
"style": {
"navigationStyle": "custom"
}
},{
},
{
// --
"path": "pages/realName/index/pages/personDetail",
"style": {
@ -777,6 +778,18 @@
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/workPlan/networkPlan/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/workPlan/tempPlan/index",
"style": {
"navigationStyle": "custom"
}
}
],
"globalStyle": {

View File

@ -142,7 +142,9 @@
<view v-for="item in progressList" :key="item.progress_title" @tap="onJumpPersonList(item.progress_title)">
<view class="top-title">
<text>{{ item.progress_title }}</text>
<text :style="{ color: item.textColor }">{{ item.progress_proportion }}%</text>
<text :style="{ color: item.textColor }">
{{ isNaN(item.progress_proportion) ? 0 : item.progress_proportion }}%
</text>
</view>
<view class="bottom-progress">
<view class="progress-box">
@ -685,7 +687,7 @@ export default {
e.progress_amount = this.einTemporaryAttPersonNum
e.progress_ready = this.einTemporaryAttPersonNum
}
e.progress_proportion = ((e.progress_ready / e.progress_amount) * 100).toFixed(0)
e.progress_proportion = ((e.progress_ready / e.progress_amount) * 100).toFixed(2)
})
console.log('this.progressList', this.progressList)
@ -704,7 +706,7 @@ export default {
e.project_num = completeProNum
}
e.project_ratio = ((e.project_num / proAmount) * 100).toFixed(0)
e.project_ratio = ((e.project_num / proAmount) * 100).toFixed(2)
})
},
/* 跳转作业计划 */

View File

@ -86,7 +86,7 @@
label-width="200"
>
<uni-forms-item
v-for="(item, index) in dayPlanTitle === '基建计划'
v-for="(item, index) in dayPlanTitle === '基建计划'
? infrastructureFormLabel
: productionFormLabel"
:key="index"
@ -161,7 +161,7 @@ export default {
},
data() {
return {
monthPlanTitle: '基建月计划',
dayPlanTitle: '基建日计划',
activeIndex: 0,
pagesTotal: 1,
currentPage: 0,
@ -334,6 +334,13 @@ export default {
// console.log('')
// }
// }
},
onLoad(options) {
if (options.type == 1) {
this.dayPlanTitle = '基建日计划'
} else {
this.dayPlanTitle = '生产日计划'
}
}
}
</script>

View File

@ -1,10 +1,10 @@
<template>
<view class="calendar">
<view class="header">
<!-- <view class="header">
<text @click="changeMonth(-1)"></text>
<text>{{ currentYear }}{{ currentMonth + 1 }}</text>
<text @click="changeMonth(1)"></text>
</view>
</view> -->
<view class="weekdays">
<text v-for="day in weekdays" :key="day">{{ day }}</text>
</view>
@ -15,11 +15,16 @@
:class="{ 'current-month': day.currentMonth, 'other-month': !day.currentMonth }"
@click="selectDate(day)"
>
<text>{{ day.day }}</text>
<!-- <view>999</view> -->
<view v-if="day.customContent" class="custom-content">
{{ day.customContent }}
<text style="font-weight: bold">{{ day.day }}</text>
<view class="risk-container">
<text>:9</text>
<text>:30</text>
<text>可接受:4</text>
</view>
<!-- <view>999</view> -->
<!-- <view v-if="day.customContent" class="custom-content">
{{ day.customContent }}
</view> -->
</view>
</view>
</view>
@ -31,7 +36,7 @@ export default {
return {
currentYear: new Date().getFullYear(),
currentMonth: new Date().getMonth(),
weekdays: ['日', '一', '二', '三', '四', '五', '六'],
weekdays: ['日', '一', '二', '三', '四', '五', '六'],
days: [],
customDates: {
'2023-06-15': '自定义内容'
@ -101,9 +106,10 @@ export default {
}
</script>
<style scoped>
<style scoped lang="scss">
.calendar {
width: 100%;
margin-top: 30rpx;
/* padding: 20rpx; */
}
.header {
@ -115,22 +121,51 @@ export default {
.weekdays {
display: flex;
justify-content: space-around;
margin-bottom: 10rpx;
margin: 10rpx 0;
}
.days {
display: flex;
flex-wrap: wrap;
// border-bottom: 1px solid #ccc;
.risk-container {
width: 100%;
display: flex;
margin-bottom: 30rpx;
flex-direction: column;
text {
width: 100%;
margin-bottom: 3rpx;
padding-left: 3rpx;
text-align: left;
font-size: 22rpx;
}
}
.risk-container text:first-child {
background-color: #fde9cf;
border-left: 2px solid #fa8d0a;
}
.risk-container text:nth-child(2) {
}
}
.days view {
width: 14.28%;
height: 80rpx;
/* height: 80rpx; */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.other-month {
color: #ccc;
// color: #ccc;
color: transparent;
text {
border: none !important;
background-color: transparent !important;
}
}
.custom-content {
font-size: 20rpx;

View File

@ -86,7 +86,7 @@
label-width="200"
>
<uni-forms-item
v-for="(item, index) in dayPlanTitle === '基建月计划'
v-for="(item, index) in monthPlanTitle === '基建月计划'
? infrastructureFormLabel
: productionFormLabel"
:key="index"
@ -406,6 +406,13 @@ export default {
// console.log('')
// }
// }
},
onLoad(options) {
if (options.type == 1) {
this.monthPlanTitle = '基建月计划'
} else {
this.monthPlanTitle = '生产月计划'
}
}
}
</script>

View File

@ -0,0 +1,39 @@
<template>
<view>
<picker mode="date" fields="month" @change="onDateChange" :value="DateValue">
<!-- <view>
<text style="color: red; margin: 0 10rpx">*</text>
<text>选择时间</text>
</view> -->
<view class="time-container">
<view class="date-picker">{{ DateValue }}</view>
<text>&gt;</text>
</view>
</picker>
</view>
</template>
<script>
export default {
data() {
return {
DateValue: this.$moment().format('YYYY-MM')
}
},
methods: {
onDateChange(e) {
this.DateValue = e.detail.value
}
}
}
</script>
<style scoped>
.time-container {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 38rpx;
}
</style>

View File

@ -0,0 +1,452 @@
<template>
<view class="month-container">
<u-navbar
class="u-navbar"
:title="networkPlanTitle"
placeholder
@leftClick="leftClick"
leftIconColor="#fff"
bgColor="#00337A"
:titleStyle="{ color: '#FFF', fontSize: '32rpx' }"
/>
<view class="month-content">
<view class="btn-header" id="btnHeaderRef">
<button
:key="index"
@tap="onTapCheck(index)"
v-for="(item, index) in btnList"
:class="{ active: index === activeIndex }"
>
{{ item.btn_title }}
</button>
</view>
<!-- 内容区域 -->
<view class="content-2" v-show="activeIndex === 1">
<view class="pages-add" id="pagesAddRef">
<view style="text-align: right; width: 30%">
<image
style="width: 50rpx; height: 50rpx; margin: 13rpx 20rpx 13rpx 0"
src="../../../static/images/workPlan/delete.png"
@tap="onReducePages"
></image>
</view>
<view class="num-content">
<uni-pagination :show-icon="true" :total="pagesTotal" :pageSize="1" v-model="currentPage" />
<!-- <scroll-view scroll-x="true" class="scroll-x" scroll-with-animation="true">
<view v-for="item in pagesNum" :key="item" @tap="onChangePages(item)">{{ item }}</view>
</scroll-view> -->
</view>
<view style="text-align: left; width: 30%">
<image
style="width: 50rpx; height: 50rpx; margin: 13rpx 0 13rpx 20rpx"
src="../../../static/images/workPlan/add.png"
@tap="onAddPages"
></image>
</view>
</view>
<view>
<uni-forms
class="form-container"
ref="form"
:modelValue="formData"
:rules="rules"
label-position="top"
label-width="200"
>
<uni-forms-item label="工程名称" require style="margin-bottom: 2rpx">
<view class="time-container" @tap="onSelectProject">
<view>请选择</view>
<text>&gt;</text>
</view>
</uni-forms-item>
<uni-forms-item label="选择时间" required style="margin-bottom: 2rpx">
<view>
<TimeSelect />
</view>
</uni-forms-item>
</uni-forms>
</view>
<!-- <scroll-view :scroll-y="true" style="height: 340px">
</scroll-view> -->
<view style="background-color: #fff">
<swiper circular :autoplay="false" :current="currentSwiper" style="height: 700rpx" @change="onSwiperChange">
<swiper-item v-for="item in pagesTotal" :key="item">
<scroll-view scroll-y="true" class="scroll-Y" style="height: 100%">
<uni-forms
class="form-container"
ref="form"
:modelValue="formData"
:rules="rules"
label-position="top"
label-width="200"
>
<uni-forms-item
v-for="(item, index) in infrastructureFormLabel"
:key="index"
:label="item.form_label"
name="name"
required
>
<uni-easyinput
v-if="item.items_type === 'ipt'"
type="text"
v-model="formData.name"
placeholder="请填写"
/>
<uni-data-select
v-model="formData.nr"
:localdata="item.options"
v-if="item.items_type === 'sel'"
></uni-data-select>
</uni-forms-item>
</uni-forms>
</scroll-view>
</swiper-item>
</swiper>
<view class="submit-btn">
<button>导入计划</button>
<button @tap="onSaveSubmit">保存提交</button>
</view>
</view>
</view>
</view>
<!-- 弹框 -->
<uni-popup ref="popup" background-color="#fff">
<view class="popup-content" v-if="popupType === 'center'">
<view class="flex-style" style="justify-content: space-between">
<text>选择工程</text>
<text>X</text>
</view>
<view>2024-10-16</view>
<view class="search">
<view class="select">
<uni-data-select v-model="value" @change="onProjectChange" :localdata="range"></uni-data-select>
</view>
<button>搜索</button>
</view>
<view class="project-content">暂无数据</view>
</view>
<view v-else class="popup-bottom-content">
<view class="bottom-title">
<text>请选择</text>
<text>请选择</text>
<uni-icons type="closeempty" size="20" @tap="onClosePopup"></uni-icons>
</view>
<view v-if="isType">
<view class="select-item" v-for="item in isAUditingList" :key="item.title" @tap="onCheckAuditing(item.value)">
{{ item.title }}
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import TimeSelect from './components/time-select'
export default {
components: {
TimeSelect
},
data() {
return {
networkPlanTitle: '基建涉网计划',
activeIndex: 0,
pagesTotal: 1,
currentPage: 0,
popupType: '',
scrollHeight: 500,
formData: {},
btnList: [
{ btn_title: '工作待办' },
{ btn_title: '发起提交' },
{ btn_title: '查看报表' },
{ btn_title: '查看数据' }
],
rules: {
name: {
rules: [{ required: true, errorMessage: '请填写' }]
},
gk: {
rules: [{ required: true, errorMessage: '请填写' }]
},
jd: {
rules: [{ required: true, errorMessage: '请填写' }]
},
nr: {
rules: [{ required: true, errorMessage: '请填写' }]
},
dj: {
rules: [{ required: true, errorMessage: '请填写' }]
}
},
infrastructureFormLabel: [
{ form_label: '涉网作业内容', items_type: 'ipt' },
{
form_label: '风险等级',
items_type: 'sel',
options: [
{ value: 0, text: '是否需要办理工作票' },
{ value: 1, text: '甲、乙供物资到货是否满足作业条件' },
{ value: 2, text: '施工机具是否满足作业条件' },
{ value: 2, text: '视频监控是否满足作业条件' },
{ value: 2, text: '投入监控设备数(台)' }
]
},
{
form_label: '计划停电时间',
items_type: 'sel'
},
{
form_label: '停电线路(设备)名称',
items_type: 'ipt'
},
{
form_label: '停电线路所属供电局',
items_type: 'ipt'
},
{
form_label: '停电负责人及电话',
items_type: 'ipt'
},
{
form_label: '备注',
items_type: 'ipt'
}
],
productionFormLabel: [
{ form_label: '作业内容', items_type: 'ipt' },
{
form_label: '风险等级',
items_type: 'sel',
options: [
{ value: 0, text: '检修' },
{ value: 1, text: '维护' }
]
},
{ form_label: '作业类型', items_type: 'sel' },
{
form_label: '现场负责人',
items_type: 'ipt'
},
{ form_label: '现场负责人电话', items_type: 'ipt' },
{ form_label: '全体人数', items_type: 'ipt' },
{ form_label: '公司职工人数', items_type: 'ipt' },
{ form_label: '分包人员人数', items_type: 'ipt' },
{ form_label: '交通用车', items_type: 'ipt' },
{ form_label: '特种作业车辆', items_type: 'ipt' },
{ form_label: '监控设备数量(台)', items_type: 'ipt' },
{ form_label: 'SIP编号', items_type: 'ipt' },
{ form_label: '责任管控人', items_type: 'ipt' },
{ form_label: '风险类别', items_type: 'ipt' },
{
form_label: '管控层级',
items_type: 'sel',
options: [
{ value: 0, text: '项目部' },
{ value: 1, text: '分公司' },
{ value: 2, text: '公司职能部门' },
{ value: 2, text: '公司领导' },
{ value: 2, text: '运检站' },
{ value: 2, text: '各单位级' }
]
},
{ form_label: '管控人/联系方式', items_type: 'ipt' },
{ form_label: '安全管控人', items_type: 'ipt' }
],
currentSwiper: 0
}
},
mounted() {
// console.log('this.$refs.btnHeaderRef', this.$refs.btnHeaderRef, this.$refs.pagesAddRef)
const query = uni.createSelectorQuery()
query
.select('#btnHeaderRef')
.boundingClientRect(data => {
this.scrollHeight += data.height
})
.exec()
query
.select('#pagesAddRef')
.boundingClientRect(data => {
this.scrollHeight += data.height
})
.exec()
console.log('this.scrollHeight', this.scrollHeight)
},
methods: {
leftClick() {
uni.navigateBack()
},
onTapCheck(i) {
this.activeIndex = i
},
onReducePages() {
if (this.pagesTotal > 1) {
this.pagesTotal -= 1
}
},
onAddPages() {
this.pagesTotal += 1
},
onSelectProject() {
this.$refs.popup.open('center')
this.popupType = 'center'
},
onClosePopup() {
this.$refs.popup.close()
if (this.isType) {
this.isType = !this.isType
}
},
onSwiperChange(e) {
this.currentPage = e.detail.current + 1
},
onCheckAuditing(val) {
console.log(val, '----')
}
// onChangePages(num) {
// if (num > 1) {
// console.log('')
// }
// }
},
onLoad(options) {
if (options.type == 1) {
this.networkPlanTitle = '基建涉网计划'
} else {
this.networkPlanTitle = '生产涉网计划'
}
}
}
</script>
<style lang="scss" scoped>
.month-container {
height: 100vh;
.month-content {
.btn-header {
display: flex;
width: 100%;
button {
flex: 1;
height: 120rpx;
color: #2c2b2b;
font-size: 26rpx;
line-height: 120rpx;
text-align: center;
border-radius: 0;
background-color: #fff;
}
button::after {
border: none;
}
.active {
border-bottom: 2px solid #00337a;
}
}
.content-2 {
width: 100%;
.pages-add {
width: 100%;
height: 76rpx;
display: flex;
align-items: center;
background-color: #ccc;
view {
height: 76rpx;
}
.num-content {
flex: 1;
background-color: #fff;
.scroll-x {
width: 100%;
white-space: nowrap;
view {
width: 50%;
display: inline-block;
height: 76rpx;
text-align: center;
line-height: 76rpx;
color: #003778;
}
}
}
}
.time-container {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 38rpx;
}
.form-container {
padding: 10rpx 20rpx;
}
.submit-btn {
margin: 15rpx 0;
}
}
}
//
.popup-content {
width: 90vw;
padding: 20rpx;
background-color: #eeeeee;
.search {
width: 100%;
height: 70rpx;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #eeeeee;
.select {
height: 68rpx;
width: 65%;
margin: 0;
}
button {
height: 68rpx;
width: 30%;
line-height: 68rpx;
font-size: 32rpx;
background-color: #003777;
color: #fff;
border-radius: 12rpx;
}
}
.project-content {
height: 460rpx;
width: 97%;
margin: 0 auto;
background-color: #fff;
text-align: center;
}
}
}
</style>

View File

@ -0,0 +1,39 @@
<template>
<view>
<picker mode="date" fields="month" @change="onDateChange" :value="DateValue">
<!-- <view>
<text style="color: red; margin: 0 10rpx">*</text>
<text>选择时间</text>
</view> -->
<view class="time-container">
<view class="date-picker">{{ DateValue }}</view>
<text>&gt;</text>
</view>
</picker>
</view>
</template>
<script>
export default {
data() {
return {
DateValue: this.$moment().format('YYYY-MM')
}
},
methods: {
onDateChange(e) {
this.DateValue = e.detail.value
}
}
}
</script>
<style scoped>
.time-container {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 38rpx;
}
</style>

View File

@ -0,0 +1,520 @@
<template>
<view class="month-container">
<u-navbar
class="u-navbar"
:title="tempPlanTitle"
placeholder
@leftClick="leftClick"
leftIconColor="#fff"
bgColor="#00337A"
:titleStyle="{ color: '#FFF', fontSize: '32rpx' }"
/>
<view class="month-content">
<view class="btn-header" id="btnHeaderRef">
<button
:key="index"
@tap="onTapCheck(index)"
v-for="(item, index) in btnList"
:class="{ active: index === activeIndex }"
>
{{ item.btn_title }}
</button>
</view>
<!-- 内容区域 -->
<view class="content-2" v-show="activeIndex === 1">
<view class="pages-add" id="pagesAddRef">
<view style="text-align: right; width: 30%">
<image
style="width: 50rpx; height: 50rpx; margin: 13rpx 20rpx 13rpx 0"
src="../../../static/images/workPlan/delete.png"
@tap="onReducePages"
></image>
</view>
<view class="num-content">
<uni-pagination :show-icon="true" :total="pagesTotal" :pageSize="1" v-model="currentPage" />
<!-- <scroll-view scroll-x="true" class="scroll-x" scroll-with-animation="true">
<view v-for="item in pagesNum" :key="item" @tap="onChangePages(item)">{{ item }}</view>
</scroll-view> -->
</view>
<view style="text-align: left; width: 30%">
<image
style="width: 50rpx; height: 50rpx; margin: 13rpx 0 13rpx 20rpx"
src="../../../static/images/workPlan/add.png"
@tap="onAddPages"
></image>
</view>
</view>
<view>
<uni-forms
class="form-container"
ref="form"
:modelValue="formData"
:rules="rules"
label-position="top"
label-width="200"
>
<uni-forms-item label="工程名称" require style="margin-bottom: 2rpx">
<view class="time-container" @tap="onSelectProject">
<view>请选择</view>
<text>&gt;</text>
</view>
</uni-forms-item>
<uni-forms-item label="选择时间" required style="margin-bottom: 2rpx">
<view>
<TimeSelect />
</view>
</uni-forms-item>
</uni-forms>
</view>
<!-- <scroll-view :scroll-y="true" style="height: 340px">
</scroll-view> -->
<view style="background-color: #fff">
<swiper circular :autoplay="false" :current="currentSwiper" style="height: 700rpx" @change="onSwiperChange">
<swiper-item v-for="item in pagesTotal" :key="item">
<scroll-view scroll-y="true" class="scroll-Y" style="height: 100%">
<uni-forms
class="form-container"
ref="form"
:modelValue="formData"
:rules="rules"
label-position="top"
label-width="200"
>
<uni-forms-item
v-for="(item, index) in tempPlanTitle === '基建临时计划'
? infrastructureFormLabel
: productionFormLabel"
:key="index"
:label="item.form_label"
name="name"
required
>
<uni-easyinput
v-if="item.items_type === 'ipt'"
type="text"
v-model="formData.name"
placeholder="请填写"
/>
<uni-data-select
v-model="formData.nr"
:localdata="item.options"
v-if="item.items_type === 'sel'"
></uni-data-select>
</uni-forms-item>
</uni-forms>
</scroll-view>
</swiper-item>
</swiper>
<view class="submit-btn">
<button>导入计划</button>
<button>保存提交</button>
</view>
</view>
</view>
</view>
<!-- 弹框 -->
<uni-popup ref="popup" background-color="#fff">
<view class="popup-content" v-if="popupType === 'center'">
<view class="flex-style" style="justify-content: space-between">
<text>选择工程</text>
<text>X</text>
</view>
<view>2024-10-16</view>
<view class="search">
<view class="select">
<uni-data-select v-model="value" @change="onProjectChange" :localdata="range"></uni-data-select>
</view>
<button>搜索</button>
</view>
<view class="project-content">暂无数据</view>
</view>
<view v-else class="popup-bottom-content">
<view class="bottom-title">
<text>请选择</text>
<text>请选择</text>
<uni-icons type="closeempty" size="20" @tap="onClosePopup"></uni-icons>
</view>
<view v-if="isType">
<view class="select-item" v-for="item in isAUditingList" :key="item.title" @tap="onCheckAuditing(item.value)">
{{ item.title }}
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import TimeSelect from './components/time-select'
export default {
components: {
TimeSelect
},
data() {
return {
tempPlanTitle: '基建临时计划',
activeIndex: 0,
pagesTotal: 1,
currentPage: 0,
popupType: '',
scrollHeight: 500,
formData: {},
btnList: [
{ btn_title: '工作待办' },
{ btn_title: '发起提交' },
{ btn_title: '查看报表' },
{ btn_title: '查看数据' }
],
rules: {
name: {
rules: [{ required: true, errorMessage: '请填写' }]
},
gk: {
rules: [{ required: true, errorMessage: '请填写' }]
},
jd: {
rules: [{ required: true, errorMessage: '请填写' }]
},
nr: {
rules: [{ required: true, errorMessage: '请填写' }]
},
dj: {
rules: [{ required: true, errorMessage: '请填写' }]
}
},
infrastructureFormLabel: [
{ form_label: '作业内容', items_type: 'ipt' },
{
form_label: '风险等级',
items_type: 'sel',
options: [
{ value: 0, text: '是否需要办理工作票' },
{ value: 1, text: '甲、乙供物资到货是否满足作业条件' },
{ value: 2, text: '施工机具是否满足作业条件' },
{ value: 2, text: '视频监控是否满足作业条件' },
{ value: 2, text: '投入监控设备数(台)' }
]
},
{
form_label: '是否存在危大工程',
items_type: 'sel'
},
{
form_label: '是否有涉网计划',
items_type: 'sel'
},
{
form_label: '施工方案是否已审批',
items_type: 'sel'
},
{
form_label: '是否需要办理工作票',
items_type: 'sel'
},
{
form_label: '甲、乙供物资到货是否满足作业条件',
items_type: 'sel'
},
{ form_label: '施工机具是否满足作业条件', items_type: 'sel' },
{ form_label: '投入监控设备数(台)', items_type: 'ipt' },
{ form_label: '公司职工人数', items_type: 'ipt' },
{ form_label: '外包人员人数', items_type: 'ipt' },
{ form_label: '项目总人数', items_type: 'ipt' },
{ form_label: '投入车辆(辆)', items_type: 'sel' },
{ form_label: '分包商名称', items_type: 'ipt' },
{ form_label: '备注', items_type: 'ipt' }
],
productionFormLabel: [
{ form_label: '业主单位', items_type: 'ipt' },
{ form_label: '实施单位', items_type: 'ipt' },
{ form_label: '实施部门', items_type: 'ipt' },
{ form_label: '作业内容', items_type: 'ipt' },
{
form_label: '风险等级',
items_type: 'sel',
options: [
{ value: 0, text: '检修' },
{ value: 1, text: '维护' }
]
},
{ form_label: '计划编码', items_type: 'ipt' },
{
form_label: '是否开展现场勘察',
items_type: 'sel'
},
{
form_label: '施工方案是否已审批',
items_type: 'sel'
},
{
form_label: '是否需要办理工作票',
items_type: 'sel'
},
{
form_label: '是否属于危大工程',
items_type: 'sel'
},
{
form_label: '停电需求',
items_type: 'sel'
},
{
form_label: '作业地点',
items_type: 'ipt'
},
{
form_label: '物资准备',
items_type: 'sel'
},
{
form_label: '机具装备',
items_type: 'sel'
},
{
form_label: '施工人数',
items_type: 'ipt'
},
{
form_label: '现场施工负责人',
items_type: 'ipt'
},
{
form_label: '现场施工安全员',
items_type: 'ipt'
},
{
form_label: '公司职工人数',
items_type: 'ipt'
},
{
form_label: '分包人员人数',
items_type: 'ipt'
},
{
form_label: '分包商',
items_type: 'ipt'
},
{
form_label: '投入车辆(辆)',
items_type: 'ipt'
},
{
form_label: '开始时间',
items_type: 'sel'
},
{
form_label: '结束时间',
items_type: 'sel'
},
{
form_label: '典型中高风险部分项工程',
items_type: 'ipt'
},
{
form_label: '开始时间',
items_type: 'sel'
},
{
form_label: '结束时间',
items_type: 'sel'
},
{
form_label: '作业地点',
items_type: 'ipt'
}
],
currentSwiper: 0
}
},
mounted() {
// console.log('this.$refs.btnHeaderRef', this.$refs.btnHeaderRef, this.$refs.pagesAddRef)
const query = uni.createSelectorQuery()
query
.select('#btnHeaderRef')
.boundingClientRect(data => {
this.scrollHeight += data.height
})
.exec()
query
.select('#pagesAddRef')
.boundingClientRect(data => {
this.scrollHeight += data.height
})
.exec()
console.log('this.scrollHeight', this.scrollHeight)
},
methods: {
leftClick() {
uni.navigateBack()
},
onTapCheck(i) {
this.activeIndex = i
},
onReducePages() {
if (this.pagesTotal > 1) {
this.pagesTotal -= 1
}
},
onAddPages() {
this.pagesTotal += 1
},
onSelectProject() {
this.$refs.popup.open('center')
this.popupType = 'center'
},
onClosePopup() {
this.$refs.popup.close()
if (this.isType) {
this.isType = !this.isType
}
},
onSwiperChange(e) {
this.currentPage = e.detail.current + 1
},
onCheckAuditing(val) {
console.log(val, '----')
}
// onChangePages(num) {
// if (num > 1) {
// console.log('')
// }
// }
},
onLoad(options) {
if (options.type == 1) {
this.tempPlanTitle = '基建临时计划'
} else {
this.tempPlanTitle = '生产临时计划'
}
}
}
</script>
<style lang="scss" scoped>
.month-container {
height: 100vh;
.month-content {
.btn-header {
display: flex;
width: 100%;
button {
flex: 1;
height: 120rpx;
color: #2c2b2b;
font-size: 26rpx;
line-height: 120rpx;
text-align: center;
border-radius: 0;
background-color: #fff;
}
button::after {
border: none;
}
.active {
border-bottom: 2px solid #00337a;
}
}
.content-2 {
width: 100%;
.pages-add {
width: 100%;
height: 76rpx;
display: flex;
align-items: center;
background-color: #ccc;
view {
height: 76rpx;
}
.num-content {
flex: 1;
background-color: #fff;
.scroll-x {
width: 100%;
white-space: nowrap;
view {
width: 50%;
display: inline-block;
height: 76rpx;
text-align: center;
line-height: 76rpx;
color: #003778;
}
}
}
}
.time-container {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 38rpx;
}
.form-container {
padding: 10rpx 20rpx;
}
.submit-btn {
margin: 15rpx 0;
}
}
}
//
.popup-content {
width: 90vw;
padding: 20rpx;
background-color: #eeeeee;
.search {
width: 100%;
height: 70rpx;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #eeeeee;
.select {
height: 68rpx;
width: 65%;
margin: 0;
}
button {
height: 68rpx;
width: 30%;
line-height: 68rpx;
font-size: 32rpx;
background-color: #003777;
color: #fff;
border-radius: 12rpx;
}
}
.project-content {
height: 460rpx;
width: 97%;
margin: 0 auto;
background-color: #fff;
text-align: center;
}
}
}
</style>

View File

@ -2,7 +2,7 @@
<view class="month-container">
<u-navbar
class="u-navbar"
:title="monthPlanTitle"
:title="weekPlanTitle"
placeholder
@leftClick="leftClick"
leftIconColor="#fff"
@ -86,7 +86,7 @@
label-width="200"
>
<uni-forms-item
v-for="(item, index) in dayPlanTitle === '基建月计划'
v-for="(item, index) in weekPlanTitle === '基建周计划'
? infrastructureFormLabel
: productionFormLabel"
:key="index"
@ -161,7 +161,7 @@ export default {
},
data() {
return {
monthPlanTitle: '基建月计划',
weekPlanTitle: '基建周计划',
activeIndex: 0,
pagesTotal: 1,
currentPage: 0,
@ -402,6 +402,13 @@ export default {
// console.log('')
// }
// }
},
onLoad(options) {
if (options.type == 1) {
this.weekPlanTitle = '基建周计划'
} else {
this.weekPlanTitle = '生产周计划'
}
}
}
</script>

View File

@ -31,10 +31,14 @@ export default {
url: '/pages/workPlan/monthPlan/index',
img_src: require('../../../../static/images/workPlan/month_plan.png')
},
{ icon_title: '涉网计划', url: 'xxx', img_src: require('../../../../static/images/workPlan/web_plan.png') },
{
icon_title: '涉网计划',
url: '/pages/workPlan/networkPlan/index',
img_src: require('../../../../static/images/workPlan/web_plan.png')
},
{
icon_title: '临时计划',
url: 'xxx',
url: '/pages/workPlan/tempPlan/index',
img_src: require('../../../../static/images/workPlan/temporary_plan.png')
}
]

View File

@ -31,10 +31,14 @@ export default {
url: '/pages/workPlan/monthPlan/index',
img_src: require('../../../../static/images/workPlan/month_plan.png')
},
{ icon_title: '涉网计划', url: 'xxx', img_src: require('../../../../static/images/workPlan/web_plan.png') },
{
icon_title: '涉网计划',
url: '/pages/workPlan/networkPlan/index',
img_src: require('../../../../static/images/workPlan/web_plan.png')
},
{
icon_title: '临时计划',
url: 'xxx',
url: '/pages/workPlan/tempPlan/index',
img_src: require('../../../../static/images/workPlan/temporary_plan.png')
}
]