From 3bb4421ecafa6b61f5e863f750edfaba66d622d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=8A=B2=E9=BE=99?= <2860996570@qq.com> Date: Wed, 20 Nov 2024 15:35:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/auditPagesApi/index.js | 9 + src/api/renwuApi/index.js | 24 + src/assets/styles/public.scss | 15 +- src/utils/request.js | 2 +- src/views/auditPages/taskManagement/index.vue | 145 ++--- src/views/auditPages/taskManagement/info.vue | 513 ++++++++++-------- src/views/components/myDialog/index.vue | 3 + src/views/system/user/danweiList.vue | 17 +- src/views/unitPages/myTask/index.vue | 376 ++++++++----- 9 files changed, 644 insertions(+), 460 deletions(-) diff --git a/src/api/auditPagesApi/index.js b/src/api/auditPagesApi/index.js index 2158f52..9afc10c 100644 --- a/src/api/auditPagesApi/index.js +++ b/src/api/auditPagesApi/index.js @@ -17,6 +17,15 @@ export function listUnit(query) { }) } +// 查询单位列表 +export function listUnitdw(query) { + return request({ + url: '/tc/unit/dwList', + method: 'get', + params: query + }) +} + // 删除单位 export function delUnit(unitId) { return request({ diff --git a/src/api/renwuApi/index.js b/src/api/renwuApi/index.js index dd0a5ab..0b395c7 100644 --- a/src/api/renwuApi/index.js +++ b/src/api/renwuApi/index.js @@ -6,4 +6,28 @@ export function addassetTaskadd(data) { method: "post", data, }) + } + + export function getassetTask(params) { + return request({ + url: '/unit/assetTask/page', + method: "get", + params, + }) + } + + export function getassetTaskid(params) { + return request({ + url: `/unit/assetTask/${params}`, + method: "get", + // params, + }) + } + + export function geassetTaskcHc(params) { + return request({ + url: `/unit/assetTask/zcHc`, + method: "get", + params, + }) } \ No newline at end of file diff --git a/src/assets/styles/public.scss b/src/assets/styles/public.scss index 3b78f71..cf42bec 100644 --- a/src/assets/styles/public.scss +++ b/src/assets/styles/public.scss @@ -138,6 +138,7 @@ width: 100%; overflow-y: scroll; background-color: #f2f2f2; + display: flex; .el-row { height: 100%; @@ -154,13 +155,20 @@ background-color: #fff; border-radius: 5px; } - + .info-left{ + flex: 5; + } + .info-right{ + flex: 1; + } .info-right { margin-left: 10px; .info-title { + margin-top: 15px; + font-weight: 700; - font-size: 18px; + font-size: 16px; color: #3D3D3D; padding-left: 10px; @@ -189,7 +197,7 @@ border-radius: 5px; .content-info { - padding: 20px 0; + padding: 15px 0; margin-bottom: 15px; background-color: #fff; border-radius: 5px; @@ -218,7 +226,6 @@ } .top-info { - margin: 20px 20px 0px 20px; padding: 20px; background: #FAFBFC; diff --git a/src/utils/request.js b/src/utils/request.js index ffb0d21..a7a9c08 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -17,7 +17,7 @@ const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 baseURL: process.env.VUE_APP_BASE_API, // 超时 - timeout: 10000 + timeout: 50000 }) // request拦截器 diff --git a/src/views/auditPages/taskManagement/index.vue b/src/views/auditPages/taskManagement/index.vue index 758bc89..b417135 100644 --- a/src/views/auditPages/taskManagement/index.vue +++ b/src/views/auditPages/taskManagement/index.vue @@ -7,35 +7,35 @@ - + - + - - - + + + + + + + + + - - - - - - + + + + + @@ -63,29 +63,32 @@ - - - + + + - - - + + @@ -94,21 +97,14 @@
-<<<<<<< HEAD 查看 -======= - 查看 ->>>>>>> 5a6aa4b4a0b31b87d8a59d02d85f248da13cf486
-
+ +
-<<<<<<< HEAD 审核 -======= - 审核 ->>>>>>> 5a6aa4b4a0b31b87d8a59d02d85f248da13cf486
@@ -160,7 +156,7 @@ import myPagination from "@/views/components/Pagination/index.vue" import myDialog from "@/views/components/myDialog/index.vue" import danweiList from "@/views/system/user/danweiList.vue" -import { addassetTaskadd } from "@/api/renwuApi/index.js" +import { addassetTaskadd, getassetTask, getassetTaskid } from "@/api/renwuApi/index.js" export default { // dicts: ['jjh_project_type', 'bms_approval_status', "project_middle_type", "project_small_type", "project_categories"], @@ -180,35 +176,7 @@ export default { size: 10, }, tableData: [ - { - number: 20230001, - name: "XXX任务", - type: "2023-07-30 16:30:21", - unit: "2023-07-30", - time: "2023-07-30 16:30:21", - status: 0, - }, { - number: 20230001, - name: "XXX任务", - type: "2023-07-30 16:30:21", - unit: "2023-07-30", - time: "2023-07-30 16:30:21", - status: 1, - }, { - number: 20230001, - name: "XXX任务", - type: "2023-07-30 16:30:21", - unit: "2023-07-30", - time: "2023-07-30 16:30:21", - status: 3, - }, { - number: 20230001, - name: "XXX任务", - type: "2023-07-30 16:30:21", - unit: "2023-07-30", - time: "2023-07-30 16:30:21", - status: 4, - }, + ], loading: false, tabHeader: undefined, @@ -243,7 +211,7 @@ export default { // 关闭新增弹窗 resetForm() { this.ruleForm = { - dwmc: [], + dwmc: [], taskName: "", taskDeadline: "", } @@ -256,7 +224,11 @@ export default { this.ruleForm.dwmc = this.ruleForm.dwmc.join(",") addassetTaskadd(this.ruleForm).then(res => { this.resetForm() + this.getInfo(); }) + setTimeout(() => { + this.ruleForm.dwmc = this.ruleForm.dwmc.split(",") + }, 0); } else { console.log('error submit!!'); return false; @@ -278,12 +250,12 @@ export default { }, // 获取列表 getInfo() { - // this.loading = true; - // jProject(this.pagination).then(res=>{ - // this.loading = false; - // this.total = res.data.total; - // this.tableData = res.data.records; - // }) + this.loading = true; + getassetTask(this.pagination).then(res => { + this.loading = false; + this.total = res.data.total; + this.tableData = res.data.records; + }) }, // 重置 resetQuery() { @@ -298,7 +270,7 @@ export default { current: 1, size: 10, } - this.getList(); + this.getInfo(); }, //打开列表 addliebiao() { @@ -321,17 +293,17 @@ export default { size: 10 } if (this.formInline.time.length > 0) { - this.formInline.startTime = this.formInline.time[0] + this.formInline.begainTime = this.formInline.time[0] this.formInline.endTime = this.formInline.time[1] } this.pagination = { ...this.pagination, ...this.formInline }; - this.getList(); + this.getInfo(); }, // 页码获取 getPagination(pages) { this.pagination.current = pages.page; this.pagination.size = pages.limit; - this.getList(); + this.getInfo(); }, // 导入 handleImport() { }, @@ -346,17 +318,15 @@ export default { }, // 查看详情 - goInfo() { + goInfo(row) { + getassetTaskid(row.id) this.$router.push({ name: 'TaskInfo', query: { - pageType: "info", + pageType: "look", + id:row.id } }) }, - // 编辑 - edit() { - }, - // 删除 delInfo() { this.$router.push({ name: 'taskAudit', query: { @@ -364,6 +334,11 @@ export default { } }) }, + // 编辑 + edit() { + }, + // 审核 + // 修改table背景色 tableRowClassName({ row, rowIndex }) { if (rowIndex % 2 !== 0) { diff --git a/src/views/auditPages/taskManagement/info.vue b/src/views/auditPages/taskManagement/info.vue index a9efa47..51ff135 100644 --- a/src/views/auditPages/taskManagement/info.vue +++ b/src/views/auditPages/taskManagement/info.vue @@ -1,241 +1,236 @@ + diff --git a/src/views/components/myDialog/index.vue b/src/views/components/myDialog/index.vue index 890cf70..e4652ea 100644 --- a/src/views/components/myDialog/index.vue +++ b/src/views/components/myDialog/index.vue @@ -115,4 +115,7 @@ export default { ::v-deep .custom-my-class { margin-top: 15vh !important; } +::v-deep .el-dialog__body{ + padding-top: 10px !important; +} diff --git a/src/views/system/user/danweiList.vue b/src/views/system/user/danweiList.vue index 5f7e2cf..44365ec 100644 --- a/src/views/system/user/danweiList.vue +++ b/src/views/system/user/danweiList.vue @@ -4,7 +4,7 @@