Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

# Conflicts:
#	back/src/views/modules/myAgent/demo/ResourcesAndServices.vue
This commit is contained in:
851673013@qq.com 2022-07-13 19:07:12 +08:00
commit c61611e01e
2 changed files with 207 additions and 46 deletions

View File

@ -102,6 +102,8 @@
</template> </template>
<script> <script>
import qs from 'qs'
export default { export default {
components: {}, components: {},
props: { props: {
@ -115,7 +117,9 @@ export default {
data () { data () {
return { return {
dataList: [], dataList: [],
dataView: [] dataView: [],
//
unit: ''
} }
}, },
watch: { watch: {
@ -133,11 +137,17 @@ export default {
console.log(this.dataView) console.log(this.dataView)
console.log(this.dataForm) console.log(this.dataForm)
// //
this.dataView.children[0].children[0].children[4].note1 = // this.dataView.children[0].children[0].children[4].note1 =
this.dataForm.description // this.dataForm.description
// //
this.dataView.children[0].children[0].children[0].note1 = // this.dataView.children[0].children[0].children[0].note1 =
this.dataForm.name // this.dataForm.name
//
this.dataView.children[2].children[1].children[0].note1 =
this.dataForm.shareCondition
//
this.dataView.children[2].children[1].children[1].note1 =
this.dataForm.shareType
this.dataForm.infoList.map((item, index) => { this.dataForm.infoList.map((item, index) => {
this.dataView.children.map((itemView, indexView) => { this.dataView.children.map((itemView, indexView) => {
// console.log('itemView', itemView) // console.log('itemView', itemView)
@ -153,22 +163,22 @@ export default {
this.dataView.children[indexView].children[0].children[ this.dataView.children[indexView].children[0].children[
indexSon indexSon
].note1 = this.dataForm.name ].note1 = this.dataForm.name
} else if (itemSon.name.indexOf('共享条件') != -1) {
this.dataView.children[indexView].children[0].children[
indexSon
].note1 = this.dataForm.shareCondition
} else if (itemSon.name.indexOf('共享方式') != -1) {
this.dataView.children[indexView].children[0].children[
indexSon
].note1 = this.dataForm.shareMode
} else if (itemSon.name.indexOf('共享类型') != -1) {
this.dataView.children[indexView].children[0].children[
indexSon
].note1 = this.dataForm.shareType
} else if (itemSon.name.indexOf('能力类型') != -1) { } else if (itemSon.name.indexOf('能力类型') != -1) {
this.dataView.children[indexView].children[0].children[ this.dataView.children[indexView].children[0].children[
indexSon indexSon
].note1 = this.dataForm.type ].note1 = this.dataForm.type
} else if (itemSon.name.indexOf('属部门') != -1) {
this.dataView.children[indexView].children[0].children[
indexSon
].note1 = this.unit
} else if (itemSon.name.indexOf('共享条件') != -1) {
this.dataView.children[indexView].children[
indexViewSon
].children[indexSon].note1 = this.dataForm.shareCondition
} else if (itemSon.name.indexOf('共享类型') != -1) {
this.dataView.children[indexView].children[
indexViewSon
].children[indexSon].note1 = this.dataForm.shareType
} else if (itemSon.name === item.attrType) { } else if (itemSon.name === item.attrType) {
if (itemSon.type !== ' multipleAdditions') { if (itemSon.type !== ' multipleAdditions') {
this.dataView.children[indexView].children[ this.dataView.children[indexView].children[
@ -233,7 +243,7 @@ export default {
} else if (itemSon.name.indexOf('属部门') != -1) { } else if (itemSon.name.indexOf('属部门') != -1) {
this.dataView.children[indexView].children[0].children[ this.dataView.children[indexView].children[0].children[
indexSon indexSon
].note1 = this.dataForm.deptId ].note1 = this.unit
} else if (itemSon.name.indexOf('部门联系人电话') != -1) { } else if (itemSon.name.indexOf('部门联系人电话') != -1) {
this.dataView.children[indexView].children[0].children[ this.dataView.children[indexView].children[0].children[
indexSon indexSon
@ -285,10 +295,21 @@ export default {
type: 'warning' type: 'warning'
}) })
} }
},
deptName () {
console.log(this.dataForm.deptId)
this.$http
.get(`/sys/dept/${this.dataForm.deptId}`)
.then(({ data: res }) => {
console.log(res.data.name, 'res')
this.unit = res.data.name
})
} }
}, },
created () {}, created () {},
mounted () {} mounted () {
this.deptName()
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -28,13 +28,26 @@
</el-form> </el-form>
</div> </div>
<!-- 流程综合组件 --> <!-- 流程综合组件 -->
<ren-process-multiple <!-- <ren-process-multiple
v-if="processVisible" v-if="processVisible"
updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId" updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId"
saveFormUrl="/processForm/tabilityapplication" saveFormUrl="/processForm/tabilityapplication"
dataFormName="dataForm" dataFormName="dataForm"
ref="renProcessMultiple" ref="renProcessMultiple"
></ren-process-multiple> ></ren-process-multiple> -->
<!-- 审批 -->
<div class="agreeOr">
<h3>审批</h3>
<div>
<el-radio-group v-model="agreeOrList" style="width:230px;">
<el-radio-button label="同意" class="blueAll">同意</el-radio-button>
<el-radio-button label="退回" class="redAll">退回</el-radio-button>
</el-radio-group>
<el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input>
<el-input v-if="agreeOrList ==='退回'" v-model="inputNo" placeholder="请输入退回意见"></el-input>
<el-button class="inputBule" @click="agreeOrNot">提交</el-button>
</div>
</div>
</div> </div>
</template> </template>
@ -42,9 +55,12 @@
import processModule from '@/mixins/process-module' import processModule from '@/mixins/process-module'
import Applicationresources from './Application-resources.vue' import Applicationresources from './Application-resources.vue'
import ResourcesAndServices from './ResourcesAndServices.vue' import ResourcesAndServices from './ResourcesAndServices.vue'
import debounce from 'lodash/debounce'
import qs from 'qs'
export default { export default {
// //
mixins: [processModule], // mixins: [processModule],
components: { components: {
Applicationresources, Applicationresources,
ResourcesAndServices ResourcesAndServices
@ -70,10 +86,38 @@ export default {
coverageNotShow: true, coverageNotShow: true,
nameNotShow: false, nameNotShow: false,
algorithmShow: true, algorithmShow: true,
insertList: [] insertList: [],
inputAgree: '',
inputNo: '',
agreeOrList: '同意',
taskId: ''
} }
}, },
watch: {}, watch: {},
created () {
// KEY
console.log('params=================>', this.$route, this.$route.params)
this.taskId = this.$route.params.taskId
this.init()
console.log('fromList', this.$router.currentRoute.params.businessKey)
// this.dataForm = this.$router.currentRoute.params.params.params.resourceDTO
var callbacks = {
startProcessSuccessCallback: this.closeCurrentTab,
startProcessErrorCallback: this.startProcessErrorCallback,
taskHandleSuccessCallback: this.closeCurrentTab,
taskHandleErrorCallback: this.taskHandleErrorCallback,
formSaveSuccessCallback: null,
formSaveErrorCallback: null
}
//
this.initProcessMultiple(callbacks)
},
mounted () {
const businessKey = this.$router.currentRoute.params.businessKey
this.getInfo(businessKey)
this.methodsThree()
console.log(this.taskId, 'this.dataForm.taskId')
},
computed: {}, computed: {},
methods: { methods: {
getInfo (id) { getInfo (id) {
@ -101,35 +145,131 @@ export default {
console.log('id', this.$router.currentRoute.params.businessKey) console.log('id', this.$router.currentRoute.params.businessKey)
// } // }
}) })
} },
}, agreeOrNot: debounce(function () {
created () { if (this.agreeOrList === '同意') {
// this.dataForm = this.$router.currentRoute.params.id console.log('this.dataForm.taskId', this.taskId)
this.init() const params = qs.stringify({
console.log('fromList', this.$router.currentRoute.params.businessKey) taskId: this.taskId,
// this.dataForm = this.$router.currentRoute.params.params.params.resourceDTO comment: this.inputAgree
var callbacks = { })
startProcessSuccessCallback: this.closeCurrentTab, console.log(params)
startProcessErrorCallback: this.startProcessErrorCallback, this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
taskHandleSuccessCallback: this.closeCurrentTab, if (res.code !== 0) {
taskHandleErrorCallback: this.taskHandleErrorCallback, this.$message.error(res.msg)
formSaveSuccessCallback: null, if (this.callbacks.taskHandleErrorCallback) {
formSaveErrorCallback: null this.callbacks.taskHandleErrorCallback(res)
} }
// return
this.initProcessMultiple(callbacks) }
}, this.$message({
mounted () { message: this.$t('prompt.success'),
const businessKey = this.$router.currentRoute.params.businessKey type: 'success',
this.getInfo(businessKey) duration: 500,
this.methodsThree() onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
})
}).catch(() => {})
} else if (this.agreeOrList === '退回') {
console.log('this.dataForm.taskId', this.taskId)
const params = qs.stringify({
taskId: this.taskId,
comment: this.inputNo
})
this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) {
this.callbacks.taskHandleErrorCallback(res)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
if (this.callbacks.taskHandleSuccessCallback) {
this.callbacks.taskHandleSuccessCallback(res)
}
}
})
})
}
}, 1000, { leading: true, trailing: false })
} }
} }
</script> </script>
<style lang="scss"> <style scoped lang="scss">
.kuandukuandukuandu { .kuandukuandukuandu {
max-width: 1500px; max-width: 1500px;
} }
.wrapper { .wrapper {
} }
::v-deep .agreeOr > div {
display: flex;
align-items: center;
.el-input {
margin-right: 10px;
margin-left: 32px;
}
}
::v-deep .agreeOr > div:last-of-type {
margin-top: 15px;
}
.blueAll {
::v-deep .el-radio-button__inner {
width: 80px;
height: 32px;
line-height: 32px;
padding: 0;
border-radius: 2px;
background: #ffffff;
color: #0558e1;
border: 1px solid #0558e1;
}
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
box-shadow: unset !important;
background: #0558e1;
color: #ffffff;
}
}
.inputBule {
width: 55px;
height: 32px;
line-height: 32px;
padding: 0;
border-radius: 2px;
background: #0558e1;
color: #ffffff;
border: 1px solid #0558e1;
}
.redAll {
margin-left: 10px;
::v-deep .el-radio-button__inner {
width: 80px;
height: 32px;
line-height: 32px;
padding: 0;
border-radius: 2px;
border: 1px solid #e83a48;
background: #ffffff;
color: #e83a48;
margin-left: 10px;
}
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
box-shadow: unset !important;
color: #ffffff;
background: #e83a48;
}
}
.blueInput {
width: 55px;
}
</style> </style>