Commit 05c7a730 authored by xioln's avatar xioln

已办任务界面,缺少“已办”的标识,缺少实际处理结果。

已办任务界面,“审签历史”,没有任何信息。
parent 8db38893
This diff is collapsed.
// 开发环境 // 开发环境
const VUE_APP_BASE_API = 'http://119.91.70.186:9002' // eslint-disable-line // const VUE_APP_BASE_API = 'http://119.91.70.186: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
// 本地 // 本地
......
...@@ -19,9 +19,6 @@ ...@@ -19,9 +19,6 @@
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<script src="apiUrl.js"></script> <script src="apiUrl.js"></script>
<script src="newVisualizing/visualizing/BIM3DInterface.js"></script>
<script src="newVisualizing/visualizing/BIM3DViewer.js"></script>
<script src="newVisualizing/visualizing/lic.js"></script>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
......
// store.js
const state = {
// 需要隐藏的
TODOTITLE: [
// '数据发放任务',
// '更改贯彻监控任务',
// 'ICD签审任务',
// '资源库数据签审任务',
// '基线签审任务',
// // '技术文件传阅任务',
// '试验签审任务',
// '管理文件传阅任务'
],
// 需要展示的
TODOLIST: [
'实物部件',
'技术文件',
'技术协调单',
'设计技术文件更改通告',
'设计图档文件更改通告',
'装配方案',
'MBOM顶层更改包',
'A类工作包',
'B类工作包',
'PBOM顶层件',
'设计更改请求',
'设计更改通告',
'供应商更改单',
'管理体系文件'
]
}
export default {
namespaced: true,
state
}
/**
* @Description: 受影响数据
* @author xioln
* @date 2022-06-10
* @FilePath: src/views/BomTreeDetail/components/affectedData.vue
*/
<template>
<div class="affected-data">
<van-row>
<van-col
v-if="
Object.keys(affectedData).length !== 0 ||
Object.keys(affectedAIData).length !== 0
"
span="24"
class="van-col-class"
>
<van-cell
v-show="affectedData.length !== 0"
is-link
v-for="(item, i) in affectedData"
:key="i"
@click="cellClick(item)"
>
<template #title>
<van-col span="24">
<span class="van-col-span">编号</span>
<b>
{{ item.changeable.number }}
</b>
<div style="float: right">
<van-tag color="#1989fa" class="van-col-span-right">{{
item.state
}}</van-tag>
</div>
</van-col>
<van-col span="24">
<span class="van-col-span">名称</span>
<b>{{ item.changeable.name }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span">版本</span>
<b
><van-tag color="#1989fa" class="van-col-span-right">{{
item.version
}}</van-tag></b
>
</van-col>
<van-col span="24">
<span class="van-col-span">修改时间</span>
<b>{{ item.modifyTime }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span">修改者</span>
<b>{{ item.modifier }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span">备注</span>
<b>{{ item.comment }}</b>
</van-col>
</template>
<template #right-icon>
<van-icon name="arrow" class="search-icon center" />
</template>
</van-cell>
<van-cell
v-show="affectedAIData.length !== 0"
is-link
v-for="(item, i) in affectedAIData"
:key="i"
@click="cellClick(item)"
>
<template #title>
<van-col span="24">
<span class="van-col-span">编号</span>
<b>{{ item.label ? item.label : item.number.label }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span">名称</span>
<b>{{ item.name }}</b>
</van-col>
<van-col span="24">
<span class="van-col-span">版本</span>
<b
><van-tag color="#1989fa" class="van-col-span-right">{{
item.version
}}</van-tag></b
>
</van-col>
<van-col span="24">
<span class="van-col-span">设计者</span>
<b>{{ item.creator }}</b>
</van-col>
</template>
<template #right-icon>
<van-icon name="arrow" class="search-icon center" />
</template>
</van-cell>
</van-col>
<van-col v-else span="24" class="van-col-class">
<van-empty description="受影响数据为空" />
</van-col>
</van-row>
</div>
</template>
<script>
import moment from 'moment'
export default {
name: 'affectedData', // name写在组件的最前方,自定义组件为必填
props: {
affectedData: {
type: [Array, Object],
default: () => {
return {}
}
},
affectedAIData: {
type: [Array, Object],
default: () => {
return {}
}
}
},
data () {
return {}
},
watch: {
affectedAIData (v) {
console.log(v)
}
},
computed: {},
created () {},
methods: {
cellClick (item) {
const id = item?.number?.oid ?? item.changeable.id
const dxClassName = item?.changeable?.dxClassname
const subTypeName = item?.changeable?.subTypeName
this.$router.push({
path: `/bomTreeDetail-${id}`,
query: {
oid: id,
title: 'EBOM',
subTypeName: subTypeName,
dxClassName: dxClassName,
time: moment().valueOf()
}
})
}
}
}
</script>
<style lang='scss' scoped>
.van-icon-arrow:before {
position: absolute;
transform: translate(-50%, 50%);
}
.van-cell:active {
background: rgb(161, 47, 47);
}
</style>
/**
* @Description: 相关文档
* @author xioln
* @date 2022-07-01
* @FilePath: src/views/BomTreeDetail/components/bindArticle.vue
*/
<template>
<div class="bind-article">
<van-collapse v-model="active" accordion @change="collapseChange">
<van-collapse-item title="交付规范书" name="getDeliverySpecDocRows">
<van-row>
<van-col
v-if="deliveryTableData.length !== 0"
span="24"
class="van-col-class"
>
<van-cell
is-link
v-for="item in deliveryTableData"
:key="item.name"
>
<template #title>
<van-col span="24">
<van-tag type="primary"
>编号:{{ item.number.label }}
</van-tag>
</van-col>
<van-col span="24">
<van-tag type="primary">名称:{{ item.name }} </van-tag>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">版本</van-col>
<van-col span="14" offset="1">{{ item.version }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">供应商</van-col>
<van-col span="14" offset="1">{{ item.supplier }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">工艺有效性</van-col>
<van-col span="14" offset="1">{{
item.effectiveness
}}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">状态</van-col>
<van-col span="14" offset="1">{{ item.state }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">修改者</van-col>
<van-col span="14" offset="1">{{ item.modifier }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">上次修改时间</van-col>
<van-col span="14" offset="1">{{
item.lastModifyTime
}}</van-col>
</van-col>
</template>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空" />
</van-col>
</van-row>
</van-collapse-item>
<van-collapse-item title="SPSPOM" name="getSPSBOMRows">
<van-row>
<van-col
v-if="spsbomTableData.length !== 0"
span="24"
class="van-col-class"
>
<van-cell is-link v-for="item in spsbomTableData" :key="item.name">
<template #title>
<van-col span="24">
<van-tag type="primary"
>编号:{{ item.number.label }}
</van-tag>
</van-col>
<van-col span="24">
<van-tag type="primary">名称:{{ item.name }} </van-tag>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">版本</van-col>
<van-col span="14" offset="1">{{ item.version }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">工艺有效性</van-col>
<van-col span="14" offset="1">{{
item.effectiveness
}}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">状态</van-col>
<van-col span="14" offset="1">{{ item.state }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">修改者</van-col>
<van-col span="14" offset="1">{{ item.modifier }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">上次修改时间</van-col>
<van-col span="14" offset="1">{{
item.lastModifyTime
}}</van-col>
</van-col>
</template>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空" />
</van-col>
</van-row>
</van-collapse-item>
<van-collapse-item
title="工作包SPSBOM历史记录"
name="getWorkPackageSpsbomHistory"
>
<van-row>
<van-col
v-if="spsbomHistoryTableData.length !== 0"
span="24"
class="van-col-class"
>
<van-cell
is-link
v-for="item in spsbomHistoryTableData"
:key="item.name"
>
<template #title>
<van-col span="24">
<van-col class="van-col-span" span="10">工作包编号</van-col>
<van-col span="14" offset="1">{{
item.workPackageNumber.label
}}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">工作包名称</van-col>
<van-col span="14" offset="1">{{
item.workPackageName
}}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">工作包版本</van-col>
<van-col span="14" offset="1">{{
item.workPackageVer
}}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">编号</van-col>
<van-col span="14" offset="1">{{
item.spsboms.length > 0 ? item.spsboms[0].number.label : ""
}}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">名称</van-col>
<van-col span="14" offset="1">{{
item.workPackageName
}}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">版本</van-col>
<van-col span="14" offset="1">{{
item.spsboms.length > 0
? item.spsboms[0].version
: ""
}}</van-col>
</van-col>
</template>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空" />
</van-col>
</van-row>
</van-collapse-item>
</van-collapse>
</div>
</template>
<script>
import {
getDeliverySpecDocRows,
getSPSBOMRows,
getWorkPackageSpsbomHistory
} from '@/api/taskDetail'
export default {
name: 'AindArticle', // name写在组件的最前方,自定义组件为必填
components: {},
props: {
oid: {
type: String,
require: true
}
},
data () {
return {
active: 'getDeliverySpecDocRows',
cellData: [],
parmas: {},
deliveryTableData: [],
spsbomTableData: [],
spsbomHistoryTableData: []
}
},
computed: {},
created () {},
mounted () {
this.parmas = this.$utils.formDataParams({
oid: this.oid
})
this.getDeliverySpecDocRows()
},
methods: {
collapseChange (v) {
if (v) {
this[v]()
}
},
getDeliverySpecDocRows () {
getDeliverySpecDocRows(this.parmas).then((res) => {
this.deliveryTableData = res.items
})
},
getSPSBOMRows () {
getSPSBOMRows(this.parmas).then((res) => {
this.spsbomTableData = res.items
})
},
getWorkPackageSpsbomHistory () {
getWorkPackageSpsbomHistory(this.parmas).then((res) => {
console.log('res', res)
this.spsbomHistoryTableData = res.items
})
}
}
}
</script>
<style lang='scss'>
.bind-article {
padding: 0 10px;
.van-collapse-item__content {
padding: 0;
}
.van-col-span {
width: 120px;
font-weight: bold;
}
.van-cell {
margin-right: 0;
}
}
</style>
/**
* @Description: 自制件相关文档
* @author xioln
* @date 2022-07-02
* @FilePath: src/views/BomTreeDetail/components/bindArticleCreatedSelf.vue
*/
<template>
<div class="bindArticle-createdSelf">
<van-collapse v-model="active" accordion @change="collapseChange">
<van-collapse-item title="CAD文档" name="picDocInformation">
<van-row>
<van-col v-if="picsData.length !== 0" span="24" class="van-col-class">
<van-cell is-link v-for="item in picsData" :key="item.key">
<template #title>
<van-col span="24">
<van-col class="van-col-span" span="10">编号</van-col>
<van-col span="14" offset="1">{{
item.serialNumber
}}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">文件名称</van-col>
<van-col span="14" offset="1">{{ item.docName }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">版本</van-col>
<van-col span="14" offset="1">{{ item.version }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">状态</van-col>
<van-col span="14" offset="1">{{ item.status }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">上次修改时间</van-col>
<van-col span="14" offset="1">{{ item.modifyTime }}</van-col>
</van-col>
</template>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空" />
</van-col>
</van-row>
</van-collapse-item>
<van-collapse-item title="技术文件" name="getDocumentation">
<van-row>
<van-col v-if="docsData.length !== 0" span="24" class="van-col-class">
<van-cell is-link v-for="item in docsData" :key="item.key">
<template #title>
<van-col span="24">
<van-col class="van-col-span" span="10">编号:</van-col>
<van-col span="14" offset="1">{{ item.number }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">名称:</van-col>
<van-col span="14" offset="1">{{ item.name }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">版本</van-col>
<van-col span="14" offset="1">{{ item.version }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">状态</van-col>
<van-col span="14" offset="1">{{ item.state }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">上次修改时间</van-col>
<van-col span="14" offset="1">{{ item.modifyTime }}</van-col>
</van-col>
</template>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空" />
</van-col>
</van-row>
</van-collapse-item>
</van-collapse>
</div>
</template>
<script>
import { getPictureDocument } from '@/api/taskDetail'
import { adddoc } from '@/api/design'
import moment from 'moment'
export default {
name: 'BindArticleCreatedSelf', // name写在组件的最前方,自定义组件为必填
props: {
oid: {
type: String,
require: true
}
},
components: {},
data () {
return {
active: 'picDocInformation',
picsData: [],
docsData: []
}
},
computed: {},
created () {
// 初始化数据
this.picDocInformation()
},
methods: {
collapseChange (v) {
if (v) {
this[v]()
}
},
// 获取CAD图档
picDocInformation () {
this.docLoading = true
getPictureDocument(this.oid).then((res) => {
this.picsData = []
if (res.code === 0 && res.items.length > 0) {
this.partDataStructure(res.items)
}
})
},
partDataStructure (res) {
res.forEach((doc) => {
this.picsData.push({
partId: this.oid,
dxClassname: doc.dxClassname,
subTypeName: doc.subTypeName,
cadId: doc.id,
serialNumber: doc.number,
name: doc.name,
docName: doc.cadName,
version: doc.versionId + '.' + doc.iterationId,
status: doc.state.display,
modifyTime: moment(doc.modifyTime).format('YYYY-MM-DD HH:mm:ss'),
show: true
})
})
},
getDocumentation () {
this.cadLoading = true
adddoc(this.oid).then((docs) => {
this.docsData = []
this.docsDataStructure(docs.items.docList)
})
},
docsDataStructure (res) {
res.forEach((doc) => {
this.docsData.push({
oid: doc.id,
number: doc.number,
name: doc.name,
docName: doc.cadName,
version: doc.versionId + '.' + doc.iterationId,
state: doc.state.display,
modifyTime: moment(doc.modifyTime).format('YYYY-MM-DD HH:mm:ss'),
show: true,
link: true
})
})
}
}
}
</script>
<style lang='scss'>
.bindArticle-createdSelf {
padding: 0 10px;
.van-collapse-item__content {
padding: 0;
}
.van-col-span {
width: 120px;
font-weight: bold;
}
.van-cell {
margin-right: 0;
}
}
</style>
This diff is collapsed.
/**
* @Description: 可视化
* @author xioln
* @date 2022-06-29
* @FilePath: src/views/BomTreeDetail/components/dxPart3DViewer.vue
*/
<template>
<div ref="tabPanel" class="dx-part3D-viewer">
<div id="webglcontain" ref="viewer" class="ThreeDViewer"></div>
</div>
</template>
<script>
import { downloadFile } from '@/utils/http'
import { Notify } from 'vant'
let viewer = null
export default {
name: 'DxPart3DViewer', // name写在组件的最前方,自定义组件为必填
components: {},
props: {
checkedNode: {
type: Array,
default: () => {
return []
}
}
},
data () {
return {
// viewer: null
}
},
computed: {},
created () {
// 初始化数据
},
mounted () {
if (this.checkedNode.length === 0) {
Notify({ type: 'warning', message: '请勾选模型树节点' })
} else {
this.initCad()
this.clickFun()
this.$parent.checkedNode = []
}
},
methods: {
clickFun () {
const nodes = this.checkedNode
viewer.clearScene()
const matrixArr = []
const attachments = []
nodes.forEach((currentChecked, cIndex) => {
if (
currentChecked.objFileLinks &&
currentChecked.objFileLinks.fileUri
) {
attachments.push({
fileUri: currentChecked.objFileLinks.fileUri,
fileName: currentChecked.objFileLinks.fileName
})
if (nodes.length === 1 && !currentChecked.transform.length) {
matrixArr.push({
id: currentChecked.data.memberLinkId + cIndex,
fileName: currentChecked.objFileLinks.fileName,
matrix: [
1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, -28.9471786008458,
1.38537169396519, 0
]
})
} else {
if (currentChecked.transform.length > 0) {
matrixArr.push({
id: currentChecked.data.memberLinkId + cIndex,
fileName: currentChecked.objFileLinks.fileName,
matrix: JSON.parse(currentChecked.transform)
})
}
}
}
})
attachments.forEach((m) => {
m &&
downloadFile(
`api/documents/attachments/download?fileName='${encodeURIComponent(
m.fileName
)}'&url=${encodeURIComponent(m.fileUri)}`
).then((res) => {
const reader = new FileReader()
reader.readAsDataURL(res.data)
const loadFile = reader.addEventListener('loadend', () => {
const filedName = this.getFileName(res)
for (let i = 0; i < matrixArr.length; i++) {
if (filedName.includes(matrixArr[i].fileName)) {
matrixArr[i].file = reader.result
}
// matrixArr[i].file = reader.result
}
viewer.instanceModel({ asset: matrixArr.filter((x) => x.file) })
// this.viewer.appendFile(reader.result, false )
// this.afterInstanceModel()
this.resizeCanves()
reader.removeEventListener('loadend', loadFile)
})
})
})
},
initCad () {
const dom = this.$refs.viewer
// const dom = document.getElementById('webglcontain')
// eslint-disable-next-line no-undef
viewer = new BIM3DInterface(
dom,
35,
'',
// eslint-disable-next-line no-undef
{ licenseContent, wasmURL: '/visualizing/visualizing65/tools.wasm' },
{ near: 0.001, far: 1000 }
)
this.$nextTick(() => {
viewer.clearScene() // 先清除当前场景
})
window.addEventListener('resize', this.resizeCanves(), false)
this.resizeCanves()
},
/** 重置可视化窗口 */
resizeCanves () {
this.$nextTick(() => {
viewer.resize()
})
},
getFileName (res) {
let fileName = ''
if (res.headers['content-disposition']) {
fileName = decodeURIComponent(
res.headers['content-disposition'].substring(
res.headers['content-disposition'].indexOf('=') + 1,
res.headers['content-disposition'].indexOf(";filename*=UTF-8''")
)
)
}
return fileName
}
}
}
</script>
<style lang='scss' scoped>
@import "../../../styles/bim3Dview.css";
@import "../../../styles/webgl.scss";
.ThreeDViewer {
height: 85vh;
width: 100vw;
background-color: aliceblue;
}
</style>
This diff is collapsed.
<template>
<div class="float_button">
<div
@click="onBtnClicked"
ref="floatButton"
class="float_info"
:style="{'width': itemWidth + '%', 'height': itemHeight + '%', 'left': left + 'px', 'top': top + 'px'}"
>
<img src="../../../assets/document/treeIcon.svg" alt="" srcset="">
<span class="text">{{ text }}</span>
</div>
</div>
</template>
<script>
export default {
data () {
return {
clientWidth: 0,
clientHeight: 0,
timer: null,
currentTop: 0,
left: 0,
top: 0
}
},
props: {
text: { // 按钮文本内容
type: String,
default: '模型树'
},
itemWidth: { // 悬浮按钮宽度
type: Number,
default: 15
},
itemHeight: { // 悬浮按钮高度
type: Number,
default: 10
},
gapWidth: { // 距离左右两边距离
type: Number,
default: 0
},
coefficientHeight: { // 从上到下距离比例
type: Number,
default: 0.55
}
},
created () {
this.clientWidth = document.documentElement.clientWidth
this.clientHeight = document.documentElement.clientHeight
this.left = this.clientWidth - this.itemWidth - this.gapWidth
this.top = this.clientHeight * this.coefficientHeight
},
methods: {
onBtnClicked () {
this.$emit('onFloatBtnClicked')
},
handleScrollStart () {
this.timer && clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.handleScrollEnd()
}, 300)
this.currentTop = document.documentElement.scrollTop || document.body.scrollTop
if (this.left > this.clientWidth / 2) {
this.left = this.clientWidth - this.itemWidth / 2
} else {
this.left = -this.itemWidth / 2
}
},
handleScrollEnd () {
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop
if (scrollTop === this.currentTop) {
if (this.left > this.clientWidth / 2) {
this.left = this.clientWidth - this.itemWidth - this.gapWidth
} else {
this.left = this.gapWidth
}
clearTimeout(this.timer)
}
}
},
mounted () {
this.$nextTick(() => {
const floatButton = this.$refs.floatButton
floatButton.addEventListener('touchstart', () => {
floatButton.style.transition = 'none'
})
// 在拖拽的过程中,组件应该跟随手指的移动而移动。
floatButton.addEventListener('touchmove', (e) => {
if (e.targetTouches.length === 1) { // 一根手指
const touch = e.targetTouches[0]
this.left = touch.clientX - 20
this.top = touch.clientY - 25
}
})
// 拖拽结束以后,重新调整组件的位置并重新设置过度动画。
floatButton.addEventListener('touchend', () => {
floatButton.style.transition = 'all 0.3s'
if (this.left > document.documentElement.clientWidth / 2) {
this.left = document.documentElement.clientWidth - 40
} else {
this.left = 0
}
})
})
},
beforeDestroy () {
// 添加监听页面滚动
window.removeEventListener('scroll', this.handleScrollStart)
},
destroyed () {}
}
</script>
<style lang="scss" scoped>
.float_button {
.float_info{
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1);
color: #666666;
transition: all 0.3s;
position: fixed;
bottom: 436px;
right: 0;
width: 80px;
height: 100px;
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
z-index: 999;
background: rgba(206, 209, 212, 0.5);
border-radius: 14px;
cursor: pointer;
.text{
font-size: 10px;
color: #1b77ea;
}
img{
width: 65%;
height: 50%;
}
}
}
</style>
/**
* @Description: 更改记录
* @author xioln
* @date 2022-07-02
* @FilePath: src/views/BomTreeDetail/components/modifieRecord.vue
*/
<template>
<div class="modifie-record">
<van-collapse v-model="active" accordion>
<van-collapse-item title="更改请求" name="requestTableData">
<van-row>
<van-col
v-if="requestTableData.length !== 0"
span="24"
class="van-col-class"
>
<van-cell is-link v-for="item in requestTableData" :key="item.key">
<van-col span="24">
<van-col class="van-col-span" span="10">编号</van-col>
<van-col span="14" offset="1">{{ item.number }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">名称</van-col>
<van-col span="14" offset="1">{{ item.name }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">状态</van-col>
<van-col span="14" offset="1">{{ item.state.display}}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">创建者</van-col>
<van-col span="14" offset="1">{{ item.creator.fullName }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">创建时间</van-col>
<van-col span="14" offset="1">{{ item.createTime }}</van-col>
</van-col>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空"/>
</van-col>
</van-row>
</van-collapse-item>
<van-collapse-item
title="更改通告(受更改通告影响)"
name="circularTableData"
>
<van-row>
<van-col
v-if="circularTableData.length !== 0"
span="24"
class="van-col-class"
>
<van-cell is-link v-for="item in circularTableData" :key="item.key">
<van-col span="24">
<van-col class="van-col-span" span="10">编号</van-col>
<van-col span="14" offset="1">{{ item.number }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">文件名称</van-col>
<van-col span="14" offset="1">{{ item.name }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">状态</van-col>
<van-col span="14" offset="1">{{ item.state.display }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">创建者</van-col>
<van-col span="14" offset="1">{{ item.creator.fullName }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">创建时间</van-col>
<van-col span="14" offset="1">{{ item.createTime }}</van-col>
</van-col>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空"/>
</van-col>
</van-row> </van-collapse-item
><van-collapse-item
title="更改通告(自更改通告产生)"
name="noticeGeneratedData"
>
<van-row>
<van-col
v-if="noticeGeneratedData.length !== 0"
span="24"
class="van-col-class"
>
<van-cell
is-link
v-for="item in noticeGeneratedData"
:key="item.key"
>
<van-col span="24">
<van-col class="van-col-span" span="10">编号</van-col>
<van-col span="14" offset="1">{{ item.number }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">文件名称</van-col>
<van-col span="14" offset="1">{{ item.name }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">状态</van-col>
<van-col span="14" offset="1">{{ item.state.display }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">创建者</van-col>
<van-col span="14" offset="1">{{ item.creator.fullName }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">创建时间</van-col>
<van-col span="14" offset="1">{{ item.createTime }}</van-col>
</van-col>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空"/>
</van-col>
</van-row>
</van-collapse-item>
</van-collapse>
</div>
</template>
<script>
import { getChangeData } from '@/api/taskDetail'
import { getPartById } from '@/api/design.js'
export default {
name: 'ModifieRecord', // name写在组件的最前方,自定义组件为必填
props: {
oid: {
type: String,
require: true
}
},
components: {},
data () {
return {
active: '',
requestTableData: [],
circularTableData: [],
noticeGeneratedData: []
}
},
computed: {},
created () {
// 初始化数据
this.initData()
},
methods: {
async initData () {
if (this.documentId !== '') {
let basicData = {}
this.loading = true
await getPartById(this.oid).then(async (res) => {
if (res.items) {
basicData = res.items
}
})
await getChangeData(
basicData.dxClassname,
basicData.id,
basicData.subTypeName
).then((res) => {
if (res.code === 0 && res.items) {
if (
// eslint-disable-next-line no-prototype-builtins
res.items.hasOwnProperty('changeRequests') &&
res.items.changeRequests.length
) {
// 变更请求
this.requestTableData = res.items.changeRequests
}
if (
// eslint-disable-next-line no-prototype-builtins
res.items.hasOwnProperty('acceptChangeNotices') &&
res.items.acceptChangeNotices.length
) {
// 受变更通告影响
this.circularTableData = res.items.acceptChangeNotices
}
if (
// eslint-disable-next-line no-prototype-builtins
res.items.hasOwnProperty('selfChangeNotice') &&
res.items.selfChangeNotice.length
) {
// 自变更通告产生
this.noticeGeneratedData = res.items.selfChangeNotice
}
}
})
}
}
}
}
</script>
<style lang='scss'>
.related-signing {
padding: 0 10px;
.van-collapse-item__content {
padding: 0;
}
.van-col-span {
width: 120px;
font-weight: bold;
}
.van-cell {
margin-right: 0;
}
}
</style>
/**
* @Description: 相关签审包
* @author xioln
* @date 2022-07-02
* @FilePath: src/views/BomTreeDetail/components/relatedSigning.vue
*/
<template>
<div class="related-signing">
<van-collapse v-model="active" accordion>
<van-collapse-item title="相关签审包" name="tableData">
<van-row>
<van-col
v-if="tableData.length !== 0"
span="24"
class="van-col-class"
>
<van-cell is-link v-for="item in tableData" :key="item.key">
<van-col span="24">
<van-col class="van-col-span" span="10">编号</van-col>
<van-col span="14" offset="1">{{ item.number }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">文件名称</van-col>
<van-col span="14" offset="1">{{ item.name }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">状态</van-col>
<van-col span="14" offset="1">{{ item.state }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">创建者</van-col>
<van-col span="14" offset="1">{{ item.creator }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">创建时间</van-col>
<van-col span="14" offset="1">{{ item.createTime }}</van-col>
</van-col>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空"/>
</van-col>
</van-row>
</van-collapse-item>
<van-collapse-item title="相关数据包" name="dataTable">
<van-row>
<van-col
v-if="dataTable.length !== 0"
span="24"
class="van-col-class"
>
<van-cell is-link v-for="item in dataTable" :key="item.key">
<van-col span="24">
<van-col class="van-col-span" span="10">编号</van-col>
<van-col span="14" offset="1">{{ item.number }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">文件名称</van-col>
<van-col span="14" offset="1">{{ item.name }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">状态</van-col>
<van-col span="14" offset="1">{{ item.state }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">创建者</van-col>
<van-col span="14" offset="1">{{ item.creator }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">创建时间</van-col>
<van-col span="14" offset="1">{{ item.createTime }}</van-col>
</van-col>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空"/>
</van-col>
</van-row> </van-collapse-item
><van-collapse-item title="相关发布包" name="publishTable">
<van-row>
<van-col
v-if="publishTable.length !== 0"
span="24"
class="van-col-class"
>
<van-cell is-link v-for="item in publishTable" :key="item.key">
<van-col span="24">
<van-col class="van-col-span" span="10">编号</van-col>
<van-col span="14" offset="1">{{ item.number }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">文件名称</van-col>
<van-col span="14" offset="1">{{ item.name }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">状态</van-col>
<van-col span="14" offset="1">{{ item.state }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">创建者</van-col>
<van-col span="14" offset="1">{{ item.creator }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">创建时间</van-col>
<van-col span="14" offset="1">{{ item.createTime }}</van-col>
</van-col>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</van-col>
<van-col span="24" v-else>
<van-empty description="数据为空"/>
</van-col>
</van-row>
</van-collapse-item>
</van-collapse>
</div>
</template>
<script>
import { getPromotions } from '@/api/taskDetail'
export default {
name: 'RelatedSigning', // name写在组件的最前方,自定义组件为必填
props: {
oid: {
type: String,
require: true
}
},
components: {},
data () {
return {
active: 'tableData',
tableData: [],
dataTable: [],
publishTable: []
}
},
computed: {},
created () {
// 初始化数据
this.promotables()
},
methods: {
promotables () {
getPromotions({ oid: this.oid }).then((res) => {
const keyArr = Object.keys(res.items)
console.log(keyArr, 'keyArr')
if (keyArr.includes('相关签审包')) {
this.tableData = res.items['相关签审包'] || []
}
if (keyArr.includes('相关数据包')) {
this.dataTable = res.items['相关数据包'] || []
}
if (keyArr.includes('相关发布包')) {
this.publishTable = res.items['相关发布包'] || []
}
})
}
}
}
</script>
<style lang='scss'>
.related-signing {
padding: 0 10px;
.van-collapse-item__content {
padding: 0;
}
.van-col-span {
width: 120px;
font-weight: bold;
}
.van-cell {
margin-right: 0;
}
}
</style>
/**
* @Description: 结构
* @author xioln
* @date 2022-07-01
* @FilePath: src/views/BomTreeDetail/components/structure.vue
*/
<template>
<div class="structure">
<van-row v-if="structureData.length !== 0 || xmlData.length !== 0">
<van-col span="24" class="van-col-class" v-if="structureData.length !== 0">
<div class="sub-title">结构</div>
<van-cell is-link v-for="item in structureData" :key="item.key">
<template #title>
<van-col span="24">
<van-col class="van-col-span" span="10">编号</van-col>
<van-col span="14" offset="1">{{ item.partNumber }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">名称</van-col>
<van-col span="14" offset="1">{{ item.partName }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">版本</van-col>
<van-col span="14" offset="1">{{ item.version }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">状态</van-col>
<van-col span="14" offset="1">{{ item.status }}</van-col>
</van-col>
</template>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</van-col>
<van-col span="24" class="van-col-class">
<div class="sub-title">紧固件</div>
<van-cell is-link v-for="item in xmlData" :key="item.key">
<template #title>
<van-col span="24">
<van-col class="van-col-span" span="10">编号</van-col>
<van-col span="14" offset="1">{{ item.number }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">名称</van-col>
<van-col span="14" offset="1">{{ item.name }}</van-col>
</van-col>
<van-col span="24">
<van-col class="van-col-span" span="10">数量</van-col>
<van-col span="14" offset="1">{{ item.count }}</van-col>
</van-col>
</template>
<template #right-icon>
<!-- <van-icon name="arrow"/> -->
</template>
</van-cell>
</van-col>
</van-row>
<van-row v-else>
<van-col span="24">
<van-empty description="数据为空" />
</van-col>
</van-row>
</div>
</template>
<script>
import { getPartBom, rModelFasteners } from '@/api/taskDetail'
export default {
name: 'Structure', // name写在组件的最前方,自定义组件为必填
props: {
oid: {
type: String,
require: true
}
},
components: {},
data () {
return {
structureData: [],
xmlData: []
}
},
computed: {},
created () {
// 初始化数据
this.rModelFasteners()
},
methods: {
// 紧固件
rModelFasteners () {
rModelFasteners({ partId: this.oid }).then((res) => {
if (res.items) {
this.xmlData = res.items.fasteners
}
})
},
assemblyTreeData (item) {
// eslint-disable-next-line no-unused-vars
for (const key in this.treeNodeData(item)) {
this.$set(item, key, this.treeNodeData(item)[key])
}
// eslint-disable-next-line no-prototype-builtins
if (item.hasOwnProperty('children') && item.children.length) {
item.children.forEach((item) => {
this.assemblyTreeData(item)
})
}
},
getPartBom (resolve = null) {
const params = {
oid: this.oid,
level: '1'
}
getPartBom(params).then((tree) => {
console.log('tree', tree.items)
this.assemblyTreeData(tree.items)
if (resolve) {
resolve(tree.items.children)
} else {
this.structureData = []
this.structureData = tree.items.children
}
})
},
treeNodeData (item) {
item = Object.assign(item, item.partAttributes)
return {
index: this.i++,
number: item.partNumber,
link: 'link',
oid: item.partId,
version: item.versionId + '.' + item.iterationId,
status: item.lifecycleState.split('___')[1],
FACRIDocLevel: item.partAttributes.hasOwnProperty('FACRIDocLevel')
? item.partAttributes.FACRIDocLevel
: '',
PARTTYPE: item.partAttributes.hasOwnProperty('PARTTYPE')
? item.partAttributes.PARTTYPE
: '',
amount: item.quantity,
// unit: this.unitArray.find(x => x.value === item.unit) ? this.unitArray.find(x => x.value === item.unit).label : '',
FACRICLMC: item.partAttributes.hasOwnProperty('FACRICLMC')
? item.partAttributes.FACRICLMC
: '',
FACRICLPH: item.partAttributes.hasOwnProperty('FACRICLPH')
? item.partAttributes.FACRICLPH
: '',
creator: item.creatorName,
FACRITUFU: item.partAttributes.hasOwnProperty('FACRITUFU')
? item.partAttributes.FACRITUFU
: '',
SPEC: item.partAttributes.hasOwnProperty('SPEC')
? item.partAttributes.SPEC
: '',
FACRIBEIZHU: item.partAttributes.hasOwnProperty('FACRIBEIZHU')
? item.partUseAttributes.FACRIBEIZHU
: '',
hasChildren: this.entranceJudge,
show: true
}
}
}
}
</script>
<style lang='scss'>
.structure {
padding: 0 10px;
.sub-title{
margin-bottom: 10px;
}
.van-collapse-item__content {
padding: 0;
}
.van-col-span {
width: 120px;
font-weight: bold;
}
.van-cell {
margin-right: 0;
}
}
</style>
This diff is collapsed.
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
activeTab: null, activeTab: null,
tabs: [ tabs: [
{ title: '基本信息', key: 'baseInfoDetail' }, { title: '基本信息', key: 'baseInfoDetail' },
{ title: '浏览', key: 'pdf' } { title: '查看附件', key: 'pdf' }
], ],
dxContentItems: {}, dxContentItems: {},
url: '', url: '',
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</template> </template>
<script> <script>
import { getInstTaskHisTory } from '@/api/taskDetail' import { getInstTaskHisTory, getDictListByCode } from '@/api/taskDetail'
export default { export default {
props: { props: {
flowData: { flowData: {
...@@ -54,8 +54,9 @@ export default { ...@@ -54,8 +54,9 @@ export default {
}, },
created () { created () {
}, },
mounted () { async mounted () {
this.getWorkItemHistory() await this.getDictArr()
await this.getWorkItemHistory()
}, },
computed: {}, computed: {},
methods: { methods: {
...@@ -87,22 +88,16 @@ export default { ...@@ -87,22 +88,16 @@ export default {
(dateEnd.getTime() - dateStart.getTime()) / (1000 * 60 * 60 * 24) (dateEnd.getTime() - dateStart.getTime()) / (1000 * 60 * 60 * 24)
) )
}, },
getDictArr () {
getDictListByCode('MigrationPlanStatus').then(res => {
if (!res || !res.items) {
return []
}
this.dictArr = res.items.content
})
},
translateStatus(status) { translateStatus(status) {
let str = '' return this.dictArr.find(item => item.dictKey === status)?.dictValue
switch (status) {
case 'COMPLETE':
str = '已完成'
break
case 'BE_RESOLVED':
str = '待处理'
break
case 'PENDING':
str = '被委托人待处理'
break
case 'RUNNING':
str = '进行中'
}
return str
} }
} }
} }
......
<template> <template>
<div class="taskDetails"> <div class="taskDetails">
<headerNavBar title="任务详情" @click-left="onClickLeft" /> <headerNavBar :title="$route.query.taskType+'详情'" @click-left="onClickLeft" />
<div class="taskBasicInfo"> <div class="taskBasicInfo">
<task-basic-info <task-basic-info
v-if="basicData && form" v-if="basicData && form"
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
v-if="componentsShow" v-if="componentsShow"
:class="[ :class="[
['已办任务', '我发起的任务'].includes($route.query.taskType) && ['已办任务', '我发起的任务'].includes($route.query.taskType) &&
item.title !== '签署文档' item.title !== '签署文档' && item.title !== '签审历史'
? 'form-onlyRead' ? 'form-onlyRead'
: '' : ''
]" ]"
......
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