Merge branch 'hi-ucs-dev' of http://192.168.124.50:80/wuhongjian/hi-ucs into hi-ucs-dev
This commit is contained in:
commit
30a8641929
|
@ -9,13 +9,14 @@
|
|||
</el-form>
|
||||
<template slot="footer">
|
||||
<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>
|
||||
<select-user v-if="selectUserVisible" ref="selectUser" ></select-user>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bus from '@/views/bus.js'
|
||||
import SelectUser from './select-user'
|
||||
import qs from 'qs'
|
||||
export default {
|
||||
|
@ -52,11 +53,11 @@ export default {
|
|||
init () {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
this.$refs.dataForm.resetFields()
|
||||
})
|
||||
},
|
||||
// 委托
|
||||
entrustTask () {
|
||||
entrustTask (data) {
|
||||
if (!this.dataForm.entrustUserId) {
|
||||
this.$message.error(this.$t('process.entrustError'))
|
||||
return
|
||||
|
@ -65,9 +66,11 @@ export default {
|
|||
taskId: this.dataForm.taskId,
|
||||
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) {
|
||||
this.$message.error(res.msg)
|
||||
this.tabRemoveHandle(data)
|
||||
bus.$emit('updateTaskNum')
|
||||
if (this.callbacks.taskHandleErrorCallback) {
|
||||
this.callbacks.taskHandleErrorCallback(res)
|
||||
}
|
||||
|
@ -79,6 +82,8 @@ export default {
|
|||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.tabRemoveHandle(data)
|
||||
bus.$emit('updateTaskNum')
|
||||
if (this.callbacks.taskHandleSuccessCallback) {
|
||||
this.callbacks.taskHandleSuccessCallback(res)
|
||||
}
|
||||
|
@ -93,6 +98,33 @@ export default {
|
|||
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) {
|
||||
this.dataForm.entrustUserId = userInfo.id
|
||||
this.dataForm.entrustUserName = userInfo.realName
|
||||
|
|
|
@ -105,6 +105,7 @@ router.beforeEach((to, from, next) => {
|
|||
return next({ name: 'login' })
|
||||
}
|
||||
window.SITE_CONFIG.menuList = res.data.filter(item => item.site === 0)
|
||||
debugger
|
||||
fnAddDynamicMenuRoutes(window.SITE_CONFIG.menuList)
|
||||
next({ ...to, replace: true })
|
||||
}).catch(() => {
|
||||
|
@ -137,6 +138,7 @@ function fnCurrentRouteIsPageRoute (route, pageRoutes = []) {
|
|||
*/
|
||||
function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
|
||||
var temp = []
|
||||
debugger
|
||||
for (var i = 0; i < menuList.length; i++) {
|
||||
if (menuList[i].children && menuList[i].children.length >= 1) {
|
||||
temp = temp.concat(menuList[i].children)
|
||||
|
@ -187,6 +189,7 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
|
|||
},
|
||||
{ path: '*', redirect: { name: '404' } }
|
||||
])
|
||||
console.log('查询路由', routes)
|
||||
window.SITE_CONFIG.dynamicMenuRoutes = routes
|
||||
window.SITE_CONFIG.dynamicMenuRoutesHasAdded = true
|
||||
}
|
||||
|
|
|
@ -355,7 +355,7 @@ export default {
|
|||
},
|
||||
created () {
|
||||
this.$http.get('/sys/dept/all').then(res => {
|
||||
console.log('获取部门=========>', res)
|
||||
// console.log('获取部门=========>', res)
|
||||
this.departmentSelects = []
|
||||
res.data.data.map(val => {
|
||||
this.departmentSelects.push({ label: val.name, value: val.id })
|
||||
|
|
|
@ -74,31 +74,31 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import * as moment from 'moment';
|
||||
import * as moment from 'moment'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
// 详情信息
|
||||
detailInfo: {},
|
||||
dataList: [],
|
||||
dataList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.detailInfo = this.$route.params.params || {};
|
||||
console.log('this.detailInfo------------>', this.detailInfo);
|
||||
created () {
|
||||
this.detailInfo = this.$route.params.params || {}
|
||||
console.log('this.detailInfo------------>', this.detailInfo)
|
||||
// 表格数据
|
||||
let durationInSeconds = ''
|
||||
if (this.detailInfo.auditTime && this.detailInfo.auditTime) {
|
||||
durationInSeconds = moment(this.detailInfo.auditTime).diff(moment(this.detailInfo.createDate), 'seconds')
|
||||
}
|
||||
let _obj = {
|
||||
const _obj = {
|
||||
activityName: this.detailInfo.title || '',
|
||||
assigneeName: this.detailInfo.auditorName || '',
|
||||
startTime: this.detailInfo.createDate || '',
|
||||
endTime: this.detailInfo.auditTime,
|
||||
comment: this.detailInfo.auditViem,
|
||||
durationInSeconds: durationInSeconds,
|
||||
durationInSeconds: durationInSeconds
|
||||
}
|
||||
this.dataList.push(_obj)
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
::v-deep .agreeOr>div {
|
||||
::v-deep .agreeOr > div {
|
||||
display: flex;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ export default {
|
|||
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;
|
||||
background: #0558e1;
|
||||
color: #ffffff;
|
||||
|
@ -301,7 +301,7 @@ export default {
|
|||
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;
|
||||
color: #ffffff;
|
||||
background: #e83a48;
|
||||
|
@ -316,4 +316,3 @@ export default {
|
|||
padding-right: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
<!--
|
||||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-06-27 11:27:22
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-08-23 10:37:29
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-10-19 11:10:50
|
||||
* @Description: 能力申请
|
||||
-->
|
||||
<template>
|
||||
|
@ -168,7 +168,7 @@ export default {
|
|||
created () {
|
||||
bus.$off('competencyApplicationInit')
|
||||
bus.$on('competencyApplicationInit', () => {
|
||||
this.getDataList();
|
||||
this.getDataList()
|
||||
bus.$emit('updateTaskNum')
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<!--
|
||||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-06-29 15:59:51
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-08-04 14:34:45
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-10-20 16:16:16
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<!-- 流程业务表单 -->
|
||||
|
@ -93,6 +93,8 @@
|
|||
<el-radio-button label="同意" class="blueAll" @click="showDialog('同意')">同意</el-radio-button>
|
||||
<el-radio-button label="退回" class="redAll" @click="showDialog('退回')">退回</el-radio-button>
|
||||
</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="danger" plain @click="showDialog('驳回')">驳回</el-button>
|
||||
<!-- <el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input>
|
||||
|
@ -101,6 +103,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<ren-task-entrust v-if="renTaskEntrustVisible" ref="renTaskEntrust"></ren-task-entrust>
|
||||
<!-- 流程详情 -->
|
||||
<ren-process-detail></ren-process-detail>
|
||||
<el-dialog title="审批意见" :close-on-click-modal="false" :visible.sync="dialogVisible" width="30%"
|
||||
|
@ -116,6 +119,7 @@
|
|||
|
||||
<script>
|
||||
// 引入工作流公共方法
|
||||
import RenTaskEntrust from '@/components/ren-process-running/src/ren-task-entrust'
|
||||
import processModule from '@/mixins/process-module'
|
||||
// import mixinViewModule from '@/mixins/view-module'
|
||||
import debounce from 'lodash/debounce'
|
||||
|
@ -125,9 +129,11 @@ import bus from '@/views/bus.js'
|
|||
export default {
|
||||
// 注入公共方法
|
||||
mixins: [processModule],
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
taskEntrustFlag: false,
|
||||
dialogVisible: false,
|
||||
renTaskEntrustVisible: false,
|
||||
dialogType: '',
|
||||
input: '',
|
||||
visible: true,
|
||||
|
@ -154,7 +160,17 @@ export default {
|
|||
agreeOrList: '同意'
|
||||
}
|
||||
},
|
||||
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赋值给表单
|
||||
console.log('params=================>', this.$route, this.$route.params)
|
||||
this.dataForm.taskId = this.$route.params.taskId
|
||||
|
@ -185,10 +201,11 @@ export default {
|
|||
// }
|
||||
},
|
||||
components: {
|
||||
RenProcessDetail
|
||||
RenProcessDetail,
|
||||
RenTaskEntrust
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
init () {
|
||||
// this.visible = true
|
||||
this.$nextTick(() => {
|
||||
// this.$refs.dataForm.resetFields()
|
||||
|
@ -200,11 +217,19 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
showDialog(title) {
|
||||
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) {
|
||||
this.dialogVisible = true
|
||||
this.dialogType = title
|
||||
},
|
||||
handleClose(done) {
|
||||
handleClose (done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then((_) => {
|
||||
this.input = ''
|
||||
|
@ -212,11 +237,11 @@ export default {
|
|||
})
|
||||
.catch((_) => { })
|
||||
},
|
||||
handleClose2() {
|
||||
handleClose2 () {
|
||||
this.dialogVisible = false
|
||||
this.input = ''
|
||||
},
|
||||
downloadFile2(url) {
|
||||
downloadFile2 (url) {
|
||||
console.log(window.SITE_CONFIG.previewUrl)
|
||||
window.open(
|
||||
window.SITE_CONFIG.previewUrl +
|
||||
|
@ -225,7 +250,7 @@ export default {
|
|||
)
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
getInfo () {
|
||||
let params = ''
|
||||
if (this.dataForm.taskId) {
|
||||
params = `taskId=${this.dataForm.taskId}`
|
||||
|
@ -344,7 +369,7 @@ export default {
|
|||
}
|
||||
},
|
||||
// 申请能力
|
||||
applyData() {
|
||||
applyData () {
|
||||
this.$http
|
||||
.get(`/resource/select/${this.dataForm.instanceId}`)
|
||||
.then(({ data: res }) => {
|
||||
|
@ -436,7 +461,7 @@ export default {
|
|||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
tabRemoveHandle(tabName) {
|
||||
tabRemoveHandle (tabName) {
|
||||
console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
|
||||
if (tabName === 'home') {
|
||||
return false
|
||||
|
@ -463,19 +488,19 @@ export default {
|
|||
}
|
||||
},
|
||||
// 启动流程出错回调
|
||||
startProcessErrorCallback(data) {
|
||||
startProcessErrorCallback (data) {
|
||||
console.log(data)
|
||||
},
|
||||
// 任务处理出错回调
|
||||
taskHandleErrorCallback(data) { },
|
||||
download(data) {
|
||||
taskHandleErrorCallback (data) { },
|
||||
download (data) {
|
||||
const alink = document.createElement('a')
|
||||
alink.download = '附件' // 文件名,大部分浏览器兼容,IE10及以下不兼容
|
||||
alink.href = data.attachment // 创建 url地址
|
||||
alink.click() // 自动点击
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
mounted () {
|
||||
// this.applyData()
|
||||
}
|
||||
}
|
||||
|
@ -618,7 +643,7 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
::v-deep .agreeOr>div {
|
||||
::v-deep .agreeOr > div {
|
||||
display: flex;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -644,7 +669,7 @@ export default {
|
|||
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;
|
||||
background: #0558e1;
|
||||
color: #ffffff;
|
||||
|
@ -677,7 +702,7 @@ export default {
|
|||
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;
|
||||
color: #ffffff;
|
||||
background: #e83a48;
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
"body-parser": "^1.20.0",
|
||||
"chalk": "^4.1.1",
|
||||
"chokidar": "^3.5.2",
|
||||
"compression-webpack-plugin": "^6.1.1",
|
||||
"crypto-js": "^4.1.1",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-03-29 16:45:25
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-08-25 11:18:05
|
||||
* @LastEditTime: 2022-10-19 17:44:14
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
|
|
|
@ -75,15 +75,10 @@ const params = {
|
|||
pageSize: 10,
|
||||
}
|
||||
infrastructureInfo().then((res) => {
|
||||
console.log('基础设施==================>', res.data.data)
|
||||
console.log('基础设施======云图============>', res.data.data)
|
||||
myDataList.value.forEach((val) => {
|
||||
const obj = res.data.data.filter((item) => item.type === val.title)[0]
|
||||
if (obj) {
|
||||
if (obj.type == '视频资源数量') {
|
||||
if (uavAndIndividualSoldier.num) {
|
||||
obj.amount = obj.amount - 0 + uavAndIndividualSoldier.num
|
||||
}
|
||||
}
|
||||
val.snum = obj.amount
|
||||
}
|
||||
})
|
||||
|
|
|
@ -18,7 +18,19 @@ const {
|
|||
donation,
|
||||
} = require('./src/config')
|
||||
const { webpackBarName, webpackBanner, donationConsole } = require('vab-config')
|
||||
|
||||
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
||||
const productionGzipExtensions = [
|
||||
'js',
|
||||
'css',
|
||||
'html',
|
||||
'svg',
|
||||
'json',
|
||||
'txt',
|
||||
'ico',
|
||||
]
|
||||
// 是否开启gzip压缩
|
||||
const isPro = process.env.NODE_ENV === 'production'
|
||||
// const isPro = false
|
||||
if (donation) donationConsole()
|
||||
const { version, author } = require('./package.json')
|
||||
const Webpack = require('webpack')
|
||||
|
@ -92,7 +104,6 @@ module.exports = {
|
|||
chainWebpack(config) {
|
||||
config.resolve.symlinks(true)
|
||||
config.module.rule('svg').exclude.add(resolve('src/icon/remixIcon')).end()
|
||||
|
||||
config.module
|
||||
.rule('remixIcon')
|
||||
.test(/\.svg$/)
|
||||
|
@ -110,21 +121,21 @@ module.exports = {
|
|||
config.when(process.env.NODE_ENV !== 'development', (config) => {
|
||||
config.performance.set('hints', false)
|
||||
config.devtool('none')
|
||||
config.optimization.splitChunks({
|
||||
chunks: 'all',
|
||||
cacheGroups: {
|
||||
libs: {
|
||||
name: 'vue-admin-beautiful-libs',
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: 10,
|
||||
chunks: 'initial',
|
||||
},
|
||||
},
|
||||
})
|
||||
config
|
||||
.plugin('banner')
|
||||
.use(Webpack.BannerPlugin, [`${webpackBanner}${time}`])
|
||||
.end()
|
||||
// config.optimization.splitChunks({
|
||||
// chunks: 'all',
|
||||
// cacheGroups: {
|
||||
// libs: {
|
||||
// name: 'vue-admin-beautiful-libs',
|
||||
// test: /[\\/]node_modules[\\/]/,
|
||||
// priority: 10,
|
||||
// chunks: 'initial',
|
||||
// },
|
||||
// },
|
||||
// })
|
||||
// config
|
||||
// .plugin('banner')
|
||||
// .use(Webpack.BannerPlugin, [`${webpackBanner}${time}`])
|
||||
// .end()
|
||||
config.module
|
||||
.rule('images')
|
||||
.use('image-webpack-loader')
|
||||
|
@ -134,7 +145,19 @@ module.exports = {
|
|||
})
|
||||
.end()
|
||||
})
|
||||
|
||||
if (isPro) {
|
||||
// 生产环境下使用gzip 压缩
|
||||
config.plugin('compressionPlugin').use(
|
||||
new CompressionWebpackPlugin({
|
||||
// filename: '[path].gz[query]',
|
||||
algorithm: 'gzip',
|
||||
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
|
||||
threshold: 10240, // 只有大小大于该值的资源会被处理 10240
|
||||
minRatio: 0.8, // 只有压缩率小于这个值的资源才会被处理
|
||||
deleteOriginalAssets: false, // 删除原文件
|
||||
})
|
||||
)
|
||||
}
|
||||
if (build7z) {
|
||||
config.when(process.env.NODE_ENV === 'production', (config) => {
|
||||
config
|
||||
|
|
Loading…
Reference in New Issue