待办中心 项目参数任务对接后端
This commit is contained in:
@@ -670,6 +670,10 @@
|
|||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
console.log(this.$route.query)
|
||||||
|
if(this.$route.query.type == '1'){
|
||||||
|
this.handleOkRoleSwitching()
|
||||||
|
}
|
||||||
this.GetgetLoginUserType()
|
this.GetgetLoginUserType()
|
||||||
console.log(this.currentPersonRole)
|
console.log(this.currentPersonRole)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -704,35 +708,62 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleOkRoleSwitching() {
|
handleOkRoleSwitching() {
|
||||||
this.$refs.ruleFormRoleSwitching.validate(valid => {
|
if(this.$route.query.type == '1'){
|
||||||
if (valid) {
|
let query = {
|
||||||
let query = {
|
userType:this.$route.query.userType,
|
||||||
userType: this.formInlineRoleSwitching.roleSwitchingCode,
|
paramsManifestId: this.$route.query.id,
|
||||||
paramsManifestId: this.$route.query.id,
|
projectId: this.$route.query.projectId,
|
||||||
projectId: this.$route.query.projectId,
|
userId: this.userInfo().id
|
||||||
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'))
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
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() {
|
roleSwitchingClick() {
|
||||||
this.visibleRoleSwitching = true
|
this.visibleRoleSwitching = true
|
||||||
|
|||||||
@@ -47,16 +47,19 @@
|
|||||||
<span class="text-operation">{{text ? text:'--'}}</span>
|
<span class="text-operation">{{text ? text:'--'}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span slot="waitFillNumoperation" slot-scope="text,record">
|
<span slot="waitFillNumoperation" slot-scope="text,record">
|
||||||
<a class="text-operation"
|
<a class="text-operation" v-if='text'
|
||||||
@click="waitFillClick(record)">{{text ? text:'--'}}</a>
|
@click="waitFillClick(record)">{{text}}</a>
|
||||||
|
<span class="text-operation" v-else >{{'--'}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span slot="waitSdtNumoperation" slot-scope="text,record">
|
<span slot="waitSdtNumoperation" slot-scope="text,record">
|
||||||
<a class="text-operation"
|
<a class="text-operation" v-if='text'
|
||||||
@click="waitSdtClick(record)">{{text ? text:'--'}}</a>
|
@click="waitSdtClick(record)">{{text}}</a>
|
||||||
|
<span class="text-operation" v-else >{{'--'}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span slot="waitCollectNumoperation" slot-scope="text,record">
|
<span slot="waitCollectNumoperation" slot-scope="text,record">
|
||||||
<a class="text-operation"
|
<a class="text-operation" v-if='text'
|
||||||
@click="waitCollectClick(record)">{{text ? text:'--'}}</a>
|
@click="waitCollectClick(record)">{{text}}</a>
|
||||||
|
<span class="text-operation" v-else >{{'--'}}</span>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="page" v-if="dataSource.length > 0">
|
<div class="page" v-if="dataSource.length > 0">
|
||||||
@@ -165,6 +168,9 @@
|
|||||||
//待填写数量
|
//待填写数量
|
||||||
waitFillClick(item) {
|
waitFillClick(item) {
|
||||||
let _this = this
|
let _this = this
|
||||||
|
item.type = '1'
|
||||||
|
item.userType = 'dre'
|
||||||
|
console.log(item)
|
||||||
let newUrl = _this.$router.resolve({
|
let newUrl = _this.$router.resolve({
|
||||||
path: '/ParameterItemCollection',
|
path: '/ParameterItemCollection',
|
||||||
query: item
|
query: item
|
||||||
@@ -175,6 +181,9 @@
|
|||||||
//待分配填写人数量
|
//待分配填写人数量
|
||||||
waitSdtClick(item) {
|
waitSdtClick(item) {
|
||||||
let _this = this
|
let _this = this
|
||||||
|
item.type = '1'
|
||||||
|
item.userType = 'sdt'
|
||||||
|
console.log(item)
|
||||||
let newUrl = _this.$router.resolve({
|
let newUrl = _this.$router.resolve({
|
||||||
path: '/ParameterItemCollection',
|
path: '/ParameterItemCollection',
|
||||||
query: item
|
query: item
|
||||||
@@ -185,6 +194,9 @@
|
|||||||
//参数待发起数量
|
//参数待发起数量
|
||||||
waitCollectClick(item) {
|
waitCollectClick(item) {
|
||||||
let _this = this
|
let _this = this
|
||||||
|
item.type = '1'
|
||||||
|
item.userType = 'homo'
|
||||||
|
console.log(item)
|
||||||
let newUrl = _this.$router.resolve({
|
let newUrl = _this.$router.resolve({
|
||||||
path: '/ParameterItemCollection',
|
path: '/ParameterItemCollection',
|
||||||
query: item
|
query: item
|
||||||
|
|||||||
Reference in New Issue
Block a user