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:
commit
c61611e01e
|
@ -102,6 +102,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import qs from 'qs'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
|
@ -115,7 +117,9 @@ export default {
|
|||
data () {
|
||||
return {
|
||||
dataList: [],
|
||||
dataView: []
|
||||
dataView: [],
|
||||
// 归属部门
|
||||
unit: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -133,11 +137,17 @@ export default {
|
|||
console.log(this.dataView)
|
||||
console.log(this.dataForm)
|
||||
// 应用描述
|
||||
this.dataView.children[0].children[0].children[4].note1 =
|
||||
this.dataForm.description
|
||||
// this.dataView.children[0].children[0].children[4].note1 =
|
||||
// this.dataForm.description
|
||||
// 应用名称
|
||||
this.dataView.children[0].children[0].children[0].note1 =
|
||||
this.dataForm.name
|
||||
// this.dataView.children[0].children[0].children[0].note1 =
|
||||
// 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.dataView.children.map((itemView, indexView) => {
|
||||
// console.log('itemView', itemView)
|
||||
|
@ -153,22 +163,22 @@ export default {
|
|||
this.dataView.children[indexView].children[0].children[
|
||||
indexSon
|
||||
].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) {
|
||||
this.dataView.children[indexView].children[0].children[
|
||||
indexSon
|
||||
].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) {
|
||||
if (itemSon.type !== ' multipleAdditions') {
|
||||
this.dataView.children[indexView].children[
|
||||
|
@ -233,7 +243,7 @@ export default {
|
|||
} else if (itemSon.name.indexOf('属部门') != -1) {
|
||||
this.dataView.children[indexView].children[0].children[
|
||||
indexSon
|
||||
].note1 = this.dataForm.deptId
|
||||
].note1 = this.unit
|
||||
} else if (itemSon.name.indexOf('部门联系人电话') != -1) {
|
||||
this.dataView.children[indexView].children[0].children[
|
||||
indexSon
|
||||
|
@ -285,10 +295,21 @@ export default {
|
|||
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 () {},
|
||||
mounted () {}
|
||||
mounted () {
|
||||
this.deptName()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -28,13 +28,26 @@
|
|||
</el-form>
|
||||
</div>
|
||||
<!-- 流程综合组件 -->
|
||||
<ren-process-multiple
|
||||
<!-- <ren-process-multiple
|
||||
v-if="processVisible"
|
||||
updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId"
|
||||
saveFormUrl="/processForm/tabilityapplication"
|
||||
dataFormName="dataForm"
|
||||
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>
|
||||
</template>
|
||||
|
||||
|
@ -42,9 +55,12 @@
|
|||
import processModule from '@/mixins/process-module'
|
||||
import Applicationresources from './Application-resources.vue'
|
||||
import ResourcesAndServices from './ResourcesAndServices.vue'
|
||||
import debounce from 'lodash/debounce'
|
||||
import qs from 'qs'
|
||||
|
||||
export default {
|
||||
// 注入公共方法
|
||||
mixins: [processModule],
|
||||
// mixins: [processModule],
|
||||
components: {
|
||||
Applicationresources,
|
||||
ResourcesAndServices
|
||||
|
@ -70,10 +86,38 @@ export default {
|
|||
coverageNotShow: true,
|
||||
nameNotShow: false,
|
||||
algorithmShow: true,
|
||||
insertList: []
|
||||
insertList: [],
|
||||
inputAgree: '',
|
||||
inputNo: '',
|
||||
agreeOrList: '同意',
|
||||
taskId: ''
|
||||
}
|
||||
},
|
||||
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: {},
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
|
@ -101,35 +145,131 @@ export default {
|
|||
console.log('id', this.$router.currentRoute.params.businessKey)
|
||||
// }
|
||||
})
|
||||
}
|
||||
},
|
||||
created () {
|
||||
// this.dataForm = this.$router.currentRoute.params.id
|
||||
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
|
||||
agreeOrNot: debounce(function () {
|
||||
if (this.agreeOrList === '同意') {
|
||||
console.log('this.dataForm.taskId', this.taskId)
|
||||
const params = qs.stringify({
|
||||
taskId: this.taskId,
|
||||
comment: this.inputAgree
|
||||
})
|
||||
console.log(params)
|
||||
this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.$message.error(res.msg)
|
||||
if (this.callbacks.taskHandleErrorCallback) {
|
||||
this.callbacks.taskHandleErrorCallback(res)
|
||||
}
|
||||
// 初始化综合组件
|
||||
this.initProcessMultiple(callbacks)
|
||||
},
|
||||
mounted () {
|
||||
const businessKey = this.$router.currentRoute.params.businessKey
|
||||
this.getInfo(businessKey)
|
||||
this.methodsThree()
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
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>
|
||||
<style lang="scss">
|
||||
<style scoped lang="scss">
|
||||
.kuandukuandukuandu {
|
||||
max-width: 1500px;
|
||||
}
|
||||
.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>
|
||||
|
|
Loading…
Reference in New Issue