Commit 9ae5e92d authored by ztf's avatar ztf

修改项目相关组件

parent 200d845d
......@@ -30,7 +30,7 @@ export default {
// eslint-disable-next-line vue/no-dupe-keys
form: {},
formData: this.basicData,
projectCategory: '',
projectClass: '',
baseQuery: {
modelName: 'DxContextProject',
operator: 'AND',
......@@ -40,13 +40,13 @@ export default {
}
},
watch: {
'form.projectCategory': {
'form.dynamicAttrs.projectClass': {
immediate: true,
deep: true,
handler(val) {
console.log('监听项目分类', val)
if (val) {
this.projectCategory = val
this.projectClass = val
}
}
}
......@@ -77,17 +77,13 @@ export default {
params.parentId = parentId
return params
}
const params = createParams(this.projectCategory)
const params = createParams(this.projectClass)
console.log('params新建项目', params)
post('/DxContextProject/saveRecursionContext', params)
.then(res => {
this.$utils.showMessageSuccess(`添加成功`)
this.$emit('completeEven')
})
// .catch(error => {
// console.error('提交失败:', error);
// this.$utils.showMessageError(`添加失败`);
// });
},
cancel() {
this.$emit('cancel')
......
<template>
<!-- <template>
<div class="project">
<dee-as-com
:lay-config="{
......@@ -6,6 +6,7 @@
layKey: 'projectEdit'
}"
:form="form"
:basic-data="{id:basicData.id}"
@on-submit="toSubmit"
@on-cancel="cancel"
/>
......@@ -36,41 +37,41 @@ export default {
}
},
mounted() {
this.getInitData()
// this.getInitData()
},
methods: {
getInitData() {
const id = this.basicData.id
const params = {
'searchItems': {
'children': [],
'items': [{
'fieldName': 'id',
'operator': 'EQ',
'value': id
}],
'operator': 'AND'
},
'openProps': [
{ 'name': 'header' },
{ 'name': 'managerOrg' },
{ 'name': 'manager' },
{ 'name': 'extProject' },
{ 'name': 'extProgram' }
]
}
post(`/DxContextProject/find/recursion`, params).then(res => {
this.form = res.items.content[0]
})
},
// getInitData() {
// const id = this.basicData.id
// const params = {
// 'searchItems': {
// 'children': [],
// 'items': [{
// 'fieldName': 'id',
// 'operator': 'EQ',
// 'value': id
// }],
// 'operator': 'AND'
// },
// 'openProps': [
// { 'name': 'header' },
// { 'name': 'managerOrg' },
// { 'name': 'manager' },
// { 'name': 'extProject' },
// { 'name': 'extProgram' }
// ]
// }
// post(`/DxContextProject/find/recursion`, params).then(res => {
// this.form = res.items.content[0]
// })
// },
toSubmit() {
const params = { ...this.form }
console.log('params', params)
post('/DxContextProject/saveRecursionContext', params)
.then(res => {
this.$utils.showMessageSuccess(`修改成功`)
this.$emit('completeEven')
})
// post('/DxContextProject/saveRecursionContext', params)
// .then(res => {
// this.$utils.showMessageSuccess(`修改成功`)
// this.$emit('completeEven')
// })
},
cancel() {
this.$emit('cancel')
......@@ -84,4 +85,4 @@ export default {
.project{
height: 500px;
}
</style>
</style> -->
......@@ -57,7 +57,7 @@ export default {
const id = this.form.id
const pageNumber = '7cbdc38f-0122-4e78-b162-57601a33bb7a'
const title = '项目要素'
const type = this.form.projectCategory === '项目' ? '项目' : '项目'
const type = this.form.dynamicAttrs.projectClass === 'project' ? '项目' : '子项'
this.$router.push({
path: `/page/${pageNumber}/${id}?type=${type}&title=${title}&id=${id}&name=${name}&secretCode=${secretCode}`,
query: { name: name, id: id }
......
......@@ -2,7 +2,7 @@
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-09-13 16:02:41
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-10-09 09:27:34
* @LastEditTime: 2024-10-17 13:36:36
* @FilePath: \inet-two\applications\dee-project\src\privateComponents\components\importFile\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -38,14 +38,6 @@ export default {
}
},
mounted() {
// const action = this.$refs['upload'].$parent.$parent.$parent.$parent.$parent.basicData.subTypeName
// if (action === 'ExtPuchasePlanAttribute') {
// this.action = '/ExtPuchasePlanAttribute/importPurchasePlan'
// } else if (action === 'ExtIEDPlan') {
// this.action = '/ExtIEDPlan/importIEDPlan'
// } else if (action === 'ExtICMExternalInterfacePlan') {
// this.action = '/ExtICMExternalInterfacePlan/importICMPlan'
// }
const action = this.$refs['upload'].$parent.$parent.$parent.$parent.$parent.basicData.subTypeName
const actionMap = {
'ExtPuchasePlanAttribute': '/ExtPuchasePlanAttribute/importPurchasePlan',
......@@ -58,11 +50,15 @@ export default {
methods: {
importFile(file) {
const action = this.$refs['upload'].$parent.$parent.$parent.$parent.$parent.basicData.subTypeName
const formData = new FormData()
if (!file) return this.$utils.showMessageWarning('请选择文件')
if (file !== '') {
formData.append('file', file.file)
formData.append('projectId', this.$route.query.id)
if (action === 'ExtIEDPlan') {
formData.append('projectSecret', this.$route.query.secretCode)
}
post(this.action, formData).then(res => {
this.$utils.showMessageSuccess('操作成功')
this.$emit('completeEven')
......
......@@ -2,7 +2,7 @@
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-08-29 11:42:37
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-10-15 09:24:48
* @LastEditTime: 2024-10-17 10:32:07
-->
<template>
<div>
......@@ -26,7 +26,8 @@
typeName: 'ExtInComeContract',
layKey: 'projectContractResult'
}"
dis-business
:result-data="tableData"
@radio-current-change="radioCurrentChange"
/>
<!-- dis-business
......@@ -43,7 +44,7 @@
<script>
// 选择当前项目群/项目下面的合同
// import { post } from '@/utils/http'
import { post } from '@/utils/http'
export default {
name: 'SelectProjectName',
componentName: '选择项目名称',
......@@ -52,6 +53,10 @@ export default {
type: [Object, Array, String, Number],
default: () => null
},
basicData: {
type: Object,
default: () => { }
},
form: {
type: Object,
default: () => { }
......@@ -65,35 +70,39 @@ export default {
projectList: [],
showSelect: false,
selectRow: {},
tableData: []
tableData: [],
itemNumber: null,
programId: null,
projectId: null
}
},
watch: {
value(val) {
this.$emit('input', val)
},
'form.projectCategory': {
'form.dynamicAttrs.projectClass': {
immediate: true,
deep: true,
handler(val) {
console.log('监听项目分类选择合同', val)
if (val) {
console.log('进来了')
this.showIcon = val !== 'program'
this.showSelect = val === 'childProject'
}
}
},
// 监听这个的id,判断当前选择项目或者项目群下面的合同
'form.extProgram': {
immediate: true,
deep: true,
handler(val) {
if (val) {
console.log('项目群id', val)
this.programId = val.id
}
}
}
// 'form.extProgram': {
// immediate: true,
// deep: true,
// handler(val) {
// if (val) {
// console.log('val所属项目', val)
// this.getData(val.id)
// // this.showIcon = val !== 'program'
// // this.showSelect = val === 'childProject'
// }
// }
// },
// 'form.extProject': {
// immediate: true,
// deep: true,
......@@ -108,10 +117,45 @@ export default {
// }
},
mounted() { },
mounted() {
console.log('basicData', this.basicData)
},
methods: {
getProjectNumber() {
const params = {
'pageFrom': 1,
'pageSize': 10,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'id',
'operator': 'EQ',
'value': this.programId || this.projectId
}
],
'operator': 'AND'
},
'openProps': [],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
post('/DxContextProject/search', params).then(res => {
if (res.items) {
this.itemNumber = res.items.content[0].number
console.log('this.itemNumber', this.itemNumber)
}
})
},
handleClickOpen() {
this.dialogShow = true
this.getContractList()
},
handleChange(val) {
this.$emit('input', val)
......@@ -127,51 +171,56 @@ export default {
this.$set(this.form, 'totalBudget', this.selectRow.contractAmount)
this.handleChange(this.selectRow.name)
this.dialogShow = false
},
getContractList() {
const params = {
'pageFrom': 1,
'pageSize': 10,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'state',
'operator': 'EQ',
'value': 'release'
},
{
'fieldName': 'state',
'operator': 'EQ',
'value': 'release'
},
{
'fieldName': 'checkOuted',
'operator': 'EQ',
'value': false
},
{
'fieldName': 'latest',
'operator': 'EQ',
'value': true
},
{
'fieldName': 'itemNumber',
'operator': 'EQ',
'value': this.itemNumber
}
],
'operator': 'AND'
},
'openProps': [],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
post('/ExtInComeContract/search', params).then(res => {
if (res.items) {
this.tableData = res.items.content
}
})
}
// getData() {
// const params = {
// 'pageFrom': 1,
// 'pageSize': 10,
// 'searchItems': {
// 'children': [],
// 'items': [
// {
// 'fieldName': 'state',
// 'operator': 'EQ',
// 'value': 'release'
// },
// {
// 'fieldName': 'state',
// 'operator': 'EQ',
// 'value': 'release'
// },
// {
// 'fieldName': 'checkOuted',
// 'operator': 'EQ',
// 'value': false
// },
// {
// 'fieldName': 'latest',
// 'operator': 'EQ',
// 'value': true
// }
// ],
// 'operator': 'AND'
// },
// 'openProps': [],
// 'sortItem': [
// {
// 'fieldName': 'modifyTime',
// 'sortOrder': 'desc'
// }
// ]
// }
// post('/ExtInComeContract/search', params).then(res => {
// if (res.items) {
// this.tableData = res.items.content
// }
// })
// }
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment