月计划等接口调试
This commit is contained in:
parent
30ee3f3679
commit
2f79c2fd54
|
|
@ -24,3 +24,27 @@ export function getControlLevelListApi(data) {
|
|||
params: data
|
||||
})
|
||||
}
|
||||
// 月计划填报提交
|
||||
export function setMonthPlanApi(data) {
|
||||
return request_yn({
|
||||
url: '/ynPlanApp/infMonth/addInfPlan',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 月计划-查看报表
|
||||
export function getMonthPlanDataApi(data) {
|
||||
return request_yn({
|
||||
url: '/ynPlanApp/infMonth/getPlanDetail',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 月计划-查看数据
|
||||
export function getViewDataListApi(data) {
|
||||
return request_yn({
|
||||
url: '/ynPlanApp/infMonth/getViewData',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,9 +70,11 @@ module.exports = {
|
|||
realBmwUrl: 'http://192.168.0.14:1616/bmw',
|
||||
//实名制移动端 -- 新
|
||||
realNewBmwUrl: 'http://192.168.0.14:1616',
|
||||
loginUrl: 'http://192.168.0.14:27018',
|
||||
//实名制移动端 -- 新
|
||||
realNewYnUrl: 'http://192.168.0.14:1918',
|
||||
|
||||
//作业计划 -- 新
|
||||
workPlanNewYnUrl: 'http://192.168.0.14:19191',
|
||||
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
|
|
|
|||
|
|
@ -358,22 +358,32 @@ export default {
|
|||
}
|
||||
|
||||
if (name === '作业计划移动端') {
|
||||
const paramsWork = {
|
||||
username: uni.getStorageSync('userPhone'),
|
||||
password: 'YNsbd@123456'
|
||||
// jwtToken: uni.getStorageSync('App-Token')
|
||||
}
|
||||
|
||||
console.log('请求参数', paramsWork)
|
||||
|
||||
uni.request({
|
||||
url: config.realLoginUrl + 'login',
|
||||
url: config.workPlanNewYnUrl + '/ynPlanApp/login',
|
||||
method: 'POST',
|
||||
data: JSON.stringify(realParams),
|
||||
data: paramsWork,
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success: res => {
|
||||
console.log('🚀 ~ gotoYy ~ res:', res)
|
||||
console.log('登录成功!', res)
|
||||
// console.log('🚀 ~ gotoYy ~ res:', res.data.token)
|
||||
if (res.data.code == 200) {
|
||||
// uni.setStorageSync('tjToken', res.data.token)
|
||||
uni.setStorageSync('realNameToken', res.data.data.access_token)
|
||||
uni.setStorageSync('realNameUser', res.data.data.loginUser.sysUser)
|
||||
uni.setStorageSync('realNamePermissions', res.data.data.loginUser.permissions)
|
||||
uni.removeStorageSync('hasChosenPro')
|
||||
if (res.statusCode == 200) {
|
||||
uni.setStorageSync('wkToken', res.data.user.token)
|
||||
uni.setStorageSync('wkName', res.data.user.username)
|
||||
uni.setStorageSync('wkRole', res.data.user.role)
|
||||
// uni.setStorageSync('realNameUser', res.data.data.loginUser.sysUser)
|
||||
// uni.setStorageSync('realNamePermissions', res.data.data.loginUser.permissions)
|
||||
// uni.removeStorageSync('hasChosenPro')
|
||||
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/workPlan/index/index'
|
||||
|
|
|
|||
1067
pages/login.vue
1067
pages/login.vue
File diff suppressed because it is too large
Load Diff
|
|
@ -30,18 +30,18 @@
|
|||
</view>
|
||||
|
||||
<!-- 选择月的时候的日历 -->
|
||||
<view v-show="activeType === 1">
|
||||
<view v-if="activeType === 1">
|
||||
<view class="weekdays">
|
||||
<text v-for="day in weekdays" :key="day">{{ day }}</text>
|
||||
<text v-for="(day, index) in weekdays" :key="index + day">{{ day }}</text>
|
||||
</view>
|
||||
<view class="days">
|
||||
<view
|
||||
v-for="day in days"
|
||||
:key="day.date"
|
||||
:class="{ 'current-month': day.currentMonth, 'other-month': !day.currentMonth }"
|
||||
@click="selectDate(day)"
|
||||
v-for="(days, index) in days"
|
||||
:key="days.date + index"
|
||||
:class="{ 'current-month': days.currentMonth, 'other-month': !days.currentMonth }"
|
||||
@click="selectDate(days)"
|
||||
>
|
||||
<text style="font-weight: bold">{{ day.day }}</text>
|
||||
<text style="font-weight: bold">{{ days.day }}</text>
|
||||
<view class="risk-container">
|
||||
<text>中:9</text>
|
||||
<text>低:30</text>
|
||||
|
|
@ -52,9 +52,9 @@
|
|||
</view>
|
||||
|
||||
<!-- 选择周的时候日历 -->
|
||||
<view v-show="activeType === 2">
|
||||
<view v-if="activeType === 2">
|
||||
<view class="week-th">
|
||||
<view v-for="(item, index) in weekList" :key="item">
|
||||
<view v-for="(item, index) in weekList" :key="index">
|
||||
<text>{{ item.title }}</text>
|
||||
<text v-if="index !== 0" style="margin-top: 6rpx">{{ weekTimeChange(index) }}</text>
|
||||
</view>
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 选择天的时候日历 -->
|
||||
<view v-show="activeType === 3">
|
||||
<view v-if="activeType === 3">
|
||||
<view class="day-th">
|
||||
<view>工程名称</view>
|
||||
<view>作业人数</view>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ export default {
|
|||
methods: {
|
||||
onDateChange(e) {
|
||||
this.DateValue = e.detail.value
|
||||
// this.$emit('')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,16 +14,17 @@
|
|||
<view class="btn-header" id="btnHeaderRef">
|
||||
<button
|
||||
:key="index"
|
||||
@tap="onTapCheck(index)"
|
||||
@tap="onTapCheck(item.btn_title)"
|
||||
v-for="(item, index) in btnList"
|
||||
:class="{ active: index === activeIndex }"
|
||||
:class="{ active: item.btn_title === activeIndex }"
|
||||
v-show="item.isShow.includes(roles)"
|
||||
>
|
||||
{{ item.btn_title }}
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<!-- 发起提交 -->
|
||||
<view class="content-2" v-show="activeIndex === 1">
|
||||
<view class="content-2" v-show="activeIndex === '发起提交'">
|
||||
<view class="pages-add" id="pagesAddRef">
|
||||
<view style="text-align: right; width: 30%">
|
||||
<image
|
||||
|
|
@ -63,15 +64,21 @@
|
|||
label-position="top"
|
||||
label-width="200"
|
||||
>
|
||||
<uni-forms-item label="工程名称" require style="margin-bottom: 2rpx">
|
||||
<uni-forms-item label="工程名称" style="margin-bottom: 2rpx" require>
|
||||
<view class="time-container" @tap="onSelectProject">
|
||||
<view>请选择</view>
|
||||
<text>></text>
|
||||
<view>{{ projectName ? projectName : '请选择' }}</view>
|
||||
<text v-if="!projectName">></text>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="选择时间" required style="margin-bottom: 2rpx">
|
||||
<view>
|
||||
<TimeSelect />
|
||||
<!-- <TimeSelect /> -->
|
||||
<picker mode="date" fields="month" @change="onDateChange" :value="DateValue">
|
||||
<view class="time-container">
|
||||
<view class="date-picker">{{ DateValue }}</view>
|
||||
<text>></text>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
|
|
@ -83,35 +90,26 @@
|
|||
|
||||
<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">
|
||||
<swiper-item v-for="(item, index) in monthParams" :key="index">
|
||||
<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 class="form-container" ref="form" :modelValue="item" label-position="top" label-width="200">
|
||||
<uni-forms-item
|
||||
v-for="(item, index) in monthPlanTitle === '基建月计划'
|
||||
? infrastructureFormLabel
|
||||
: productionFormLabel"
|
||||
:key="index"
|
||||
:label="item.form_label"
|
||||
name="name"
|
||||
v-for="(f, i) in monthPlanTitle === '基建月计划' ? infrastructureFormLabel : productionFormLabel"
|
||||
:key="i"
|
||||
:label="f.form_label"
|
||||
:name="f.name"
|
||||
required
|
||||
>
|
||||
<uni-easyinput
|
||||
v-if="item.items_type === 'ipt'"
|
||||
v-if="f.items_type === 'ipt'"
|
||||
type="text"
|
||||
v-model="formData.name"
|
||||
v-model="item[f.name]"
|
||||
placeholder="请填写"
|
||||
/>
|
||||
<uni-data-select
|
||||
v-model="formData.nr"
|
||||
:localdata="item.options"
|
||||
v-if="item.items_type === 'sel'"
|
||||
v-model="item[f.name]"
|
||||
:localdata="f.options"
|
||||
v-if="f.items_type === 'sel'"
|
||||
></uni-data-select>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
|
|
@ -130,18 +128,24 @@
|
|||
<uni-icons type="cloud-upload" size="20"></uni-icons>
|
||||
导入计划
|
||||
</view>
|
||||
<view>保存提交</view>
|
||||
<view @tap="onSaveSubmit">保存提交</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 查看报表 -->
|
||||
<view v-show="activeIndex === 2" class="common-style">
|
||||
<view v-show="activeIndex === '查看报表'" class="common-style">
|
||||
<uni-forms ref="form-b" label-position="top" label-width="200">
|
||||
<uni-forms-item label="工程名称" required>
|
||||
<view class="time-container" @tap="onSelectProject">
|
||||
<!-- <view class="time-container" @tap="onSelectProject">
|
||||
<view>请选择</view>
|
||||
<text>></text>
|
||||
</view>
|
||||
</view> -->
|
||||
<uni-data-select
|
||||
:clear="false"
|
||||
:localdata="projectListSel"
|
||||
@change="onChangeProjectSel"
|
||||
:v-model="queryDataParams.proId"
|
||||
></uni-data-select>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
|
||||
|
|
@ -150,7 +154,7 @@
|
|||
<uni-icons type="left" size="20" @tap="onReduceDay"></uni-icons>
|
||||
|
||||
<view class="view-time">
|
||||
<picker mode="date" @change="onChangeCurrentData" :value="currentTime">
|
||||
<picker mode="date" @change="onChangeCurrentData" v-model="currentTime">
|
||||
<view class="date-picker">{{ currentTime }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
|
|
@ -160,13 +164,47 @@
|
|||
|
||||
<button @tap="onBackToday">返回本月</button>
|
||||
</view>
|
||||
|
||||
<view class="pages">
|
||||
<!-- <uni-pagination :show-icon="true" :total="1" /> -->
|
||||
<swiper circular :autoplay="false" :current="0" style="height: 700rpx" v-if="monthDataList.length > 0">
|
||||
<swiper-item v-for="item in monthDataList" :key="item.id">
|
||||
<scroll-view scroll-y="true" class="scroll-Y" style="height: 100%">
|
||||
<uni-forms class="form-container" label-position="top" label-width="200">
|
||||
<uni-forms-item
|
||||
v-for="(f, i) in monthPlanTitle === '基建月计划' ? infrastructureFormLabel : productionFormLabel"
|
||||
:key="i"
|
||||
:label="f.form_label"
|
||||
:name="f.name"
|
||||
required
|
||||
>
|
||||
<uni-easyinput
|
||||
v-if="f.items_type === 'ipt'"
|
||||
:clear="false"
|
||||
type="text"
|
||||
v-model="item[f.name]"
|
||||
disabled
|
||||
/>
|
||||
<uni-data-select
|
||||
v-model="item[f.name]"
|
||||
:localdata="f.options"
|
||||
disabled
|
||||
:clear="false"
|
||||
v-if="f.items_type === 'sel'"
|
||||
></uni-data-select>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 查看数据 -->
|
||||
<view v-show="activeIndex === 3" class="common-style">
|
||||
<view v-show="activeIndex === '查看数据'" class="common-style">
|
||||
<uni-easyinput
|
||||
prefixIcon="search"
|
||||
v-model="searchValue"
|
||||
v-model="queryDataParamsNew.keyword"
|
||||
placeholder="搜索"
|
||||
@iconClick="iconClick"
|
||||
></uni-easyinput>
|
||||
|
|
@ -174,17 +212,37 @@
|
|||
<uni-forms ref="form-b" label-position="top" label-width="200">
|
||||
<uni-forms-item label="工程名称" required>
|
||||
<view class="time-container" @tap="onViewSelectProject">
|
||||
<view>请选择</view>
|
||||
<text>></text>
|
||||
<view>{{ projectInPopupName ? projectInPopupName : '请选择' }}</view>
|
||||
<text v-if="projectInPopupName">></text>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="全部状态" required>
|
||||
<view class="time-container" @tap="onSelectAllType">
|
||||
<view>请选择</view>
|
||||
<text>></text>
|
||||
<view>{{ projectQueryType ? projectQueryType : '请选择' }}</view>
|
||||
<text v-if="projectQueryType">></text>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
|
||||
<scroll-view scroll-y>
|
||||
<view class="month-list" v-for="item in viewMonthPlanList" :key="item.id">
|
||||
<view class="item-header">
|
||||
<text>可接受风险:1</text>
|
||||
<text>2024-4</text>
|
||||
</view>
|
||||
|
||||
<view class="item-num">
|
||||
<text>计划数量</text>
|
||||
<text>{{ item.planCount }}</text>
|
||||
</view>
|
||||
|
||||
<view class="item-time">
|
||||
<text>提交人/提交时间</text>
|
||||
<text>{{ item.upUser }}/{{ item.planTime }}</text>
|
||||
<text>{{ item.state }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -204,9 +262,14 @@
|
|||
:localdata="projectRange"
|
||||
></uni-data-select>
|
||||
</view>
|
||||
<button @tap="getProjectListData()">搜索</button>
|
||||
<button @tap="onSearchProject">搜索</button>
|
||||
</view>
|
||||
<view class="project-content">暂无数据</view>
|
||||
|
||||
<scroll-view scroll-y class="project-content">
|
||||
<view v-for="item in projectList" :key="item.id" @tap="onChangeProject(item.id, item.name)">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view v-else class="popup-bottom-content">
|
||||
|
|
@ -217,10 +280,23 @@
|
|||
</view>
|
||||
|
||||
<view v-if="isType">
|
||||
<view class="select-item" v-for="item in isAUditingList" :key="item.title" @tap="onCheckAuditing(item.value)">
|
||||
<view class="select-item" v-for="item in isAUditingList" :key="item.title" @tap="onCheckAuditing(item)">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-else class="scroll-select">
|
||||
<scroll-view scroll-y="true" style="height: 100%">
|
||||
<view
|
||||
class="select-item"
|
||||
v-for="item in projectListSel"
|
||||
:key="item.value"
|
||||
@tap="onChangeProjectInPopup(item)"
|
||||
>
|
||||
{{ item.text }}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
|
@ -228,7 +304,14 @@
|
|||
|
||||
<script>
|
||||
import TimeSelect from './components/time-select'
|
||||
import { getProjectListApi } from '../../../api/workPlan/monthPlan'
|
||||
import {
|
||||
setMonthPlanApi,
|
||||
getProjectListApi,
|
||||
getViewDataListApi,
|
||||
getRiskLevelListApi,
|
||||
getMonthPlanDataApi,
|
||||
getControlLevelListApi
|
||||
} from '../../../api/workPlan/monthPlan'
|
||||
export default {
|
||||
components: {
|
||||
TimeSelect
|
||||
|
|
@ -236,7 +319,8 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
monthPlanTitle: '基建月计划',
|
||||
activeIndex: 0,
|
||||
activeIndex: '发起提交',
|
||||
DateValue: this.$moment().format('YYYY-MM'),
|
||||
pagesTotal: 1,
|
||||
currentPage: 0,
|
||||
popupType: '',
|
||||
|
|
@ -245,10 +329,10 @@ export default {
|
|||
isType: false,
|
||||
currentTime: this.$moment().format('YYYY-MM'),
|
||||
btnList: [
|
||||
{ btn_title: '工作待办' },
|
||||
{ btn_title: '发起提交' },
|
||||
{ btn_title: '查看报表' },
|
||||
{ btn_title: '查看数据' }
|
||||
{ btn_title: '工作待办', isShow: ['24', '25'] },
|
||||
{ btn_title: '发起提交', isShow: ['22', '23'] },
|
||||
{ btn_title: '查看报表', isShow: ['22', '23'] },
|
||||
{ btn_title: '查看数据', isShow: ['22', '23'] }
|
||||
],
|
||||
rules: {
|
||||
name: {
|
||||
|
|
@ -268,68 +352,61 @@ export default {
|
|||
}
|
||||
},
|
||||
infrastructureFormLabel: [
|
||||
{ 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', name: 'zynr' },
|
||||
{ form_label: '作业条件(人员、机具、图纸、物资等、气候条件对作业的影响)', items_type: 'ipt', name: 'zytj' },
|
||||
{ form_label: '风险类别', items_type: 'ipt', name: 'fxlb' },
|
||||
{ form_label: '管控措施', items_type: 'ipt', name: 'gkcs' },
|
||||
{
|
||||
form_label: '风险等级',
|
||||
items_type: 'sel',
|
||||
options: [
|
||||
{ value: 0, text: '可接受风险' },
|
||||
{ value: 1, text: '低风险' },
|
||||
{ value: 2, text: '中风险' },
|
||||
{ value: 2, text: '高风险' },
|
||||
{ value: 2, text: '特高风险' }
|
||||
]
|
||||
name: 'fxdj',
|
||||
options: []
|
||||
},
|
||||
{
|
||||
form_label: '管控级别',
|
||||
items_type: 'sel',
|
||||
options: [
|
||||
{ value: 0, text: '项目部' },
|
||||
{ value: 1, text: '分公司' },
|
||||
{ value: 2, text: '公司职能部门' },
|
||||
{ value: 2, text: '公司领导' },
|
||||
{ value: 2, text: '运检站' },
|
||||
{ value: 2, text: '各单位级' }
|
||||
]
|
||||
name: 'gkcj',
|
||||
options: []
|
||||
},
|
||||
{
|
||||
form_label: '是否有危大/易造成人员较大伤亡作业',
|
||||
items_type: 'sel',
|
||||
name: 'wdgc',
|
||||
options: [
|
||||
{ value: 0, text: '是' },
|
||||
{ value: 1, text: '否' }
|
||||
{ value: '1', text: '是' },
|
||||
{ value: '0', text: '否' }
|
||||
]
|
||||
},
|
||||
{
|
||||
form_label: '方案是否报审',
|
||||
items_type: 'sel',
|
||||
name: 'fasp',
|
||||
options: [
|
||||
{ value: 0, text: '是' },
|
||||
{ value: 1, text: '否' }
|
||||
{ value: '1', text: '是' },
|
||||
{ value: '0', text: '否' }
|
||||
]
|
||||
},
|
||||
{
|
||||
form_label: '是否有涉网作业',
|
||||
items_type: 'sel',
|
||||
name: 'swzy',
|
||||
options: [
|
||||
{ value: 0, text: '是' },
|
||||
{ value: 1, text: '否' }
|
||||
{ value: '1', text: '是' },
|
||||
{ value: '0', text: '否' }
|
||||
]
|
||||
},
|
||||
{
|
||||
form_label: '线路/设备停电计划是否上报',
|
||||
items_type: 'sel',
|
||||
name: 'sbtd',
|
||||
options: [
|
||||
{ value: 0, text: '是' },
|
||||
{ value: 1, text: '否' }
|
||||
{ value: '1', text: '是' },
|
||||
{ value: '0', text: '否' }
|
||||
]
|
||||
},
|
||||
{ form_label: '项目负责人/联系电话', items_type: 'ipt' },
|
||||
{ form_label: '单位负责人/联系电话', items_type: 'ipt' },
|
||||
{ form_label: '计划数量', items_type: 'ipt' }
|
||||
{ form_label: '项目负责人/联系电话', items_type: 'ipt', name: 'xmfzr' },
|
||||
{ form_label: '单位负责人/联系电话', items_type: 'ipt', name: 'dwfzr' },
|
||||
{ form_label: '计划数量', items_type: 'ipt', name: 'planCount' }
|
||||
],
|
||||
productionFormLabel: [
|
||||
{ form_label: '作业内容', items_type: 'ipt' },
|
||||
|
|
@ -350,8 +427,8 @@ export default {
|
|||
form_label: '是否停电',
|
||||
items_type: 'sel',
|
||||
options: [
|
||||
{ value: 0, text: '是' },
|
||||
{ value: 1, text: '否' }
|
||||
{ value: 1, text: '是' },
|
||||
{ value: 0, text: '否' }
|
||||
]
|
||||
},
|
||||
{ form_label: '停电设备(作业场所)', items_type: 'ipt' },
|
||||
|
|
@ -360,14 +437,7 @@ export default {
|
|||
{
|
||||
form_label: '管控级别',
|
||||
items_type: 'sel',
|
||||
options: [
|
||||
{ value: 0, text: '项目部' },
|
||||
{ value: 1, text: '分公司' },
|
||||
{ value: 2, text: '公司职能部门' },
|
||||
{ value: 2, text: '公司领导' },
|
||||
{ value: 2, text: '运检站' },
|
||||
{ value: 2, text: '各单位级' }
|
||||
]
|
||||
options: []
|
||||
},
|
||||
{
|
||||
form_label: '风险等级',
|
||||
|
|
@ -394,8 +464,8 @@ export default {
|
|||
form_label: '施工方案',
|
||||
items_type: 'sel',
|
||||
options: [
|
||||
{ value: 0, text: '是' },
|
||||
{ value: 1, text: '否' }
|
||||
{ value: 1, text: '是' },
|
||||
{ value: 0, text: '否' }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -437,10 +507,65 @@ export default {
|
|||
{ value: '1', text: '已填报' }
|
||||
],
|
||||
isAUditingList: [
|
||||
{ title: '未审核', value: 0 },
|
||||
{ title: '已审核', value: 1 }
|
||||
{ title: '未审核', value: '2' },
|
||||
{ title: '已审核', value: '1' }
|
||||
],
|
||||
searchValue: ''
|
||||
searchValue: '',
|
||||
projectList: [],
|
||||
projectListSel: [],
|
||||
queryDataParams: {
|
||||
proId: '',
|
||||
month: ''
|
||||
},
|
||||
projectName: '',
|
||||
projectId: '',
|
||||
roles: uni.getStorageSync('wkRole'),
|
||||
paramsItem: {
|
||||
proName: '',
|
||||
month: '',
|
||||
zynr: '',
|
||||
zytj: '',
|
||||
fxlb: '',
|
||||
gkcs: '',
|
||||
fxdj: '',
|
||||
gkcj: '',
|
||||
wdgc: '',
|
||||
fasp: '',
|
||||
swzy: '',
|
||||
sbtd: '',
|
||||
xmfzr: '',
|
||||
dwfzr: '',
|
||||
planCount: ''
|
||||
},
|
||||
monthParams: [
|
||||
{
|
||||
proName: '',
|
||||
month: '',
|
||||
zynr: '',
|
||||
zytj: '',
|
||||
fxlb: '',
|
||||
gkcs: '',
|
||||
fxdj: '',
|
||||
gkcj: '',
|
||||
wdgc: '',
|
||||
fasp: '',
|
||||
swzy: '',
|
||||
sbtd: '',
|
||||
xmfzr: '',
|
||||
dwfzr: '',
|
||||
planCount: ''
|
||||
}
|
||||
],
|
||||
monthDataList: [],
|
||||
projectInPopupName: '',
|
||||
projectQueryType: '',
|
||||
queryDataParamsNew: {
|
||||
proId: '',
|
||||
month: '',
|
||||
state: '',
|
||||
keyword: ''
|
||||
},
|
||||
viewMonthPlanList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -460,17 +585,21 @@ export default {
|
|||
.exec()
|
||||
|
||||
// console.log('this.scrollHeight', this.scrollHeight)
|
||||
// this.getProjectListData()
|
||||
this.projectList = this.$store.state.workPlan.projectList
|
||||
|
||||
// 获取工程
|
||||
this.getProjectListData()
|
||||
// 获取风险等级
|
||||
this.getRiskLevelListData()
|
||||
// 获取管控层级
|
||||
this.getControlLevelListData()
|
||||
},
|
||||
methods: {
|
||||
leftClick() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
/* 获取工程数据 */
|
||||
async getProjectListData() {
|
||||
const res = await getProjectListApi(this.projectQueryParams)
|
||||
console.log('工程数据res', res)
|
||||
},
|
||||
|
||||
onTapCheck(i) {
|
||||
this.activeIndex = i
|
||||
},
|
||||
|
|
@ -498,11 +627,33 @@ export default {
|
|||
this.currentSwiper = e.detail.current
|
||||
},
|
||||
onCheckAuditing(val) {
|
||||
console.log(val, '----')
|
||||
// console.log(val, '----')
|
||||
this.projectQueryType = val.title
|
||||
this.queryDataParamsNew.state = val.value
|
||||
this.getViewDataList()
|
||||
this.onClosePopup()
|
||||
},
|
||||
/* 保存提交 */
|
||||
onSaveSubmit() {
|
||||
async onSaveSubmit() {
|
||||
console.log('保存提交')
|
||||
console.log('this.monthParams--', this.monthParams)
|
||||
|
||||
this.monthParams.forEach(e => {
|
||||
e.proName = this.projectId
|
||||
e.month = this.DateValue
|
||||
})
|
||||
|
||||
const saveParams = {
|
||||
id: JSON.stringify(this.monthParams),
|
||||
user: '',
|
||||
state: '1'
|
||||
}
|
||||
|
||||
console.log('saveParams保存参数', saveParams)
|
||||
|
||||
const res = await setMonthPlanApi(saveParams)
|
||||
|
||||
if (res.resMsg === '') console.log('res提交结果', res)
|
||||
},
|
||||
onChangePages(num) {
|
||||
this.currentSwiper = num - 1
|
||||
|
|
@ -512,21 +663,26 @@ export default {
|
|||
},
|
||||
onReduceMonth() {
|
||||
this.currentTime = this.$moment(this.currentTime).subtract(1, 'year').format('YYYY-MM')
|
||||
this.getMonthPlanData()
|
||||
},
|
||||
onReduceDay() {
|
||||
this.currentTime = this.$moment(this.currentTime).subtract(1, 'months').format('YYYY-MM')
|
||||
this.getMonthPlanData()
|
||||
},
|
||||
onAddMonth() {
|
||||
this.currentTime = this.$moment(this.currentTime).add(1, 'year').format('YYYY-MM')
|
||||
this.getMonthPlanData()
|
||||
},
|
||||
onAddDay() {
|
||||
this.currentTime = this.$moment(this.currentTime).add(1, 'months').format('YYYY-MM')
|
||||
this.getMonthPlanData()
|
||||
},
|
||||
onBackToday() {
|
||||
this.currentTime = this.$moment().format('YYYY-MM')
|
||||
this.getMonthPlanData()
|
||||
},
|
||||
iconClick() {
|
||||
console.log('搜索')
|
||||
this.getViewDataList()
|
||||
},
|
||||
onChangeCurrentData(e) {
|
||||
this.currentTime = e.detail.value
|
||||
|
|
@ -539,6 +695,102 @@ export default {
|
|||
this.$refs.popup.open('bottom')
|
||||
this.popupType = 'bottom'
|
||||
this.isType = true
|
||||
},
|
||||
onProjectChange() {
|
||||
console.log('jjj')
|
||||
},
|
||||
onChangeProject(id, name) {
|
||||
this.projectName = name
|
||||
this.projectId = id
|
||||
this.onClosePopup()
|
||||
},
|
||||
async getRiskLevelListData() {
|
||||
const res = await getRiskLevelListApi()
|
||||
|
||||
try {
|
||||
this.infrastructureFormLabel.forEach(e => {
|
||||
if (e.form_label === '风险等级') {
|
||||
e.options = res.map(e => {
|
||||
return {
|
||||
value: e.id,
|
||||
text: e.name
|
||||
}
|
||||
})
|
||||
|
||||
throw new Error()
|
||||
}
|
||||
})
|
||||
} catch (error) {}
|
||||
},
|
||||
async getControlLevelListData() {
|
||||
const res = await getControlLevelListApi()
|
||||
// console.log('管控层级', res)
|
||||
try {
|
||||
this.infrastructureFormLabel.forEach(e => {
|
||||
if (e.form_label === '管控级别') {
|
||||
e.options = res.map(e => {
|
||||
return {
|
||||
value: e.id,
|
||||
text: e.name
|
||||
}
|
||||
})
|
||||
|
||||
throw new Error()
|
||||
}
|
||||
})
|
||||
} catch (error) {}
|
||||
},
|
||||
/* 搜索工程 */
|
||||
async onSearchProject() {
|
||||
const res = await getProjectListApi(this.projectQueryParams)
|
||||
this.projectList = res.obj
|
||||
},
|
||||
onDateChange(e) {
|
||||
this.DateValue = e.detail.value
|
||||
},
|
||||
/* 查看报表数据 */
|
||||
async getMonthPlanData() {
|
||||
this.queryDataParams.month = this.currentTime
|
||||
console.log('this.queryDataParams查询报表的参数', this.queryDataParams)
|
||||
const res = await getMonthPlanDataApi(this.queryDataParams)
|
||||
console.log('res---查看的报表数据', res)
|
||||
|
||||
if (res.obj.length < 1) {
|
||||
uni.showToast({ icon: 'none', title: '暂无月计划数据!' })
|
||||
}
|
||||
this.monthDataList = res.obj
|
||||
},
|
||||
/* 查看报表页面工程选择事件 */
|
||||
onChangeProjectSel(value) {
|
||||
this.queryDataParams.proId = value
|
||||
this.getMonthPlanData()
|
||||
},
|
||||
/* 获取工程列表 */
|
||||
async getProjectListData() {
|
||||
const res = await getProjectListApi({
|
||||
planTime: this.$moment().format('YYYY-MM-DD'),
|
||||
type: 3,
|
||||
state: ''
|
||||
})
|
||||
this.projectListSel = res.obj.map(e => {
|
||||
return {
|
||||
text: e.name,
|
||||
value: e.id
|
||||
}
|
||||
})
|
||||
},
|
||||
onChangeProjectInPopup(item) {
|
||||
this.projectInPopupName = item.text
|
||||
this.queryDataParamsNew.proId = item.value
|
||||
this.getViewDataList()
|
||||
this.onClosePopup()
|
||||
},
|
||||
/* 获取查看数据中的数据 */
|
||||
async getViewDataList() {
|
||||
console.log('搜索参数', this.queryDataParamsNew)
|
||||
const res = await getViewDataListApi(this.queryDataParamsNew)
|
||||
// console.log('res查看数据中的数据', res)
|
||||
this.viewMonthPlanList = res.obj
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
|
@ -707,6 +959,11 @@ export default {
|
|||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
|
||||
view {
|
||||
padding: 16rpx 0;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -799,6 +1056,10 @@ export default {
|
|||
color: transparent;
|
||||
}
|
||||
|
||||
.scroll-select {
|
||||
height: calc(50vh - 90rpx);
|
||||
}
|
||||
|
||||
.select-item {
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
|
|
@ -809,4 +1070,49 @@ export default {
|
|||
background-color: rgb(224, 239, 249);
|
||||
}
|
||||
}
|
||||
::v-deep .uni-input-input:disabled {
|
||||
-webkit-text-fill-color: #333;
|
||||
}
|
||||
|
||||
.month-list {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
.item-header {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10rpx 0;
|
||||
font-size: 22rpx;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.item-num,
|
||||
.item-time {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
padding: 12rpx 0;
|
||||
display: flex;
|
||||
// align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.item-num {
|
||||
margin-top: 18rpx;
|
||||
}
|
||||
.item-num text:last-child {
|
||||
width: 60%;
|
||||
text-align: left;
|
||||
}
|
||||
.item-num text:first-child .item-time text:first-child {
|
||||
width: 30%;
|
||||
}
|
||||
.item-time text {
|
||||
width: 30%;
|
||||
}
|
||||
.item-time text:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
/>
|
||||
|
||||
<view class="header-user">
|
||||
<view>庄周晓梦</view>
|
||||
<view>15723623967</view>
|
||||
<view>{{ userName }}</view>
|
||||
<view>{{ userPhone }}</view>
|
||||
</view>
|
||||
|
||||
<view class="message-push">
|
||||
|
|
@ -29,8 +29,19 @@ import TabbarConfig from '../util/tabbar'
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabbar: TabbarConfig
|
||||
tabbar: TabbarConfig,
|
||||
userName: '',
|
||||
userPhone: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
leftClick() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.userName = uni.getStorageSync('wkName')
|
||||
this.userPhone = uni.getStorageSync('userPhone')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,13 @@
|
|||
<view class="infrastructure">
|
||||
<h4>基建-计划审核</h4>
|
||||
<view class="infrastructure-content">
|
||||
<view class="icon-box" v-for="(icon, index) in iconList" :key="index" @tap="onOpenPlanPage(icon.url)">
|
||||
<view
|
||||
class="icon-box"
|
||||
v-for="(icon, index) in iconList"
|
||||
:key="index"
|
||||
@tap="onOpenPlanPage(icon.url)"
|
||||
v-show="icon.isShow.includes(roles)"
|
||||
>
|
||||
<image :src="icon.img_src" mode="scaleToFill" />
|
||||
{{ icon.icon_title }}
|
||||
</view>
|
||||
|
|
@ -19,29 +25,35 @@ export default {
|
|||
{
|
||||
icon_title: '日计划',
|
||||
url: '/pages/workPlan/dayPlan/index',
|
||||
img_src: require('../../../../static/images/workPlan/day_plan.png')
|
||||
img_src: require('../../../../static/images/workPlan/day_plan.png'),
|
||||
isShow: ['22', '23', '24', '25']
|
||||
},
|
||||
{
|
||||
icon_title: '周计划',
|
||||
url: '/pages/workPlan/weekPlan/index',
|
||||
img_src: require('../../../../static/images/workPlan/week_plan.png')
|
||||
img_src: require('../../../../static/images/workPlan/week_plan.png'),
|
||||
isShow: ['22', '23', '24', '25']
|
||||
},
|
||||
{
|
||||
icon_title: '月计划',
|
||||
url: '/pages/workPlan/monthPlan/index',
|
||||
img_src: require('../../../../static/images/workPlan/month_plan.png')
|
||||
img_src: require('../../../../static/images/workPlan/month_plan.png'),
|
||||
isShow: ['22', '23', '24', '25']
|
||||
},
|
||||
{
|
||||
icon_title: '涉网计划',
|
||||
url: '/pages/workPlan/networkPlan/index',
|
||||
img_src: require('../../../../static/images/workPlan/web_plan.png')
|
||||
img_src: require('../../../../static/images/workPlan/web_plan.png'),
|
||||
isShow: ['23', '24', '25']
|
||||
},
|
||||
{
|
||||
icon_title: '临时计划',
|
||||
url: '/pages/workPlan/tempPlan/index',
|
||||
img_src: require('../../../../static/images/workPlan/temporary_plan.png')
|
||||
img_src: require('../../../../static/images/workPlan/temporary_plan.png'),
|
||||
isShow: ['23', '24', '25']
|
||||
}
|
||||
]
|
||||
],
|
||||
roles: uni.getStorageSync('wkRole')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,13 @@
|
|||
<view class="production">
|
||||
<h4>生产-计划审核</h4>
|
||||
<view class="production-content">
|
||||
<view class="icon-box" v-for="(icon, index) in iconList" :key="index" @tap="onOpenPlanPage(icon.url)">
|
||||
<view
|
||||
class="icon-box"
|
||||
v-for="(icon, index) in iconList"
|
||||
:key="index"
|
||||
@tap="onOpenPlanPage(icon.url)"
|
||||
v-show="icon.isShow.includes(roles)"
|
||||
>
|
||||
<image :src="icon.img_src" mode="scaleToFill" />
|
||||
{{ icon.icon_title }}
|
||||
</view>
|
||||
|
|
@ -19,29 +25,35 @@ export default {
|
|||
{
|
||||
icon_title: '日计划',
|
||||
url: '/pages/workPlan/dayPlan/index',
|
||||
img_src: require('../../../../static/images/workPlan/day_plan.png')
|
||||
img_src: require('../../../../static/images/workPlan/day_plan.png'),
|
||||
isShow: ['22', '23', '24', '25']
|
||||
},
|
||||
{
|
||||
icon_title: '周计划',
|
||||
url: '/pages/workPlan/weekPlan/index',
|
||||
img_src: require('../../../../static/images/workPlan/week_plan.png')
|
||||
img_src: require('../../../../static/images/workPlan/week_plan.png'),
|
||||
isShow: ['22', '23', '24', '25']
|
||||
},
|
||||
{
|
||||
icon_title: '月计划',
|
||||
url: '/pages/workPlan/monthPlan/index',
|
||||
img_src: require('../../../../static/images/workPlan/month_plan.png')
|
||||
img_src: require('../../../../static/images/workPlan/month_plan.png'),
|
||||
isShow: ['22', '23', '24', '25']
|
||||
},
|
||||
{
|
||||
icon_title: '涉网计划',
|
||||
url: '/pages/workPlan/networkPlan/index',
|
||||
img_src: require('../../../../static/images/workPlan/web_plan.png')
|
||||
img_src: require('../../../../static/images/workPlan/web_plan.png'),
|
||||
isShow: ['23', '24', '25']
|
||||
},
|
||||
{
|
||||
icon_title: '临时计划',
|
||||
url: '/pages/workPlan/tempPlan/index',
|
||||
img_src: require('../../../../static/images/workPlan/temporary_plan.png')
|
||||
img_src: require('../../../../static/images/workPlan/temporary_plan.png'),
|
||||
isShow: ['23', '24', '25']
|
||||
}
|
||||
]
|
||||
],
|
||||
roles: uni.getStorageSync('wkRole')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ import TabbarConfig from '../util/tabbar'
|
|||
import CustodyModel from './components/custody-model'
|
||||
import InfrastructureModel from './components/infrastructure-model'
|
||||
import ProductionModel from './components/production-model'
|
||||
|
||||
import { getProjectListApi } from '../../../api/workPlan/monthPlan'
|
||||
export default {
|
||||
components: {
|
||||
CustodyModel,
|
||||
|
|
@ -35,12 +37,29 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
tabbar: TabbarConfig
|
||||
tabbar: TabbarConfig,
|
||||
projectQueryParams: {
|
||||
planTime: this.$moment().format('YYYY-MM-DD'),
|
||||
type: 3,
|
||||
state: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getProjectListData()
|
||||
},
|
||||
methods: {
|
||||
leftClick() {
|
||||
uni.navigateTo({ url: '/pages/workPlan/index/index' })
|
||||
},
|
||||
/* 获取工程数据 */
|
||||
async getProjectListData() {
|
||||
const list = this.$store.state.workPlan.projectList
|
||||
|
||||
console.log(list, '999')
|
||||
if (list.length > 0) return
|
||||
const res = await getProjectListApi(this.projectQueryParams)
|
||||
this.$store.commit('SET_PROJECT', res.obj)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
import user from '@/store/modules/user'
|
||||
import workPlan from './modules/workPlan'
|
||||
import getters from './getters'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
const store = new Vuex.Store({
|
||||
modules: {
|
||||
user
|
||||
user,
|
||||
workPlan
|
||||
},
|
||||
getters
|
||||
})
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
const workPlan = {
|
||||
state: {
|
||||
projectList: []
|
||||
},
|
||||
mutations: {
|
||||
SET_PROJECT: (state, list) => {
|
||||
state.projectList = list
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default workPlan
|
||||
|
|
@ -5,7 +5,8 @@ import errorCode from '@/utils/errorCode'
|
|||
import { toast, showConfirm, tansParams } from '@/utils/common'
|
||||
|
||||
let timeout = 60000
|
||||
const baseUrl = config.loginBaseUrl
|
||||
// const baseUrl = config.loginBaseUrl
|
||||
const baseUrl = config.loginUrl
|
||||
console.log('baseUrl-请求', baseUrl)
|
||||
|
||||
const request = config => {
|
||||
|
|
|
|||
|
|
@ -4,16 +4,18 @@ import { getToken, setToken } from '@/utils/auth'
|
|||
import errorCode from '@/utils/errorCode'
|
||||
import { toast, showConfirm, tansParams } from '@/utils/common'
|
||||
|
||||
const token = uni.getStorageSync('wkToken') || null
|
||||
|
||||
let timeout = 60000
|
||||
const baseUrl = config.realNewYnUrl
|
||||
const baseUrl = config.workPlanNewYnUrl
|
||||
console.log('baseUrl-请求', baseUrl)
|
||||
|
||||
const request = config => {
|
||||
// 是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
config.header = config.header || {}
|
||||
if (getToken() && !isToken) {
|
||||
config.header['Authorization'] = 'Bearer ' + getToken()
|
||||
if (token && !isToken) {
|
||||
config.header['Authorization'] = 'Bearer ' + token
|
||||
}
|
||||
// get请求映射params参数
|
||||
if (config.params) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue