From 2f79c2fd544b622b5eb6cb11adf405737ef6a4a9 Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Fri, 25 Oct 2024 18:21:10 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9C=88=E8=AE=A1=E5=88=92=E7=AD=89=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E8=B0=83=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/workPlan/monthPlan.js | 24 +
config.js | 4 +-
pages/gzt/index.vue | 30 +-
pages/login.vue | 1067 +++++++++--------
pages/workPlan/index/components/calendar.vue | 20 +-
.../monthPlan/components/time-select.vue | 1 +
pages/workPlan/monthPlan/index.vue | 506 ++++++--
pages/workPlan/my/index.vue | 17 +-
.../components/infrastructure-model.vue | 26 +-
.../workbench/components/production-model.vue | 26 +-
pages/workPlan/workbench/index.vue | 21 +-
store/index.js | 4 +-
store/modules/workPlan.js | 12 +
utils/request.js | 3 +-
utils/request_new_yn.js | 8 +-
15 files changed, 1143 insertions(+), 626 deletions(-)
create mode 100644 store/modules/workPlan.js
diff --git a/api/workPlan/monthPlan.js b/api/workPlan/monthPlan.js
index ee8bacc..9ad736e 100644
--- a/api/workPlan/monthPlan.js
+++ b/api/workPlan/monthPlan.js
@@ -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
+ })
+}
diff --git a/config.js b/config.js
index 98e1616..7b4980c 100644
--- a/config.js
+++ b/config.js
@@ -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: {
diff --git a/pages/gzt/index.vue b/pages/gzt/index.vue
index 2b79d9b..09a84ce 100644
--- a/pages/gzt/index.vue
+++ b/pages/gzt/index.vue
@@ -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'
diff --git a/pages/login.vue b/pages/login.vue
index 0fa315b..9a1efb4 100644
--- a/pages/login.vue
+++ b/pages/login.vue
@@ -1,504 +1,607 @@
-
-
-
- 作业管控智慧平台
-
-
-
-
- 密码登录
- 验证码登录
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 忘记密码
- 登录
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ 作业管控智慧平台
+
+
+
+
+ 密码登录
+ 验证码登录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 忘记密码
+
+ 登录===
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 登录
-
-
-
-
-
-
-
-
-
-
-
-
+ 登录
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/workPlan/index/components/calendar.vue b/pages/workPlan/index/components/calendar.vue
index a843e71..05e7015 100644
--- a/pages/workPlan/index/components/calendar.vue
+++ b/pages/workPlan/index/components/calendar.vue
@@ -30,18 +30,18 @@
-
+
- {{ day }}
+ {{ day }}
- {{ day.day }}
+ {{ days.day }}
中:9
低:30
@@ -52,9 +52,9 @@
-
+
-
+
{{ item.title }}
{{ weekTimeChange(index) }}
@@ -74,7 +74,7 @@
-
+
工程名称
作业人数
diff --git a/pages/workPlan/monthPlan/components/time-select.vue b/pages/workPlan/monthPlan/components/time-select.vue
index efbd16e..ecc885c 100644
--- a/pages/workPlan/monthPlan/components/time-select.vue
+++ b/pages/workPlan/monthPlan/components/time-select.vue
@@ -24,6 +24,7 @@ export default {
methods: {
onDateChange(e) {
this.DateValue = e.detail.value
+ // this.$emit('')
}
}
}
diff --git a/pages/workPlan/monthPlan/index.vue b/pages/workPlan/monthPlan/index.vue
index 9f7b7da..66e1913 100644
--- a/pages/workPlan/monthPlan/index.vue
+++ b/pages/workPlan/monthPlan/index.vue
@@ -14,16 +14,17 @@
-
+
-
+
- 请选择
- >
+ {{ projectName ? projectName : '请选择' }}
+ >
-
+
+
+
+ {{ DateValue }}
+ >
+
+
@@ -83,35 +90,26 @@
-
+
-
+
@@ -130,18 +128,24 @@
导入计划
- 保存提交
+ 保存提交
-
+
-
+
+
@@ -150,7 +154,7 @@
-
+
{{ currentTime }}
@@ -160,13 +164,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -174,17 +212,37 @@
- 请选择
- >
+ {{ projectInPopupName ? projectInPopupName : '请选择' }}
+ >
- 请选择
- >
+ {{ projectQueryType ? projectQueryType : '请选择' }}
+ >
+
+
+
+
+
+
+ 计划数量
+ {{ item.planCount }}
+
+
+
+ 提交人/提交时间
+ {{ item.upUser }}/{{ item.planTime }}
+ {{ item.state }}
+
+
+
@@ -204,9 +262,14 @@
:localdata="projectRange"
>
-
+
- 暂无数据
+
+
+
+ {{ item.name }}
+
+
-
+
{{ item.title }}
+
+
+
+
+ {{ item.text }}
+
+
+
@@ -228,7 +304,14 @@
diff --git a/pages/workPlan/workbench/components/infrastructure-model.vue b/pages/workPlan/workbench/components/infrastructure-model.vue
index 68600bc..71a7e53 100644
--- a/pages/workPlan/workbench/components/infrastructure-model.vue
+++ b/pages/workPlan/workbench/components/infrastructure-model.vue
@@ -3,7 +3,13 @@
基建-计划审核
-
+
{{ icon.icon_title }}
@@ -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: {
diff --git a/pages/workPlan/workbench/components/production-model.vue b/pages/workPlan/workbench/components/production-model.vue
index 94493e1..d9d8faa 100644
--- a/pages/workPlan/workbench/components/production-model.vue
+++ b/pages/workPlan/workbench/components/production-model.vue
@@ -3,7 +3,13 @@
生产-计划审核
-
+
{{ icon.icon_title }}
@@ -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: {
diff --git a/pages/workPlan/workbench/index.vue b/pages/workPlan/workbench/index.vue
index 51c2f6f..a5118d6 100644
--- a/pages/workPlan/workbench/index.vue
+++ b/pages/workPlan/workbench/index.vue
@@ -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)
}
}
}
diff --git a/store/index.js b/store/index.js
index 83a9db5..4619955 100644
--- a/store/index.js
+++ b/store/index.js
@@ -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
})
diff --git a/store/modules/workPlan.js b/store/modules/workPlan.js
new file mode 100644
index 0000000..f2cc3c6
--- /dev/null
+++ b/store/modules/workPlan.js
@@ -0,0 +1,12 @@
+const workPlan = {
+ state: {
+ projectList: []
+ },
+ mutations: {
+ SET_PROJECT: (state, list) => {
+ state.projectList = list
+ }
+ }
+}
+
+export default workPlan
diff --git a/utils/request.js b/utils/request.js
index 69bee70..be377dc 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -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 => {
diff --git a/utils/request_new_yn.js b/utils/request_new_yn.js
index c316ac7..1996238 100644
--- a/utils/request_new_yn.js
+++ b/utils/request_new_yn.js
@@ -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) {