待办中心 项目参数任务对接后端

This commit is contained in:
zyx.net
2022-10-17 15:02:29 +08:00
parent 396b58f892
commit 248078f69b
2 changed files with 77 additions and 34 deletions
@@ -670,6 +670,10 @@
// }
},
mounted() {
console.log(this.$route.query)
if(this.$route.query.type == '1'){
this.handleOkRoleSwitching()
}
this.GetgetLoginUserType()
console.log(this.currentPersonRole)
setTimeout(() => {
@@ -704,35 +708,62 @@
})
},
handleOkRoleSwitching() {
this.$refs.ruleFormRoleSwitching.validate(valid => {
if (valid) {
let query = {
userType: this.formInlineRoleSwitching.roleSwitchingCode,
paramsManifestId: this.$route.query.id,
projectId: this.$route.query.projectId,
userId: this.userInfo().id
}
this.confirmLoadingRoleSwitching = true
postAction('/params/userTypeLog/edit', query).then((res) => {
if (res.success) {
this.currentPersonRole = this.formInlineRoleSwitching.roleSwitchingCode
this.$message.success(this.$t('OperationSuccessful'))
this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode))
this.RoleType.forEach((item,index) => {
if(item.value == this.currentPersonRole){
this.rolename = item.label
}
})
this.selectedRowKeysValue = []
} else {
this.confirmLoadingRoleSwitching = false
this.$message.warning(this.$t('operationFailed'))
}
})
if(this.$route.query.type == '1'){
let query = {
userType:this.$route.query.userType,
paramsManifestId: this.$route.query.id,
projectId: this.$route.query.projectId,
userId: this.userInfo().id
}
})
this.confirmLoadingRoleSwitching = true
postAction('/params/userTypeLog/edit', query).then((res) => {
if (res.success) {
this.currentPersonRole = this.$route.query.userType
this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false
localStorage.setItem('currentPersonRole', JSON.stringify(this.$route.query.userType))
this.RoleType.forEach((item,index) => {
if(item.value == this.currentPersonRole){
this.rolename = item.label
}
})
this.selectedRowKeysValue = []
} else {
this.confirmLoadingRoleSwitching = false
this.$message.warning(this.$t('operationFailed'))
}
})
}else {
this.$refs.ruleFormRoleSwitching.validate(valid => {
if (valid) {
let query = {
userType: this.formInlineRoleSwitching.roleSwitchingCode,
paramsManifestId: this.$route.query.id,
projectId: this.$route.query.projectId,
userId: this.userInfo().id
}
this.confirmLoadingRoleSwitching = true
postAction('/params/userTypeLog/edit', query).then((res) => {
if (res.success) {
this.currentPersonRole = this.formInlineRoleSwitching.roleSwitchingCode
this.$message.success(this.$t('OperationSuccessful'))
this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode))
this.RoleType.forEach((item,index) => {
if(item.value == this.currentPersonRole){
this.rolename = item.label
}
})
this.selectedRowKeysValue = []
} else {
this.confirmLoadingRoleSwitching = false
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
}
},
roleSwitchingClick() {
this.visibleRoleSwitching = true
@@ -47,16 +47,19 @@
<span class="text-operation">{{text ? text:'--'}}</span>
</span>
<span slot="waitFillNumoperation" slot-scope="text,record">
<a class="text-operation"
@click="waitFillClick(record)">{{text ? text:'--'}}</a>
<a class="text-operation" v-if='text'
@click="waitFillClick(record)">{{text}}</a>
<span class="text-operation" v-else >{{'--'}}</span>
</span>
<span slot="waitSdtNumoperation" slot-scope="text,record">
<a class="text-operation"
@click="waitSdtClick(record)">{{text ? text:'--'}}</a>
<a class="text-operation" v-if='text'
@click="waitSdtClick(record)">{{text}}</a>
<span class="text-operation" v-else >{{'--'}}</span>
</span>
<span slot="waitCollectNumoperation" slot-scope="text,record">
<a class="text-operation"
@click="waitCollectClick(record)">{{text ? text:'--'}}</a>
<a class="text-operation" v-if='text'
@click="waitCollectClick(record)">{{text}}</a>
<span class="text-operation" v-else >{{'--'}}</span>
</span>
</a-table>
<div class="page" v-if="dataSource.length > 0">
@@ -165,6 +168,9 @@
//待填写数量
waitFillClick(item) {
let _this = this
item.type = '1'
item.userType = 'dre'
console.log(item)
let newUrl = _this.$router.resolve({
path: '/ParameterItemCollection',
query: item
@@ -175,6 +181,9 @@
//待分配填写人数量
waitSdtClick(item) {
let _this = this
item.type = '1'
item.userType = 'sdt'
console.log(item)
let newUrl = _this.$router.resolve({
path: '/ParameterItemCollection',
query: item
@@ -185,6 +194,9 @@
//参数待发起数量
waitCollectClick(item) {
let _this = this
item.type = '1'
item.userType = 'homo'
console.log(item)
let newUrl = _this.$router.resolve({
path: '/ParameterItemCollection',
query: item