diff --git a/src/store/index.js b/src/store/index.js index dd5377d4..d10bea34 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -65,6 +65,7 @@ export default new Vuex.Store({ // WORKFLOWURL: "http://192.168.34.216:88/#/workspace/forms", //jiayu工作流地址(本地) // WORKFLOWURL: "http://192.168.34.138:88/#/workspace/forms", //坤工作流地址(本地) WORKFLOWURL: "http://192.168.34.133:88/#/workspace/forms", //罗峰工作流地址(本地) + UNIVERURl: "http://192.168.34.133:5173/", // CONTRACTORURL: process.env.NODE_ENV == "development" ? "http://192.168.34.131:88/#/workspace/contractorApply" : `${window.location.protocol}//${window.location.host}/contractorApply/index.html#/contractorApply`, //罗峰承包商入场地址(本地) // UPLOADURL:'http://182.90.224.237:51234/upload/image/',// 郭圣雄远程 // FILEURL:'http://182.90.224.237:51234/image/',//郭圣雄远程 diff --git a/src/views/projectFront/monthWeekReportManage/contractorUniver.vue b/src/views/projectFront/monthWeekReportManage/contractorUniver.vue index 66f4acc1..90b118bf 100644 --- a/src/views/projectFront/monthWeekReportManage/contractorUniver.vue +++ b/src/views/projectFront/monthWeekReportManage/contractorUniver.vue @@ -9,6 +9,16 @@ + + +
@@ -60,6 +70,7 @@
+ {{ tagTypeName(item.status) }}
{{ dayjsTime(item) }}
@@ -90,6 +101,7 @@
+ {{ tagTypeName(item.status) }}
{{ dayjsTime(item) }}
@@ -123,7 +135,7 @@ @@ -167,7 +179,7 @@ import WeeklyPlan from '@/views/projectFront/scheduleManage/components/weeklyPlan.vue'; import MonthlyPlan from '@/views/projectFront/scheduleManage/components/monthlyPlan.vue'; import OverviewProject from '@/views/projectFront/scheduleManage/components/overviewProject.vue'; -import { getDeviceUnitPage } from '@/assets/js/api/project'; +import { getDeviceUnitPage, getProjectGroupPage } from '@/assets/js/api/project'; import { getWeldingWorker } from '@/assets/js/api/pipelineWelding'; import UniverSheet from '@/components/UniverSheet.vue'; import { isJSON } from '@/util/nowDate/index'; @@ -192,7 +204,8 @@ export default { return { activeName: 'first', searchForm: { - enterpriseId: '' + enterpriseId: '', + groupId: '' }, queryEnterpriseList: [], @@ -341,7 +354,8 @@ export default { consent: false, turnDown: false, deviceInfo: {}, - isType: 1 + isType: 1, + groupList: [] }; }, created() { @@ -358,12 +372,34 @@ export default { key: 'turnDown', menuPath: '/project/monthWeekReportManage/contractorUniver' }); + this.getProjectGroupList(); }, mounted() { this.loadList(); }, //列表加载 methods: { + getProjectGroupList() { + let param = { + projectSn: this.$store.state.projectSn, + pageNo: 1, + pageSize: -1 + }; + getProjectGroupPage(param).then(res => { + this.groupList = [ + // { + // id: "", + // deviceUnitName: "全部装置", + // deviceUnitNo: "", + // projectGroupIds: "", + // }, + ...res.result.records + ]; + if (this.groupList.length > 0) { + this.searchForm.groupId = this.groupList[0].id; + } + }); + }, // 弹窗 dialogPoint(dialogType, row) { this.dialogType = dialogType; @@ -406,9 +442,10 @@ export default { levelType: this.activeName == 'first' ? 2 : 1, month: dayjs(this.cardForm.month).format('MM'), year: dayjs(this.cardForm.month).format('YYYY'), - deviceGroupId: this.leftId, + deviceId: this.leftId, type: this.isType, - enterpriseId: this.searchForm.enterpriseId + enterpriseId: this.searchForm.enterpriseId, + groupId: this.searchForm.groupId }; if (this.dialogType == 1) { // this.cardForm.floorId = this.currentFloorDetail.floorId @@ -462,7 +499,7 @@ export default { }, load() { if (this.pageSize * this.projectQuantityInfo.pageNo >= this.projectQuantityInfo.total) return; - if (!this.tabLoadSetTimout) return; + if (!this.tabLoadSetTimout || !this.leftId) return; this.projectQuantityInfo.pageNo += 1; this.getProjectQuantityList(); }, @@ -470,7 +507,7 @@ export default { getProjectQuantityList() { this.tabLoadSetTimout = false; getContractorMonthlyPeriodPage({ - deviceGroupId: this.leftId, + deviceId: this.leftId, projectSn: this.projectSn, month: this.selectMonth ? dayjs(this.selectMonth).format('MM') : '', year: this.selectMonth ? dayjs(this.selectMonth).format('YYYY') : '', @@ -479,7 +516,8 @@ export default { type: this.isType, pageNo: this.projectQuantityInfo.pageNo, pageSize: this.projectQuantityInfo.pageSize, - enterpriseId: this.searchForm.enterpriseId + enterpriseId: this.searchForm.enterpriseId, + groupId: this.searchForm.groupId }) .then(res => { console.log(res); @@ -639,6 +677,26 @@ export default { const time = dayjs(row.year + '-' + row.month).format('YYYY-MM'); return find ? time + '-' + find.whichWeekName : time; }; + }, + tagType() { + return type => { + const obj = { + 1: 'warning', + 2: 'danger', + 3: 'success' + }; + return obj[type] || ''; + }; + }, + tagTypeName() { + return type => { + const obj = { + 1: '待审批', + 2: '已驳回', + 3: '已同意' + }; + return obj[type] || ''; + }; } } }; @@ -686,21 +744,21 @@ export default { display: flex; font-size: 14px; } - > div::before { - content: ''; - display: block; - border-top: 8px solid transparent; - border-right: 10px solid transparent; - border-bottom: 8px solid transparent; - border-left: 10px solid transparent; - height: 0; - } + // > div::before { + // content: ''; + // display: block; + // border-top: 8px solid transparent; + // border-right: 10px solid transparent; + // border-bottom: 8px solid transparent; + // border-left: 10px solid transparent; + // height: 0; + // } .active { color: #6587ed; } - .active::before { - border-left: 10px solid #6587ed; - } + // .active::before { + // border-left: 10px solid #6587ed; + // } .el-icon-delete { color: #f56c6c; } @@ -786,7 +844,7 @@ export default { .treeList { background-color: rgba(216, 216, 216, 0.2); - height: calc(100% - 42px) !important; + height: calc(100% - 42px - 32px) !important; } li { diff --git a/src/views/projectFront/monthWeekReportManage/projectTeamUniver.vue b/src/views/projectFront/monthWeekReportManage/projectTeamUniver.vue index 1cbfed24..19bc7c49 100644 --- a/src/views/projectFront/monthWeekReportManage/projectTeamUniver.vue +++ b/src/views/projectFront/monthWeekReportManage/projectTeamUniver.vue @@ -123,7 +123,7 @@ @@ -342,6 +342,7 @@ export default { turnDown: false, save: false, deviceInfo: {}, + univerInfo: {}, isType: 2 }; }, @@ -354,6 +355,14 @@ export default { }, mounted() { this.loadList(); + window.onload = () => { + window.addEventListener('message', e => { + if (this.$store.state.UNIVERURl.includes(e.origin)) { + this.univerInfo = JSON.parse(e.data); + console.log(this.univerInfo, 'univerInfo'); + } + }); + }; }, //列表加载 methods: { @@ -400,7 +409,8 @@ export default { type: this.isType, month: dayjs(this.cardForm.month).format('MM'), year: dayjs(this.cardForm.month).format('YYYY'), - deviceGroupId: this.leftId + groupId: this.leftId, + deviceId: this.univerInfo.id // enterpriseId: this.searchForm.enterpriseId }; if (this.dialogType == 1) { @@ -455,7 +465,7 @@ export default { }, load() { if (this.pageSize * this.projectQuantityInfo.pageNo >= this.projectQuantityInfo.total) return; - if (!this.tabLoadSetTimout) return; + if (!this.tabLoadSetTimout || !this.leftId) return; this.projectQuantityInfo.pageNo += 1; this.getProjectQuantityList(); }, @@ -463,7 +473,8 @@ export default { getProjectQuantityList() { this.tabLoadSetTimout = false; getContractorMonthlyPeriodPage({ - deviceGroupId: this.leftId, + deviceId: this.univerInfo.id, + groupId: this.leftId, projectSn: this.projectSn, month: this.selectMonth ? dayjs(this.selectMonth).format('MM') : '', year: this.selectMonth ? dayjs(this.selectMonth).format('YYYY') : '',