Merge branch 'hi-ucs-dev' of http://192.168.124.50:3000/wuhongjian/hi-ucs into hi-ucs-dev
This commit is contained in:
commit
1a96e4e6a2
|
@ -9,13 +9,14 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
|
||||||
<el-button type="primary" @click="entrustTask()">{{ $t('confirm') }}</el-button>
|
<el-button type="primary" @click="entrustTask($store.state.contentTabsActiveName)">{{ $t('confirm') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
<select-user v-if="selectUserVisible" ref="selectUser" ></select-user>
|
<select-user v-if="selectUserVisible" ref="selectUser" ></select-user>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import bus from '@/views/bus.js'
|
||||||
import SelectUser from './select-user'
|
import SelectUser from './select-user'
|
||||||
import qs from 'qs'
|
import qs from 'qs'
|
||||||
export default {
|
export default {
|
||||||
|
@ -52,11 +53,11 @@ export default {
|
||||||
init () {
|
init () {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['dataForm'].resetFields()
|
this.$refs.dataForm.resetFields()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 委托
|
// 委托
|
||||||
entrustTask () {
|
entrustTask (data) {
|
||||||
if (!this.dataForm.entrustUserId) {
|
if (!this.dataForm.entrustUserId) {
|
||||||
this.$message.error(this.$t('process.entrustError'))
|
this.$message.error(this.$t('process.entrustError'))
|
||||||
return
|
return
|
||||||
|
@ -65,9 +66,11 @@ export default {
|
||||||
taskId: this.dataForm.taskId,
|
taskId: this.dataForm.taskId,
|
||||||
assignee: this.dataForm.entrustUserId
|
assignee: this.dataForm.entrustUserId
|
||||||
})
|
})
|
||||||
this.$http['post']('/act/task/entrust', task).then(({ data: res }) => {
|
this.$http.post('/act/task/entrust', task).then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
this.$message.error(res.msg)
|
this.$message.error(res.msg)
|
||||||
|
this.tabRemoveHandle(data)
|
||||||
|
bus.$emit('updateTaskNum')
|
||||||
if (this.callbacks.taskHandleErrorCallback) {
|
if (this.callbacks.taskHandleErrorCallback) {
|
||||||
this.callbacks.taskHandleErrorCallback(res)
|
this.callbacks.taskHandleErrorCallback(res)
|
||||||
}
|
}
|
||||||
|
@ -79,6 +82,8 @@ export default {
|
||||||
duration: 500,
|
duration: 500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
this.tabRemoveHandle(data)
|
||||||
|
bus.$emit('updateTaskNum')
|
||||||
if (this.callbacks.taskHandleSuccessCallback) {
|
if (this.callbacks.taskHandleSuccessCallback) {
|
||||||
this.callbacks.taskHandleSuccessCallback(res)
|
this.callbacks.taskHandleSuccessCallback(res)
|
||||||
}
|
}
|
||||||
|
@ -93,6 +98,33 @@ export default {
|
||||||
this.$refs.selectUser.init(this.setUserInfo)
|
this.$refs.selectUser.init(this.setUserInfo)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
tabRemoveHandle (tabName) {
|
||||||
|
console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
|
||||||
|
if (tabName === 'home') {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
|
||||||
|
(item) => item.name !== tabName
|
||||||
|
)
|
||||||
|
if (this.$store.state.contentTabs.length <= 0) {
|
||||||
|
this.$store.state.sidebarMenuActiveName =
|
||||||
|
this.$store.state.contentTabsActiveName = 'home'
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// 当前选中tab被删除
|
||||||
|
if (tabName === this.$store.state.contentTabsActiveName) {
|
||||||
|
const tab =
|
||||||
|
this.$store.state.contentTabs[
|
||||||
|
this.$store.state.contentTabs.length - 1
|
||||||
|
]
|
||||||
|
this.$router.push({
|
||||||
|
name: /^iframe_.+/.test(tab.name) ? 'iframe' : tab.name,
|
||||||
|
params: { ...tab.params },
|
||||||
|
query: { ...tab.query }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
setUserInfo (userInfo) {
|
setUserInfo (userInfo) {
|
||||||
this.dataForm.entrustUserId = userInfo.id
|
this.dataForm.entrustUserId = userInfo.id
|
||||||
this.dataForm.entrustUserName = userInfo.realName
|
this.dataForm.entrustUserName = userInfo.realName
|
||||||
|
|
|
@ -354,10 +354,10 @@ export default {
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.$http.get('/sys/dept/all').then(res => {
|
this.$http.get('/sys/dept/all').then(res => {
|
||||||
console.log('获取部门=========>', res)
|
// console.log('获取部门=========>', res)
|
||||||
this.departmentSelects = []
|
this.departmentSelects = []
|
||||||
res.data.data.map(val => {
|
res.data.data.map(val => {
|
||||||
this.departmentSelects.push({ label: val.name, value: val.name })
|
this.departmentSelects.push({ label: val.name, value: val.id })
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// 当前设定的日期时间
|
// 当前设定的日期时间
|
||||||
|
|
|
@ -74,31 +74,31 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data () {
|
||||||
return {
|
return {
|
||||||
// 详情信息
|
// 详情信息
|
||||||
detailInfo: {},
|
detailInfo: {},
|
||||||
dataList: [],
|
dataList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.detailInfo = this.$route.params.params || {};
|
this.detailInfo = this.$route.params.params || {}
|
||||||
console.log('this.detailInfo------------>', this.detailInfo);
|
console.log('this.detailInfo------------>', this.detailInfo)
|
||||||
// 表格数据
|
// 表格数据
|
||||||
let durationInSeconds = ''
|
let durationInSeconds = ''
|
||||||
if (this.detailInfo.auditTime && this.detailInfo.auditTime) {
|
if (this.detailInfo.auditTime && this.detailInfo.auditTime) {
|
||||||
durationInSeconds = moment(this.detailInfo.auditTime).diff(moment(this.detailInfo.createDate), 'seconds')
|
durationInSeconds = moment(this.detailInfo.auditTime).diff(moment(this.detailInfo.createDate), 'seconds')
|
||||||
}
|
}
|
||||||
let _obj = {
|
const _obj = {
|
||||||
activityName: this.detailInfo.title || '',
|
activityName: this.detailInfo.title || '',
|
||||||
assigneeName: this.detailInfo.auditorName || '',
|
assigneeName: this.detailInfo.auditorName || '',
|
||||||
startTime: this.detailInfo.createDate || '',
|
startTime: this.detailInfo.createDate || '',
|
||||||
endTime: this.detailInfo.auditTime,
|
endTime: this.detailInfo.auditTime,
|
||||||
comment: this.detailInfo.auditViem,
|
comment: this.detailInfo.auditViem,
|
||||||
durationInSeconds: durationInSeconds,
|
durationInSeconds: durationInSeconds
|
||||||
}
|
}
|
||||||
this.dataList.push(_obj)
|
this.dataList.push(_obj)
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .agreeOr>div {
|
::v-deep .agreeOr > div {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .agreeOr>div:last-of-type {
|
::v-deep .agreeOr > div:last-of-type {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@ export default {
|
||||||
border: 1px solid #0558e1;
|
border: 1px solid #0558e1;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-radio-button__orig-radio:checked+.el-radio-button__inner {
|
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
|
||||||
box-shadow: unset !important;
|
box-shadow: unset !important;
|
||||||
background: #0558e1;
|
background: #0558e1;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
@ -301,7 +301,7 @@ export default {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-radio-button__orig-radio:checked+.el-radio-button__inner {
|
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
|
||||||
box-shadow: unset !important;
|
box-shadow: unset !important;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background: #e83a48;
|
background: #e83a48;
|
||||||
|
@ -316,4 +316,3 @@ export default {
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: hisense.liangjunhua
|
* @Author: hisense.liangjunhua
|
||||||
* @Date: 2022-06-29 15:59:51
|
* @Date: 2022-06-29 15:59:51
|
||||||
* @LastEditors: hisense.wuhongjian
|
* @LastEditors: hisense.wuhongjian
|
||||||
* @LastEditTime: 2022-10-19 11:18:43
|
* @LastEditTime: 2022-10-20 16:16:16
|
||||||
* @Description: 告诉大家这是什么
|
* @Description: 告诉大家这是什么
|
||||||
-->
|
-->
|
||||||
<!-- 流程业务表单 -->
|
<!-- 流程业务表单 -->
|
||||||
|
@ -93,6 +93,8 @@
|
||||||
<el-radio-button label="同意" class="blueAll" @click="showDialog('同意')">同意</el-radio-button>
|
<el-radio-button label="同意" class="blueAll" @click="showDialog('同意')">同意</el-radio-button>
|
||||||
<el-radio-button label="退回" class="redAll" @click="showDialog('退回')">退回</el-radio-button>
|
<el-radio-button label="退回" class="redAll" @click="showDialog('退回')">退回</el-radio-button>
|
||||||
</el-radio-group> -->
|
</el-radio-group> -->
|
||||||
|
<!-- 委托 -->
|
||||||
|
<el-button type="info" @click="entrustTask()" v-if='taskEntrustFlag'>{{ $t('process.entrustTask') }}</el-button>
|
||||||
<el-button type="primary" @click="showDialog('同意')">同意</el-button>
|
<el-button type="primary" @click="showDialog('同意')">同意</el-button>
|
||||||
<el-button type="danger" plain @click="showDialog('驳回')">驳回</el-button>
|
<el-button type="danger" plain @click="showDialog('驳回')">驳回</el-button>
|
||||||
<!-- <el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input>
|
<!-- <el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input>
|
||||||
|
@ -101,6 +103,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<ren-task-entrust v-if="renTaskEntrustVisible" ref="renTaskEntrust"></ren-task-entrust>
|
||||||
<!-- 流程详情 -->
|
<!-- 流程详情 -->
|
||||||
<ren-process-detail></ren-process-detail>
|
<ren-process-detail></ren-process-detail>
|
||||||
<el-dialog title="审批意见" :close-on-click-modal="false" :visible.sync="dialogVisible" width="30%"
|
<el-dialog title="审批意见" :close-on-click-modal="false" :visible.sync="dialogVisible" width="30%"
|
||||||
|
@ -116,6 +119,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 引入工作流公共方法
|
// 引入工作流公共方法
|
||||||
|
import RenTaskEntrust from '@/components/ren-process-running/src/ren-task-entrust'
|
||||||
import processModule from '@/mixins/process-module'
|
import processModule from '@/mixins/process-module'
|
||||||
// import mixinViewModule from '@/mixins/view-module'
|
// import mixinViewModule from '@/mixins/view-module'
|
||||||
import debounce from 'lodash/debounce'
|
import debounce from 'lodash/debounce'
|
||||||
|
@ -127,7 +131,9 @@ export default {
|
||||||
mixins: [processModule],
|
mixins: [processModule],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
taskEntrustFlag: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
renTaskEntrustVisible: false,
|
||||||
dialogType: '',
|
dialogType: '',
|
||||||
input: '',
|
input: '',
|
||||||
visible: true,
|
visible: true,
|
||||||
|
@ -155,6 +161,16 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
// 获取角色信息
|
||||||
|
this.$http.get('/sys/user/info').then(({ data: res }) => {
|
||||||
|
res.data.roleIdList.map(val => {
|
||||||
|
this.$http.get('/sys/role/' + val).then(role => {
|
||||||
|
if (role.data.data.name === '流程管理员') {
|
||||||
|
this.taskEntrustFlag = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
// 将业务KEY赋值给表单
|
// 将业务KEY赋值给表单
|
||||||
console.log('params=================>', this.$route, this.$route.params)
|
console.log('params=================>', this.$route, this.$route.params)
|
||||||
this.dataForm.taskId = this.$route.params.taskId
|
this.dataForm.taskId = this.$route.params.taskId
|
||||||
|
@ -185,7 +201,8 @@ export default {
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
RenProcessDetail
|
RenProcessDetail,
|
||||||
|
RenTaskEntrust
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init () {
|
init () {
|
||||||
|
@ -200,6 +217,14 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
entrustTask () {
|
||||||
|
this.renTaskEntrustVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.renTaskEntrust.dataForm.taskId = this.dataForm.taskId
|
||||||
|
this.$refs.renTaskEntrust.callbacks = this.callbacks
|
||||||
|
this.$refs.renTaskEntrust.init()
|
||||||
|
})
|
||||||
|
},
|
||||||
showDialog (title) {
|
showDialog (title) {
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
this.dialogType = title
|
this.dialogType = title
|
||||||
|
@ -618,7 +643,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .agreeOr>div {
|
::v-deep .agreeOr > div {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
@ -628,7 +653,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .agreeOr>div:last-of-type {
|
::v-deep .agreeOr > div:last-of-type {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -644,7 +669,7 @@ export default {
|
||||||
border: 1px solid #0558e1;
|
border: 1px solid #0558e1;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-radio-button__orig-radio:checked+.el-radio-button__inner {
|
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
|
||||||
box-shadow: unset !important;
|
box-shadow: unset !important;
|
||||||
background: #0558e1;
|
background: #0558e1;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
@ -677,7 +702,7 @@ export default {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-radio-button__orig-radio:checked+.el-radio-button__inner {
|
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
|
||||||
box-shadow: unset !important;
|
box-shadow: unset !important;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background: #e83a48;
|
background: #e83a48;
|
||||||
|
|
|
@ -75,15 +75,10 @@ const params = {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
}
|
}
|
||||||
infrastructureInfo().then((res) => {
|
infrastructureInfo().then((res) => {
|
||||||
console.log('基础设施==================>', res.data.data)
|
console.log('基础设施======云图============>', res.data.data)
|
||||||
myDataList.value.forEach((val) => {
|
myDataList.value.forEach((val) => {
|
||||||
const obj = res.data.data.filter((item) => item.type === val.title)[0]
|
const obj = res.data.data.filter((item) => item.type === val.title)[0]
|
||||||
if (obj) {
|
if (obj) {
|
||||||
if (obj.type == '视频资源数量') {
|
|
||||||
if (uavAndIndividualSoldier.num) {
|
|
||||||
obj.amount = obj.amount - 0 + uavAndIndividualSoldier.num
|
|
||||||
}
|
|
||||||
}
|
|
||||||
val.snum = obj.amount
|
val.snum = obj.amount
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue