Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
紫光云
web-project
Commits
e855aaf7
Commit
e855aaf7
authored
Jun 11, 2024
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 完成进度完善
parent
7ea4fce5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
34 deletions
+62
-34
performance.ts
src/api/project/performance.ts
+12
-3
data.tsx
src/views/performance/data.tsx
+2
-12
index.vue
src/views/performance/index.vue
+21
-13
performanceEdit.vue
src/views/performance/performanceEdit.vue
+27
-6
No files found.
src/api/project/performance.ts
View file @
e855aaf7
...
...
@@ -14,6 +14,8 @@ enum Api {
DeleteProject
=
'/pro/completion/delete'
,
engineeringList
=
'/pro/completion/getCanCompletion'
,
GetEngineProjectList
=
'/pro/completion/getCompletionPro'
,
audit
=
'/pro/completion/audit'
,
Itemdelete
=
'/pro/completion/delProject'
,
}
export
const
getListByPage
=
(
params
?:
ProjectParams
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
GetList
,
data
:
params
});
...
...
@@ -31,9 +33,9 @@ export const updateItem = (params?: any) =>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
UpdateProject
,
data
:
params
,
//
headers: {
//
'Content-Type': 'application/json;charset=UTF-8',
//
},
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
,
},
});
export
const
deleteItem
=
(
params
?:
any
)
=>
...
...
@@ -51,3 +53,10 @@ export const GetEngineProjectList = (params?: any) =>
'Content-Type'
:
'application/json;charset=UTF-8'
,
},
});
export
const
auditItem
=
(
params
?:
any
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
audit
,
data
:
params
,
});
export
const
Itemdelete
=
(
params
?:
any
)
=>
defHttp
.
delete
<
ProjectModel
>
({
url
:
Api
.
Itemdelete
,
params
});
src/views/performance/data.tsx
View file @
e855aaf7
import
{
BasicColumn
,
FormSchema
}
from
'@/components/Table'
;
export
const
columns
:
(
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
|
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}
)[]
=
[
export
const
columns
:
BasicColumn
[]
=
[
{
title
:
'序号'
,
dataIndex
:
'serialNumber'
,
// 这个dataIndex仅作为标识,不对应实际数据字段
width
:
50
,
// 可以自定义宽度
scopedSlots
:
{
customRender
:
'bodyCell'
},
// 对应模板中的具名插槽
width
:
50
,
// 可以自定义宽度 // 对应模板中的具名插槽
},
{
title
:
'填报周期'
,
...
...
@@ -116,7 +107,6 @@ export const modelColumns: BasicColumn[] = [
title
:
'序号'
,
dataIndex
:
'serialNumber'
,
// 这个dataIndex仅作为标识,不对应实际数据字段
width
:
50
,
// 可以自定义宽度
scopedSlots
:
{
customRender
:
'bodyCell'
},
// 对应模板中的具名插槽
},
{
title
:
'填报周期'
,
...
...
src/views/performance/index.vue
View file @
e855aaf7
...
...
@@ -13,9 +13,6 @@
{{
record
.
completionResult
==
1
?
'已审核'
:
'未审核'
}}
</Tag>
</
template
>
<!-- 其他列正常显示 -->
<span
v-else
>
{{ text }}
</span>
<
template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
...
...
@@ -30,7 +27,7 @@
label: '修改',
onClick: handleEdit.bind(null, record, 0),
ifShow: (_action) => {
return record.completionResult ==
null
;
return record.completionResult ==
0
;
},
},
{
...
...
@@ -42,7 +39,7 @@
confirm: handleDelete.bind(null, record),
},
ifShow: (_action) => {
return record.completionResult ==
null
;
return record.completionResult ==
0
;
},
},
{
...
...
@@ -54,7 +51,7 @@
confirm: examine.bind(null, record, true),
},
ifShow: (_action) => {
return record.completionResult ==
null
;
return record.completionResult ==
0
;
},
},
]"
...
...
@@ -67,12 +64,13 @@
</template>
<
script
lang=
"ts"
setup
>
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
getListByPage
}
from
'@/api/project/performance'
;
import
{
getListByPage
,
auditItem
,
deleteItem
}
from
'@/api/project/performance'
;
import
{
columns
,
searchFormSchema
}
from
'./data'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useRouter
}
from
'vue-router'
;
const
{
push
}
=
useRouter
();
import
performanceModel
from
'./performanceModel.vue'
;
import
{
Tag
}
from
'ant-design-vue'
;
const
[
register
,
{
openModal
:
openModal
}]
=
useModal
();
defineOptions
({
name
:
'Performance'
});
const
[
registerTable
,
{
reload
}]
=
useTable
({
...
...
@@ -96,15 +94,19 @@
},
});
function
handleEdit
(
record
:
Recordable
)
{
openDrawer
(
true
,
{
record
,
isUpdate
:
true
,
function
handleEdit
(
record
:
Recordable
,
disabled
:
number
)
{
push
({
path
:
'/performance/edit'
,
query
:
{
id
:
record
.
id
,
disabled
:
String
(
disabled
),
},
});
}
function
handleDelete
(
record
:
Recordable
)
{
console
.
log
(
record
);
deleteItem
({
id
:
record
.
id
});
reload
();
}
function
handleSuccess
()
{
...
...
@@ -121,10 +123,16 @@
push
({
path
:
'/performance/edit'
,
query
:
{
source
:
JSON
.
stringify
(
e
)
source
:
JSON
.
stringify
(
e
)
,
},
});
}
async
function
examine
(
record
:
Recordable
)
{
const
id
=
record
.
id
;
const
res
=
await
auditItem
({
id
});
console
.
log
(
res
);
reload
();
}
</
script
>
<
style
scoped
>
.btn
{
...
...
src/views/performance/performanceEdit.vue
View file @
e855aaf7
...
...
@@ -43,7 +43,13 @@
import
{
editModel
}
from
'@/api/project/model/performance'
;
import
{
router
}
from
'@/router'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
addItem
,
updateItem
,
getItem
,
GetEngineProjectList
}
from
'@/api/project/performance'
;
import
{
addItem
,
updateItem
,
getItem
,
GetEngineProjectList
,
Itemdelete
,
}
from
'@/api/project/performance'
;
const
loadingRef
=
ref
(
false
);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
false
);
...
...
@@ -70,6 +76,7 @@
handleNew
(
item
);
});
}
else
{
isUpdate
.
value
=
true
;
disabled
.
value
=
route
.
query
.
disabled
==
'0'
?
false
:
true
;
if
(
disabled
.
value
)
{
getTitle
.
value
=
'查看完成情况'
;
...
...
@@ -77,6 +84,7 @@
getTitle
.
value
=
'编辑完成情况'
;
}
let
res
=
await
getItem
({
id
});
formData
.
value
.
id
=
id
;
formData
.
value
.
planCompletion
=
[];
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
const
source
=
res
[
i
];
...
...
@@ -91,10 +99,11 @@
),
};
const
{
setFieldsValue
,
clearValidate
}
=
item
.
Form
[
1
];
source
.
time
=
source
.
beginTime
+
'/'
+
source
.
endTime
;
tabsFormSchema
.
push
(
item
);
formData
.
value
.
planCompletion
.
push
({
id
:
source
.
id
,
investmentld
:
source
.
investment
l
d
,
investmentld
:
source
.
investment
I
d
,
});
nextTick
(()
=>
{
setFieldsValue
({
...
...
@@ -137,18 +146,30 @@
const
{
setFieldsValue
,
clearValidate
}
=
item
.
Form
[
1
];
tabsFormSchema
.
push
(
item
);
formData
.
value
.
planCompletion
.
push
({
investmentId
:
info
.
id
,
id
:
info
.
id
,
investmentId
:
info
.
investmentId
,
});
nextTick
(()
=>
{
setFieldsValue
(
info
);
clearValidate
();
});
}
async
function
deleteItem
(
index
:
any
)
{
loadingRef
.
value
=
true
;
const
id
=
formData
.
value
.
planCompletion
[
index
].
id
;
if
(
id
)
{
await
Itemdelete
({
id
,
});
formData
.
value
.
planCompletion
.
splice
(
index
,
1
);
tabsFormSchema
.
splice
(
index
,
1
);
loadingRef
.
value
=
false
;
}
else
{
formData
.
value
.
planCompletion
.
splice
(
index
,
1
);
tabsFormSchema
.
splice
(
index
,
1
);
loadingRef
.
value
=
false
;
}
}
async
function
handleSubmit
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment