Commit 94a1feb8 authored by wangdanlei's avatar wangdanlei

图纸图册

parent 89766cb2
......@@ -25,7 +25,12 @@ export function getDetailWithRecursion({ id, openProps, modelName }) {
export function recursion(modelName, params, batchFlag) {
return post(`/${modelName}/recursion${batchFlag ? 's' : ''}`, params, true)
}
// 批量删除
export function findRecursion(modelName, params) {
return post(`/${modelName}/find/recursion`, params)
}
// 深度查询
export function getParentData(modelName, id) {
return get(`/${modelName}/flat/parent/${id}`)
}
......@@ -142,6 +147,7 @@ export default {
remove,
apiDownloadFile,
apiUploadFile,
deleteByExample
deleteByExample,
findRecursion
}
......@@ -3,18 +3,19 @@
注:此处只是demo演示,如果模型名与微前端的dee-后的变量一致,无需再次配置
*/
export default {
'basic-service': ['dee-user', 'dee-audit', 'dee-config', 'dee-pdc', 'dee-file', 'dee-context', 'dee-production', 'dee-quality', 'dee-project'],
'resource': ['dee-resource'],
'process': ['dee-craft', 'dee-config'],
'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', 'dee-doc'],
'process': ['dee-craft', 'dee-config', 'dee-doc'],
'xbomthread': ['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'],
'dxstinventoryaccount': ['dee-storage'],
'dxstinvaccountdetail': ['dee-storage'],
'productionbasicinfo': ['dee-storage'],
'leanproductionkit': ['dee-production', 'dee-storage', 'dee-quality', 'dee-resource'],
'qualitycenter': ['dee-quality'],
'equipment-maintenance': ['dee-equipment', 'dee-resource'],
'dataagg': ['dee-pdc']
'stockcenter': ['dee-storage', 'dee-quality', 'dee-doc'],
'dxstinventoryaccount': ['dee-storage', 'dee-doc'],
'dxstinvaccountdetail': ['dee-storage', 'dee-doc'],
'productionbasicinfo': ['dee-storage', 'dee-doc'],
'leanproductionkit': ['dee-production', 'dee-storage', 'dee-quality', 'dee-resource', 'dee-doc'],
'qualitycenter': ['dee-quality', 'dee-doc'],
'equipment-maintenance': ['dee-equipment', 'dee-resource', 'dee-doc'],
'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 {
},
inputAttr: {
type: String,
default: () => ''
default: () => 'value'
},
// eslint-disable-next-line vue/require-default-prop
asyncAttr: {
......
......@@ -26,7 +26,7 @@
</div>
</div>
</div>
<div class="flex-start">
<div class="baseline_compare_content">
<div class="compare-item">
<baselineSelect :value="leftDefault" @chooseBaseline="getLeftChoose" />
<dee-up-table
......@@ -87,6 +87,8 @@ export default {
changedDataObj: {},
leftTableData: [],
rightTableData: [],
leftTableDataOriginal: [],
rightTableDataOriginal: [],
showColumns: [],
baselineData: [],
leftDefault: '',
......@@ -165,7 +167,7 @@ export default {
if (keyList.length > 0) {
for (let i = 0; i < keyList.length; 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' }
}
}
......@@ -232,10 +234,11 @@ export default {
res.items.content.map(item => {
if (item.extPlanBaseLineLinks) {
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 {
res.items.content.map(item => {
if (item.extPlanBaseLineLinks) {
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 {
})
},
// 对比左右两侧基线
copareLeftAndRight(leftArr, rightArr, tarIsOrigPlan) {
// console.log('leftArr, rightArr', leftArr, rightArr)
copareLeftAndRight(leftArr, rightArr) {
this.leftTableData = []
this.rightTableData = []
if (leftArr.length === 0 || rightArr.length === 0) {
return
}
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) {
left.style = { background: '#81C966' }
this.leftTableData.push(left)
......@@ -315,7 +318,7 @@ export default {
// console.log('left', left)
this.leftTableData.push(left)
this.rightTableData.push(findItemInRightArr)
this.changedDataObj[left.serialNo] = []
this.changedDataObj[left.dynamicAttrs.baseLineRefId] = []
// 两边都有,比较字段的差别
Object.keys(left).forEach(leftKey => {
let leftValue = left[leftKey]
......@@ -327,15 +330,15 @@ export default {
leftKey = 'manager.userName'
}
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 => {
// 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) {
right.style = { background: '#F57D7D' }
this.leftTableData.push({})
......@@ -386,7 +389,13 @@ export default {
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%;
height: 100%;
.title{
......@@ -398,6 +407,11 @@ export default {
border: 1px solid #E4E4E4;
padding-left: 10px;
}
}
.baseline_content_left{
border-right:1px solid#d9d9d9;
}
}
}
</style>
......@@ -327,10 +327,17 @@ export default {
this.handleCloseDetail(this.taskState)
},
goToDeatil(params) {
this.$router.push({
path: `/configured-page/cd/${params.subTypeName}/defaultInfo/${params.id}`,
query: { title: (params.name || params.id) + '详情' }
})
if (['DesignAtlas', 'InstallAtlas'].includes(params.subTypeName)) {
this.$router.push({
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() {
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