|
@@ -15,23 +15,7 @@
|
|
|
<el-button type='primary' @click='save' size='small'>确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
- <!-- <Modal :show='dialogVisible' :title='title' mode='middle' @close='dialogVisible=false'>
|
|
|
- <template #content>
|
|
|
- <add-form
|
|
|
- ref='add'
|
|
|
- :InfosList='InfosList'
|
|
|
- :InfoTypeIdList='InfoTypeIdList'
|
|
|
- :ruleForm='info'
|
|
|
- @addSuccess='addSuccess'
|
|
|
- @updateSuccess='updateSuccess'
|
|
|
- :title='title'
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template #handle>
|
|
|
- <Button @click='dialogVisible = false,cancal()' type='default'>取 消</Button>
|
|
|
- <Button @click='save' type='primary'>确 定</Button>
|
|
|
- </template>
|
|
|
- </Modal>-->
|
|
|
+
|
|
|
<TransferSelectModal
|
|
|
defaultExpandAll
|
|
|
default-expand-all
|
|
@@ -51,7 +35,7 @@
|
|
|
<script>
|
|
|
import addForm from './addForm'
|
|
|
import addList from '../legendRules/addList'
|
|
|
-import { groupByCategory, updateRelation } from '@/api/legendLibrary.js'
|
|
|
+import { groupByCategory, updateRelation, queryRelation } from '@/api/legendLibrary.js'
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -75,7 +59,8 @@ export default {
|
|
|
title: '',
|
|
|
GraphCategoryId: 'DTXT',
|
|
|
modalShow4: false,
|
|
|
- treeData: []
|
|
|
+ treeData: [],
|
|
|
+ tableData: []
|
|
|
}
|
|
|
},
|
|
|
components: { addForm, addList },
|
|
@@ -89,6 +74,12 @@ export default {
|
|
|
this.treeData = []
|
|
|
this.treeData = res.Data.map(i => this.getTree(i))
|
|
|
})
|
|
|
+ //获取图例列表
|
|
|
+ let postParams = this.GraphCategoryId
|
|
|
+ let data = {}
|
|
|
+ queryRelation({ data, postParams }).then(res => {
|
|
|
+ this.tableData = res.data.Content
|
|
|
+ })
|
|
|
//treeSelect
|
|
|
this.modalShow4 = true
|
|
|
this.info = {
|
|
@@ -125,8 +116,7 @@ export default {
|
|
|
// this.InfosList = [...row.InfoLocal.map(({ id }) => id), ...row.InfoSystem]
|
|
|
this.InfosList = row.InfoLocal ? [...row.InfoLocal.map(({ id }) => id)] : []
|
|
|
this.InfoTypeIdList = row.InfoTypeId
|
|
|
- console.log(this.InfosList, this.InfoTypeIdList)
|
|
|
- console.log(this.info)
|
|
|
+
|
|
|
// 图例库规则中的transform
|
|
|
} else if (title == '' && this.$refs.searchList) {
|
|
|
this.$refs.searchList.queryAll()
|
|
@@ -189,11 +179,30 @@ export default {
|
|
|
this.dialogVisible = false
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
treeConfirm(ids, dataObj) {
|
|
|
+ let tableList = [],
|
|
|
+ list = [],
|
|
|
+ totalLst = []
|
|
|
+ dataObj.forEach(i => {
|
|
|
+ list.push({
|
|
|
+ Id: i.id,
|
|
|
+ name: i.name
|
|
|
+ })
|
|
|
+ })
|
|
|
+ tableList = [...list, ...this.tableData]
|
|
|
+ tableList.forEach((i, index) => {
|
|
|
+ totalLst.push({
|
|
|
+ GraphElementId: i.Id,
|
|
|
+ OrderId: index
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
let postParams = {
|
|
|
- GraphCategoryId: this.GraphCategoryId.join(' '),
|
|
|
- GraphElementIds: ids
|
|
|
+ GraphCategoryId: this.GraphCategoryId[0],
|
|
|
+ GraphRelations: totalLst
|
|
|
}
|
|
|
+ console.log(totalLst, 'list')
|
|
|
updateRelation({ postParams }).then(res => {
|
|
|
if (res.Result == 'success') {
|
|
|
this.$message.success('添加成功!')
|