Commit 94a1feb8 authored by wangdanlei's avatar wangdanlei

图纸图册

parent 89766cb2
...@@ -25,7 +25,12 @@ export function getDetailWithRecursion({ id, openProps, modelName }) { ...@@ -25,7 +25,12 @@ export function getDetailWithRecursion({ id, openProps, modelName }) {
export function recursion(modelName, params, batchFlag) { export function recursion(modelName, params, batchFlag) {
return post(`/${modelName}/recursion${batchFlag ? 's' : ''}`, params, true) return post(`/${modelName}/recursion${batchFlag ? 's' : ''}`, params, true)
} }
// 批量删除 // 批量删除
export function findRecursion(modelName, params) {
return post(`/${modelName}/find/recursion`, params)
}
// 深度查询
export function getParentData(modelName, id) { export function getParentData(modelName, id) {
return get(`/${modelName}/flat/parent/${id}`) return get(`/${modelName}/flat/parent/${id}`)
} }
...@@ -142,6 +147,7 @@ export default { ...@@ -142,6 +147,7 @@ export default {
remove, remove,
apiDownloadFile, apiDownloadFile,
apiUploadFile, apiUploadFile,
deleteByExample deleteByExample,
findRecursion
} }
...@@ -3,18 +3,19 @@ ...@@ -3,18 +3,19 @@
注:此处只是demo演示,如果模型名与微前端的dee-后的变量一致,无需再次配置 注:此处只是demo演示,如果模型名与微前端的dee-后的变量一致,无需再次配置
*/ */
export default { export default {
'basic-service': ['dee-user', 'dee-audit', 'dee-config', 'dee-pdc', 'dee-file', 'dee-context', 'dee-production', 'dee-quality', 'dee-project'], 'basic-service': ['dee-user', 'dee-audit', 'dee-config', 'dee-pdc', 'dee-file', 'dee-context', 'dee-production', 'dee-quality', 'dee-project', 'dee-doc'],
'resource': ['dee-resource'], 'resource': ['dee-resource', 'dee-doc'],
'process': ['dee-craft', 'dee-config'], 'process': ['dee-craft', 'dee-config', 'dee-doc'],
'xbomthread': ['dee-pdc', 'dee-cmt', 'dee-doc', 'dee-production', 'dee-craft'], 'xbomthread': ['dee-pdc', 'dee-cmt', 'dee-doc', 'dee-production', 'dee-craft'],
'xbom': ['dee-pdc', 'dee-cmt', 'dee-doc', 'dee-production', 'dee-craft'], 'xbom': ['dee-pdc', 'dee-cmt', 'dee-doc', 'dee-production', 'dee-craft'],
'stockcenter': ['dee-storage', 'dee-quality'], 'stockcenter': ['dee-storage', 'dee-quality', 'dee-doc'],
'dxstinventoryaccount': ['dee-storage'], 'dxstinventoryaccount': ['dee-storage', 'dee-doc'],
'dxstinvaccountdetail': ['dee-storage'], 'dxstinvaccountdetail': ['dee-storage', 'dee-doc'],
'productionbasicinfo': ['dee-storage'], 'productionbasicinfo': ['dee-storage', 'dee-doc'],
'leanproductionkit': ['dee-production', 'dee-storage', 'dee-quality', 'dee-resource'], 'leanproductionkit': ['dee-production', 'dee-storage', 'dee-quality', 'dee-resource', 'dee-doc'],
'qualitycenter': ['dee-quality'], 'qualitycenter': ['dee-quality', 'dee-doc'],
'equipment-maintenance': ['dee-equipment', 'dee-resource'], 'equipment-maintenance': ['dee-equipment', 'dee-resource', 'dee-doc'],
'dataagg': ['dee-pdc'] 'dataagg': ['dee-pdc', 'dee-doc'],
'plan': ['dee-doc']
} }
<template>
<div>
<dee-as-com
:lay-config="layConfig"
:basic-data="basicData"
/>
</div>
</template>
<script>
export default {
name: 'AtlasPageDetailsPage',
componentName: '图册页面详情页',
components: {},
props: {},
data() {
return {
treeData: [],
basicData: {},
emitMethods: [
{
methods: 'getData',
methodsName: '获取数据1'
}
]
}
},
computed: {
layConfig() {
return {
layKey: '',
typeName: ''
}
}
},
watch: {},
// 生命周期 - 创建完成(可以访问当前this 实例)
created() {
},
// 生命周期 - 挂载之前
beforeMount() {
},
// 生命周期 - 挂载完成(可以访问 DOM 元素)
mounted() {
},
methods: {
clickNode() {},
getData(data) {
console.log(111, data)
}
}
}
</script>
<style lang='scss' scoped>
</style>
<template>
<div>
<div class="header-btn">
<el-button type="primary" size="small" @click="create">新建</el-button>
<el-button type="primary" size="small" @click="deleteEvent">删除</el-button>
</div>
<el-tree
id="houseTree"
ref="houseTree"
class="tree"
node-key="id"
:data="treeData"
:props="treeProps"
:check-strictly="true"
:expand-on-click-node="false"
:default-expand-all="false"
:highlight-current="true"
>
<div
slot-scope="{ node, data }"
@click="clickNode(node)"
>
<span class="change-text" style="font-size:14px">
{{ data.name }}
</span>
</div>
</el-tree>
<dee-drawer
width="60%"
title="新建"
:dialog-visible="dialogVisible"
@handleClose="handleClose"
>
<dee-as-com
parent-show-mode="dialog"
:lay-config="{
typeName: 'DesignDrawings',
layKey: 'defaultCreate'
}"
@close="handleClose"
@on-cancel="handleClose"
@completeEven="completeEven"
/>
</dee-drawer>
</div>
</template>
<script>
export default {
name: 'AtlasPageTree',
componentName: '图册树',
components: {},
props: {},
data() {
return {
treeData: [],
evenList: [
{
even: 'clickNode',
name: '点击事件'
}
],
dialogVisible: false
}
},
computed: {
treeProps() {
return {
children: 'children',
label: 'label',
isLeaf: 'isLeaf'
}
}
},
watch: {},
// 生命周期 - 创建完成(可以访问当前this 实例)
created() {
},
// 生命周期 - 挂载之前
beforeMount() {
},
// 生命周期 - 挂载完成(可以访问 DOM 元素)
mounted() {
this.getTreeData()
},
methods: {
getTreeData() {
const params = {
'openProps': [{
'name': 'target'
}],
'pageFrom': 1,
'pageSize': 999,
'searchItems': {
'items': [
{
'fieldName': 'sourceId',
'operator': 'EQ',
'value': this.$route.query.id
}
],
'operator': 'AND'
}
}
this.$api.findRecursion('ExtAtlasDrawingLink', params).then(res => {
if (res.code === 0) {
}
})
},
clickNode(node) {
this.$emit('clickNode', node)
},
create() {
this.dialogVisible = true
},
deleteEvent() {
},
handleClose() {
this.dialogVisible = false
},
completeEven() {
this.handleClose()
this.getTreeData()
}
}
}
</script>
<style lang='scss' scoped>
.header-btn{
text-align: right;
}
.tree{
height: calc(100% - 35px);
}
</style>
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
}, },
inputAttr: { inputAttr: {
type: String, type: String,
default: () => '' default: () => 'value'
}, },
// eslint-disable-next-line vue/require-default-prop // eslint-disable-next-line vue/require-default-prop
asyncAttr: { asyncAttr: {
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="flex-start"> <div class="baseline_compare_content">
<div class="compare-item"> <div class="compare-item">
<baselineSelect :value="leftDefault" @chooseBaseline="getLeftChoose" /> <baselineSelect :value="leftDefault" @chooseBaseline="getLeftChoose" />
<dee-up-table <dee-up-table
...@@ -87,6 +87,8 @@ export default { ...@@ -87,6 +87,8 @@ export default {
changedDataObj: {}, changedDataObj: {},
leftTableData: [], leftTableData: [],
rightTableData: [], rightTableData: [],
leftTableDataOriginal: [],
rightTableDataOriginal: [],
showColumns: [], showColumns: [],
baselineData: [], baselineData: [],
leftDefault: '', leftDefault: '',
...@@ -165,7 +167,7 @@ export default { ...@@ -165,7 +167,7 @@ export default {
if (keyList.length > 0) { if (keyList.length > 0) {
for (let i = 0; i < keyList.length; i++) { for (let i = 0; i < keyList.length; i++) {
const columnList = this.changedDataObj[keyList[i]] const columnList = this.changedDataObj[keyList[i]]
if (row.serialNo === keyList[i] && columnList.length !== 0 && columnList.includes(column.property)) { if (row.dynamicAttrs.baseLineRefId.toString() === keyList[i] && columnList.length !== 0) {
return { background: '#F5E75D' } return { background: '#F5E75D' }
} }
} }
...@@ -232,10 +234,11 @@ export default { ...@@ -232,10 +234,11 @@ export default {
res.items.content.map(item => { res.items.content.map(item => {
if (item.extPlanBaseLineLinks) { if (item.extPlanBaseLineLinks) {
item.extPlanBaseLineLinks.forEach(x => { item.extPlanBaseLineLinks.forEach(x => {
this.leftTableData.push(x.target) this.leftTableDataOriginal.push(x.target)
}) })
} }
}) })
this.copareLeftAndRight(this.leftTableDataOriginal, this.rightTableDataOriginal)
} }
}) })
}, },
...@@ -275,11 +278,12 @@ export default { ...@@ -275,11 +278,12 @@ export default {
res.items.content.map(item => { res.items.content.map(item => {
if (item.extPlanBaseLineLinks) { if (item.extPlanBaseLineLinks) {
item.extPlanBaseLineLinks.forEach(x => { item.extPlanBaseLineLinks.forEach(x => {
this.rightTableData.push(x.target) this.rightTableDataOriginal.push(x.target)
}) })
} }
}) })
} }
this.copareLeftAndRight(this.leftTableDataOriginal, this.rightTableDataOriginal)
}) })
}, },
// 查询原始基线相关的任务 // 查询原始基线相关的任务
...@@ -295,17 +299,16 @@ export default { ...@@ -295,17 +299,16 @@ export default {
}) })
}, },
// 对比左右两侧基线 // 对比左右两侧基线
copareLeftAndRight(leftArr, rightArr, tarIsOrigPlan) { copareLeftAndRight(leftArr, rightArr) {
// console.log('leftArr, rightArr', leftArr, rightArr)
this.leftTableData = [] this.leftTableData = []
this.rightTableData = [] this.rightTableData = []
if (leftArr.length === 0 || rightArr.length === 0) { if (leftArr.length === 0 || rightArr.length === 0) {
return return
} }
leftArr.forEach(left => { leftArr.forEach(left => {
var leftId = tarIsOrigPlan ? left.id : left.dynamicAttrs.origId var leftId = left.dynamicAttrs.baseLineRefId
// 左有右无 // 左有右无
const findItemInRightArr = rightArr.find(x => x.dynamicAttrs.origId === leftId) const findItemInRightArr = rightArr.find(x => x.dynamicAttrs.baseLineRefId === leftId)
if (!findItemInRightArr) { if (!findItemInRightArr) {
left.style = { background: '#81C966' } left.style = { background: '#81C966' }
this.leftTableData.push(left) this.leftTableData.push(left)
...@@ -315,7 +318,7 @@ export default { ...@@ -315,7 +318,7 @@ export default {
// console.log('left', left) // console.log('left', left)
this.leftTableData.push(left) this.leftTableData.push(left)
this.rightTableData.push(findItemInRightArr) this.rightTableData.push(findItemInRightArr)
this.changedDataObj[left.serialNo] = [] this.changedDataObj[left.dynamicAttrs.baseLineRefId] = []
// 两边都有,比较字段的差别 // 两边都有,比较字段的差别
Object.keys(left).forEach(leftKey => { Object.keys(left).forEach(leftKey => {
let leftValue = left[leftKey] let leftValue = left[leftKey]
...@@ -327,15 +330,15 @@ export default { ...@@ -327,15 +330,15 @@ export default {
leftKey = 'manager.userName' leftKey = 'manager.userName'
} }
if (leftValue !== rightValue) { if (leftValue !== rightValue) {
this.changedDataObj[left.serialNo].push(leftKey) this.changedDataObj[left.dynamicAttrs.baseLineRefId].push(leftKey)
} }
this.changedDataObj[left.dynamicAttrs.baseLineRefId].push(leftKey)
}) })
} }
}) })
rightArr.forEach(right => { rightArr.forEach(right => {
// console.log('tarIsOrigPlan', tarIsOrigPlan)
// 左无右有 // 左无右有
const findItemInRightArr = leftArr.find(x => (tarIsOrigPlan ? x.id : x.dynamicAttrs.origId) === right.dynamicAttrs.origId) const findItemInRightArr = leftArr.find(x => x.dynamicAttrs.baseLineRefId === right.dynamicAttrs.baseLineRefId)
if (!findItemInRightArr) { if (!findItemInRightArr) {
right.style = { background: '#F57D7D' } right.style = { background: '#F57D7D' }
this.leftTableData.push({}) this.leftTableData.push({})
...@@ -386,7 +389,13 @@ export default { ...@@ -386,7 +389,13 @@ export default {
margin-left: 26px; margin-left: 26px;
} }
} }
.compare-item{ .baseline_compare_content {
height:calc(100vh - 140px);
background-color: white;
border:1px solid #d9d9d9;
display:flex;
justify-content: space-between;
.compare-item{
width: 50%; width: 50%;
height: 100%; height: 100%;
.title{ .title{
...@@ -398,6 +407,11 @@ export default { ...@@ -398,6 +407,11 @@ export default {
border: 1px solid #E4E4E4; border: 1px solid #E4E4E4;
padding-left: 10px; padding-left: 10px;
} }
}
.baseline_content_left{
border-right:1px solid#d9d9d9;
}
} }
} }
</style> </style>
...@@ -327,10 +327,17 @@ export default { ...@@ -327,10 +327,17 @@ export default {
this.handleCloseDetail(this.taskState) this.handleCloseDetail(this.taskState)
}, },
goToDeatil(params) { goToDeatil(params) {
this.$router.push({ if (['DesignAtlas', 'InstallAtlas'].includes(params.subTypeName)) {
path: `/configured-page/cd/${params.subTypeName}/defaultInfo/${params.id}`, this.$router.push({
query: { title: (params.name || params.id) + '详情' } path: `/page/a50df027-6fcf-4b73-aa06-32eebfc004a7`,
}) query: { id: params.id }
})
} else {
this.$router.push({
path: `/configured-page/cd/${params.subTypeName}/defaultInfo/${params.id}`,
query: { title: (params.name || params.id) + '详情' }
})
}
}, },
planTemplateDownload() { planTemplateDownload() {
get('/ExtFileTemplateManager/planTemplateDownload?fileType=2').then(res => { get('/ExtFileTemplateManager/planTemplateDownload?fileType=2').then(res => {
......
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