Commit 6d618a4d authored by xioln's avatar xioln

返回方式修改、行动项附件查看

parent b5cd5623
const LOCALHOST = `${window.location.origin.split(':')[0]}:${window.location.origin.split(':')[1]}:`
// 开发环境 // 开发环境
// const VUE_APP_BASE_API = 'http://119.91.70.186:9002' // eslint-disable-line // const PORT = '9002'
// 测试环境 // 测试环境
const VUE_APP_BASE_API = 'http://218.75.209.68:9002' // eslint-disable-line // const PORT = '9002'
// 生产环境 // 生产环境
const PORT = '9351'
// const VUE_APP_BASE_API = LOCALHOST + PORT // eslint-disable-line
// 开发环境
const VUE_APP_BASE_API = 'http://192.168.1.133:9002' // eslint-disable-line
// 测试环境
// const VUE_APP_BASE_API = 'http://218.75.209.68:9002' // eslint-disable-line
// 生产外网环境
// const VUE_APP_BASE_API = 'http://218.75.209.68:9351' // eslint-disable-line // const VUE_APP_BASE_API = 'http://218.75.209.68:9351' // eslint-disable-line
// 生产环境
// const VUE_APP_BASE_API = LOCALHOST +'9351' // eslint-disable-line
// 本地 // 本地
// const SUPPLIER_BASE_IP = 'localhost/#/home' // eslint-disable-line // const SUPPLIER_BASE_IP = 'localhost/#/home' // eslint-disable-line
// const GACE_BASE_IP = 'http://192.168.31.30:9303/#/home' // eslint-disable-line // const GACE_BASE_IP = 'http://192.168.31.30:9303/#/home' // eslint-disable-line
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
}, },
methods: { methods: {
onClickLeft () { onClickLeft () {
this.$router.go(-1) this.$router.back()
} }
} }
} }
......
...@@ -247,7 +247,7 @@ export default { ...@@ -247,7 +247,7 @@ export default {
this.$refs.pdf.print(100, [1, 2]) this.$refs.pdf.print(100, [1, 2])
}, },
onClickLeft () { onClickLeft () {
this.$router.go(-1) this.$router.back()
} }
} }
} }
......
...@@ -479,4 +479,28 @@ export function guid () { ...@@ -479,4 +479,28 @@ export function guid () {
return v.toString(16) return v.toString(16)
}) })
} }
export default { getCookie, showMessage, guid }
export function formatGMK(size) {
if (size === 0) {
return 0
}
if (!size) {
return ''
}
if (size.includes('b') || size.includes('B')) {
return size
}
const num = parseInt(size)
if (num > 0.9 * 1024 * 1024 * 1024) {
return parseFloat(num / (1024 * 1024 * 1024)).toFixed(2) + 'GB'
}
if (num > 0.9 * 1024 * 1024) {
return parseFloat(num / (1024 * 1024)).toFixed(2) + 'MB'
}
if (num > 0.9 * 1024) {
return parseFloat(num / 1024).toFixed(2) + 'KB'
}
return num
}
export default { getCookie, showMessage, guid, formatGMK }
<template>
<div class="action-attachment">
<table-cell
ref="tableCell"
:tableData="tableData"
:tableColumns="columns"
></table-cell>
<van-loading v-if="!tableData" type="spinner" size="24px" vertical />
<van-empty v-if="tableData.length === 0" description="数据为空" />
</div>
</template>
<script>
import TableCell from '@/components/tableCell'
export default {
props: {
basicData: {
type: Object,
default: () => { }
}
},
components: { TableCell },
data () {
return {
columns: [
{
title: '文件名',
key: 'originalFileName'
},
{
title: '文件大小',
key: 'fileSize'
},
{
title: '扩展名',
key: 'fileExtension'
},
{
title: '创建者',
key: 'creator.userName'
}
],
allTableData: {},
activeNames: [],
tableData: []
}
},
watch: {
'basicData.objFileLinks': {
deep: true,
handler: function (val) {
if (val.length > 0) {
this.tableData = val.map(item => {
item.target.fileSize = this.$utils.formatGMK(item.target.fileSize)
return item.target
})
}
},
immediate: true
}
},
created () {
},
mounted () {
},
computed: {},
methods: {
}
}
</script>
<style lang="scss" scoped>
.action-attachment {
padding: 10px;
}
</style>
...@@ -33,6 +33,9 @@ ...@@ -33,6 +33,9 @@
<div v-if="activeTab === 'extMaterialBillTab'"> <div v-if="activeTab === 'extMaterialBillTab'">
<ExtMaterialBillTab :basicData="form" /> <ExtMaterialBillTab :basicData="form" />
</div> </div>
<div v-if="activeTab === 'actionAttachment'">
<ActionAttachment :basicData="form" />
</div>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
...@@ -46,6 +49,7 @@ import EcrTab from './components/ecrTab' ...@@ -46,6 +49,7 @@ import EcrTab from './components/ecrTab'
import DxBaseTab from './components/dxBaseTab' import DxBaseTab from './components/dxBaseTab'
import DxPartTab from './components/dxPartTab' import DxPartTab from './components/dxPartTab'
import ExtMaterialBillTab from './components/extMaterialBillTab' import ExtMaterialBillTab from './components/extMaterialBillTab'
import ActionAttachment from './components/actionAttachment'
import { getInstancePbo, getLayOut } from '@/api/taskDetail' import { getInstancePbo, getLayOut } from '@/api/taskDetail'
import DeeForm from '@/components/form/form' import DeeForm from '@/components/form/form'
...@@ -58,7 +62,8 @@ export default { ...@@ -58,7 +62,8 @@ export default {
EcrTab, EcrTab,
DxBaseTab, DxBaseTab,
DxPartTab, DxPartTab,
ExtMaterialBillTab ExtMaterialBillTab,
ActionAttachment
}, },
data () { data () {
return { return {
...@@ -141,7 +146,8 @@ export default { ...@@ -141,7 +146,8 @@ export default {
} else if (['ExtActionInfo'].includes(this.$route.query.dxClassname)) { } else if (['ExtActionInfo'].includes(this.$route.query.dxClassname)) {
this.tabs = [ this.tabs = [
{ title: '基本信息', key: 'baseInfo' }, { title: '基本信息', key: 'baseInfo' },
{ title: '行动项条目', key: 'ActionItem' } { title: '行动项条目', key: 'ActionItem' },
{ title: '附件', key: 'actionAttachment' }
] ]
this.activeTab = 'baseInfo' this.activeTab = 'baseInfo'
await this.getFormData() await this.getFormData()
......
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
}, },
handleFinish (params, callback, errCallBack) { handleFinish (params, callback, errCallBack) {
completeTask(params).then(res => { completeTask(params).then(res => {
this.$router.go(-1) this.$router.back()
}).catch(res => { }).catch(res => {
if (errCallBack instanceof Function) errCallBack(res) if (errCallBack instanceof Function) errCallBack(res)
}) })
......
...@@ -309,7 +309,7 @@ export default { ...@@ -309,7 +309,7 @@ export default {
onOpened: () => { onOpened: () => {
// sessionStorage.setItem('finishWork', true) // sessionStorage.setItem('finishWork', true)
this.$refs.taskBtnRef.comLoading = false this.$refs.taskBtnRef.comLoading = false
this.$router.go(-1) this.$router.back()
// if (this.todoListTitle.includes('待办')) { // if (this.todoListTitle.includes('待办')) {
// this.$router.push({ // this.$router.push({
// path: '/todoList?title=待办任务' // path: '/todoList?title=待办任务'
......
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
}, },
created() { created() {
if (this.$route.query.empty === 2) { if (this.$route.query.empty === 2) {
this.$router.go(-1) this.$router.back()
} else { } else {
this.$router.push({ this.$router.push({
path: this.$route.query.path, path: this.$route.query.path,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment